mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +00:00
More renamings of Target/Machine*Info to Target/Target*Info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5204 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -9,9 +9,9 @@
|
|||||||
#define REG_CLASS_H
|
#define REG_CLASS_H
|
||||||
|
|
||||||
#include "llvm/CodeGen/InterferenceGraph.h"
|
#include "llvm/CodeGen/InterferenceGraph.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include <stack>
|
#include <stack>
|
||||||
class MachineRegClassInfo;
|
class TargetRegClassInfo;
|
||||||
|
|
||||||
typedef std::vector<unsigned> ReservedColorListType;
|
typedef std::vector<unsigned> ReservedColorListType;
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ typedef std::vector<unsigned> ReservedColorListType;
|
|||||||
// This is the class that contains all data structures and common algos
|
// This is the class that contains all data structures and common algos
|
||||||
// for coloring a particular register class (e.g., int class, fp class).
|
// for coloring a particular register class (e.g., int class, fp class).
|
||||||
// This class is hardware independent. This class accepts a hardware
|
// This class is hardware independent. This class accepts a hardware
|
||||||
// dependent description of machine registers (MachineRegInfo class) to
|
// dependent description of machine registers (TargetRegInfo class) to
|
||||||
// get hardware specific info and to color an individual IG node.
|
// get hardware specific info and to color an individual IG node.
|
||||||
//
|
//
|
||||||
// This class contains the InterferenceGraph (IG).
|
// This class contains the InterferenceGraph (IG).
|
||||||
@ -35,7 +35,7 @@ typedef std::vector<unsigned> ReservedColorListType;
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
class RegClass {
|
class RegClass {
|
||||||
const Function *const Meth; // Function we are working on
|
const Function *const Meth; // Function we are working on
|
||||||
const MachineRegClassInfo *const MRC; // corresponding MRC
|
const TargetRegClassInfo *const MRC; // corresponding MRC
|
||||||
const unsigned RegClassID; // my int ID
|
const unsigned RegClassID; // my int ID
|
||||||
|
|
||||||
InterferenceGraph IG; // Interference graph - constructed by
|
InterferenceGraph IG; // Interference graph - constructed by
|
||||||
@ -69,7 +69,7 @@ class RegClass {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
RegClass(const Function *M,
|
RegClass(const Function *M,
|
||||||
const MachineRegClassInfo *MRC,
|
const TargetRegClassInfo *MRC,
|
||||||
const ReservedColorListType *RCL = 0);
|
const ReservedColorListType *RCL = 0);
|
||||||
|
|
||||||
inline void createInterferenceGraph() { IG.createGraph(); }
|
inline void createInterferenceGraph() { IG.createGraph(); }
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
class MachineInstrInfo;
|
class MachineInstrInfo;
|
||||||
class MachineInstrDescriptor;
|
class MachineInstrDescriptor;
|
||||||
class MachineSchedInfo;
|
class TargetSchedInfo;
|
||||||
class MachineRegInfo;
|
class TargetRegInfo;
|
||||||
class TargetFrameInfo;
|
class TargetFrameInfo;
|
||||||
class TargetCacheInfo;
|
class TargetCacheInfo;
|
||||||
class TargetOptInfo;
|
class TargetOptInfo;
|
||||||
@ -57,8 +57,8 @@ public:
|
|||||||
// -- Machine-level optimization information (peephole only)
|
// -- Machine-level optimization information (peephole only)
|
||||||
//
|
//
|
||||||
virtual const MachineInstrInfo& getInstrInfo() const = 0;
|
virtual const MachineInstrInfo& getInstrInfo() const = 0;
|
||||||
virtual const MachineSchedInfo& getSchedInfo() const = 0;
|
virtual const TargetSchedInfo& getSchedInfo() const = 0;
|
||||||
virtual const MachineRegInfo& getRegInfo() const = 0;
|
virtual const TargetRegInfo& getRegInfo() const = 0;
|
||||||
virtual const TargetFrameInfo& getFrameInfo() const = 0;
|
virtual const TargetFrameInfo& getFrameInfo() const = 0;
|
||||||
virtual const TargetCacheInfo& getCacheInfo() const = 0;
|
virtual const TargetCacheInfo& getCacheInfo() const = 0;
|
||||||
virtual const TargetOptInfo& getOptInfo() const = 0;
|
virtual const TargetOptInfo& getOptInfo() const = 0;
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
//===-- llvm/Target/RegInfo.h - Target Register Information ------*- C++ -*-==//
|
//===-- llvm/Target/TargetRegInfo.h - Target Register Info -------*- C++ -*-==//
|
||||||
//
|
//
|
||||||
// This file is used to describe the register system of a target to the
|
// This file is used to describe the register system of a target to the
|
||||||
// register allocator.
|
// register allocator.
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_TARGET_MACHINEREGINFO_H
|
#ifndef LLVM_TARGET_TARGETREGINFO_H
|
||||||
#define LLVM_TARGET_MACHINEREGINFO_H
|
#define LLVM_TARGET_TARGETREGINFO_H
|
||||||
|
|
||||||
#include "Support/NonCopyable.h"
|
#include "Support/NonCopyable.h"
|
||||||
#include "Support/hash_map"
|
#include "Support/hash_map"
|
||||||
@ -24,17 +24,11 @@ class MachineInstr;
|
|||||||
class PhyRegAlloc;
|
class PhyRegAlloc;
|
||||||
class BasicBlock;
|
class BasicBlock;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
// class MachineRegClassInfo
|
/// Interface to description of machine register class (e.g., int reg class
|
||||||
//
|
/// float reg class etc)
|
||||||
// Purpose:
|
///
|
||||||
// Interface to description of machine register class (e.g., int reg class
|
class TargetRegClassInfo {
|
||||||
// float reg class etc)
|
|
||||||
//
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
|
||||||
class MachineRegClassInfo {
|
|
||||||
protected:
|
protected:
|
||||||
const unsigned RegClassID; // integer ID of a reg class
|
const unsigned RegClassID; // integer ID of a reg class
|
||||||
const unsigned NumOfAvailRegs; // # of avail for coloring -without SP etc.
|
const unsigned NumOfAvailRegs; // # of avail for coloring -without SP etc.
|
||||||
@ -51,31 +45,26 @@ public:
|
|||||||
std::vector<bool> &IsColorUsedArr) const = 0;
|
std::vector<bool> &IsColorUsedArr) const = 0;
|
||||||
virtual bool isRegVolatile(int Reg) const = 0;
|
virtual bool isRegVolatile(int Reg) const = 0;
|
||||||
|
|
||||||
MachineRegClassInfo(unsigned ID, unsigned NVR, unsigned NAR)
|
TargetRegClassInfo(unsigned ID, unsigned NVR, unsigned NAR)
|
||||||
: RegClassID(ID), NumOfAvailRegs(NVR), NumOfAllRegs(NAR) {}
|
: RegClassID(ID), NumOfAvailRegs(NVR), NumOfAllRegs(NAR) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// class MachineRegInfo
|
/// TargetRegInfo - Interface to register info of target machine
|
||||||
//
|
///
|
||||||
// Purpose:
|
class TargetRegInfo : public NonCopyableV {
|
||||||
// Interface to register info of target machine
|
|
||||||
//
|
|
||||||
//--------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class MachineRegInfo : public NonCopyableV {
|
|
||||||
protected:
|
protected:
|
||||||
// A vector of all machine register classes
|
// A vector of all machine register classes
|
||||||
//
|
//
|
||||||
std::vector<const MachineRegClassInfo *> MachineRegClassArr;
|
std::vector<const TargetRegClassInfo *> MachineRegClassArr;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const TargetMachine ⌖
|
const TargetMachine ⌖
|
||||||
|
|
||||||
MachineRegInfo(const TargetMachine& tgt) : target(tgt) { }
|
TargetRegInfo(const TargetMachine& tgt) : target(tgt) { }
|
||||||
~MachineRegInfo() {
|
~TargetRegInfo() {
|
||||||
for (unsigned i = 0, e = MachineRegClassArr.size(); i != e; ++i)
|
for (unsigned i = 0, e = MachineRegClassArr.size(); i != e; ++i)
|
||||||
delete MachineRegClassArr[i];
|
delete MachineRegClassArr[i];
|
||||||
}
|
}
|
||||||
@ -96,7 +85,7 @@ public:
|
|||||||
return MachineRegClassArr.size();
|
return MachineRegClassArr.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
const MachineRegClassInfo *getMachineRegClass(unsigned i) const {
|
const TargetRegClassInfo *getMachineRegClass(unsigned i) const {
|
||||||
return MachineRegClassArr[i];
|
return MachineRegClassArr[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +125,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// The following methods are used to generate "copy" machine instructions
|
// The following methods are used to generate "copy" machine instructions
|
||||||
// for an architecture. Currently they are used in MachineRegClass
|
// for an architecture. Currently they are used in TargetRegClass
|
||||||
// interface. However, they can be moved to MachineInstrInfo interface if
|
// interface. However, they can be moved to MachineInstrInfo interface if
|
||||||
// necessary.
|
// necessary.
|
||||||
//
|
//
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
//===- Target/MachineSchedInfo.h - Target Instruction Sched Info -*- C++ -*-==//
|
//===- Target/TargetSchedInfo.h - Target Instruction Sched Info --*- C++ -*-==//
|
||||||
//
|
//
|
||||||
// This file describes the target machine to the instruction scheduler.
|
// This file describes the target machine to the instruction scheduler.
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#ifndef LLVM_TARGET_MACHINESCHEDINFO_H
|
#ifndef LLVM_TARGET_TARGETSCHEDINFO_H
|
||||||
#define LLVM_TARGET_MACHINESCHEDINFO_H
|
#define LLVM_TARGET_TARGETSCHEDINFO_H
|
||||||
|
|
||||||
#include "llvm/Target/MachineInstrInfo.h"
|
#include "llvm/Target/MachineInstrInfo.h"
|
||||||
#include "Support/hash_map"
|
#include "Support/hash_map"
|
||||||
@ -164,19 +164,15 @@ private:
|
|||||||
feasibleSlots.resize(maxNumSlots);
|
feasibleSlots.resize(maxNumSlots);
|
||||||
}
|
}
|
||||||
|
|
||||||
friend class MachineSchedInfo; // give access to these functions
|
friend class TargetSchedInfo; // give access to these functions
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// class MachineSchedInfo
|
/// TargetSchedInfo - Common interface to machine information for
|
||||||
//
|
/// instruction scheduling
|
||||||
// Purpose:
|
///
|
||||||
// Common interface to machine information for instruction scheduling
|
struct TargetSchedInfo {
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
class MachineSchedInfo {
|
|
||||||
public:
|
|
||||||
const TargetMachine& target;
|
const TargetMachine& target;
|
||||||
|
|
||||||
unsigned maxNumIssueTotal;
|
unsigned maxNumIssueTotal;
|
||||||
@ -203,17 +199,17 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MachineSchedInfo(const MachineSchedInfo &); // DO NOT IMPLEMENT
|
TargetSchedInfo(const TargetSchedInfo &); // DO NOT IMPLEMENT
|
||||||
void operator=(const MachineSchedInfo &); // DO NOT IMPLEMENT
|
void operator=(const TargetSchedInfo &); // DO NOT IMPLEMENT
|
||||||
public:
|
public:
|
||||||
/*ctor*/ MachineSchedInfo (const TargetMachine& tgt,
|
/*ctor*/ TargetSchedInfo (const TargetMachine& tgt,
|
||||||
int _numSchedClasses,
|
int _numSchedClasses,
|
||||||
const InstrClassRUsage* _classRUsages,
|
const InstrClassRUsage* _classRUsages,
|
||||||
const InstrRUsageDelta* _usageDeltas,
|
const InstrRUsageDelta* _usageDeltas,
|
||||||
const InstrIssueDelta* _issueDeltas,
|
const InstrIssueDelta* _issueDeltas,
|
||||||
unsigned _numUsageDeltas,
|
unsigned _numUsageDeltas,
|
||||||
unsigned _numIssueDeltas);
|
unsigned _numIssueDeltas);
|
||||||
/*dtor*/ virtual ~MachineSchedInfo () {}
|
/*dtor*/ virtual ~TargetSchedInfo() {}
|
||||||
|
|
||||||
inline const MachineInstrInfo& getInstrInfo() const {
|
inline const MachineInstrInfo& getInstrInfo() const {
|
||||||
return *mii;
|
return *mii;
|
||||||
|
@ -340,8 +340,8 @@ public:
|
|||||||
|
|
||||||
class SchedulingManager: public NonCopyable {
|
class SchedulingManager: public NonCopyable {
|
||||||
public: // publicly accessible data members
|
public: // publicly accessible data members
|
||||||
const unsigned int nslots;
|
const unsigned nslots;
|
||||||
const MachineSchedInfo& schedInfo;
|
const TargetSchedInfo& schedInfo;
|
||||||
SchedPriorities& schedPrio;
|
SchedPriorities& schedPrio;
|
||||||
InstrSchedule isched;
|
InstrSchedule isched;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "llvm/CodeGen/InstrSelection.h"
|
#include "llvm/CodeGen/InstrSelection.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/MachineInstrInfo.h"
|
#include "llvm/Target/MachineInstrInfo.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "SchedGraph.h"
|
#include "SchedGraph.h"
|
||||||
#include "llvm/CodeGen/InstrScheduling.h"
|
#include "llvm/CodeGen/InstrScheduling.h"
|
||||||
#include "llvm/Target/MachineSchedInfo.h"
|
#include "llvm/Target/TargetSchedInfo.h"
|
||||||
#include "Support/hash_set"
|
#include "Support/hash_set"
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/iPHINode.h"
|
#include "llvm/iPHINode.h"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include "llvm/Target/MachineInstrInfo.h"
|
#include "llvm/Target/MachineInstrInfo.h"
|
||||||
#include "llvm/Constants.h"
|
#include "llvm/Constants.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
class LiveRange;
|
class LiveRange;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
class RegClass;
|
class RegClass;
|
||||||
class MachineRegInfo;
|
class TargetRegInfo;
|
||||||
class TargetMachine;
|
class TargetMachine;
|
||||||
class Value;
|
class Value;
|
||||||
class Function;
|
class Function;
|
||||||
@ -50,7 +50,7 @@ class LiveRangeInfo {
|
|||||||
|
|
||||||
std::vector<RegClass *> & RegClassList;// vector containing register classess
|
std::vector<RegClass *> & RegClassList;// vector containing register classess
|
||||||
|
|
||||||
const MachineRegInfo& MRI; // machine reg info
|
const TargetRegInfo& MRI; // machine reg info
|
||||||
|
|
||||||
std::vector<MachineInstr*> CallRetInstrList; // a list of all call/ret instrs
|
std::vector<MachineInstr*> CallRetInstrList; // a list of all call/ret instrs
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
=====
|
=====
|
||||||
|
|
||||||
* RegisterClasses: Each RegClass accepts a
|
* RegisterClasses: Each RegClass accepts a
|
||||||
MachineRegClass which contains machine specific info about that register
|
TargetRegClass which contains machine specific info about that register
|
||||||
class. The code in the RegClass is machine independent and they use
|
class. The code in the RegClass is machine independent and they use
|
||||||
access functions in the MachineRegClass object passed into it to get
|
access functions in the TargetRegClass object passed into it to get
|
||||||
machine specific info.
|
machine specific info.
|
||||||
|
|
||||||
* Machine dependent work: All parts of the register coloring algorithm
|
* Machine dependent work: All parts of the register coloring algorithm
|
||||||
@ -24,7 +24,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
class MachineFunction;
|
class MachineFunction;
|
||||||
class MachineRegInfo;
|
class TargetRegInfo;
|
||||||
class FunctionLiveVarInfo;
|
class FunctionLiveVarInfo;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
class LoopInfo;
|
class LoopInfo;
|
||||||
@ -57,7 +57,7 @@ class PhyRegAlloc: public NonCopyable {
|
|||||||
FunctionLiveVarInfo *const LVI; // LV information for this method
|
FunctionLiveVarInfo *const LVI; // LV information for this method
|
||||||
// (already computed for BBs)
|
// (already computed for BBs)
|
||||||
LiveRangeInfo LRI; // LR info (will be computed)
|
LiveRangeInfo LRI; // LR info (will be computed)
|
||||||
const MachineRegInfo &MRI; // Machine Register information
|
const TargetRegInfo &MRI; // Machine Register information
|
||||||
const unsigned NumOfRegClasses; // recorded here for efficiency
|
const unsigned NumOfRegClasses; // recorded here for efficiency
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ using std::cerr;
|
|||||||
// createInterferenceGraph() above.
|
// createInterferenceGraph() above.
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
RegClass::RegClass(const Function *M,
|
RegClass::RegClass(const Function *M,
|
||||||
const MachineRegClassInfo *Mrc,
|
const TargetRegClassInfo *Mrc,
|
||||||
const ReservedColorListType *RCL)
|
const ReservedColorListType *RCL)
|
||||||
: Meth(M), MRC(Mrc), RegClassID( Mrc->getRegClassID() ),
|
: Meth(M), MRC(Mrc), RegClassID( Mrc->getRegClassID() ),
|
||||||
IG(this), IGNodeStack(), ReservedColorList(RCL) {
|
IG(this), IGNodeStack(), ReservedColorList(RCL) {
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
#define REG_CLASS_H
|
#define REG_CLASS_H
|
||||||
|
|
||||||
#include "llvm/CodeGen/InterferenceGraph.h"
|
#include "llvm/CodeGen/InterferenceGraph.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include <stack>
|
#include <stack>
|
||||||
class MachineRegClassInfo;
|
class TargetRegClassInfo;
|
||||||
|
|
||||||
typedef std::vector<unsigned> ReservedColorListType;
|
typedef std::vector<unsigned> ReservedColorListType;
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ typedef std::vector<unsigned> ReservedColorListType;
|
|||||||
// This is the class that contains all data structures and common algos
|
// This is the class that contains all data structures and common algos
|
||||||
// for coloring a particular register class (e.g., int class, fp class).
|
// for coloring a particular register class (e.g., int class, fp class).
|
||||||
// This class is hardware independent. This class accepts a hardware
|
// This class is hardware independent. This class accepts a hardware
|
||||||
// dependent description of machine registers (MachineRegInfo class) to
|
// dependent description of machine registers (TargetRegInfo class) to
|
||||||
// get hardware specific info and to color an individual IG node.
|
// get hardware specific info and to color an individual IG node.
|
||||||
//
|
//
|
||||||
// This class contains the InterferenceGraph (IG).
|
// This class contains the InterferenceGraph (IG).
|
||||||
@ -35,7 +35,7 @@ typedef std::vector<unsigned> ReservedColorListType;
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
class RegClass {
|
class RegClass {
|
||||||
const Function *const Meth; // Function we are working on
|
const Function *const Meth; // Function we are working on
|
||||||
const MachineRegClassInfo *const MRC; // corresponding MRC
|
const TargetRegClassInfo *const MRC; // corresponding MRC
|
||||||
const unsigned RegClassID; // my int ID
|
const unsigned RegClassID; // my int ID
|
||||||
|
|
||||||
InterferenceGraph IG; // Interference graph - constructed by
|
InterferenceGraph IG; // Interference graph - constructed by
|
||||||
@ -69,7 +69,7 @@ class RegClass {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
RegClass(const Function *M,
|
RegClass(const Function *M,
|
||||||
const MachineRegClassInfo *MRC,
|
const TargetRegClassInfo *MRC,
|
||||||
const ReservedColorListType *RCL = 0);
|
const ReservedColorListType *RCL = 0);
|
||||||
|
|
||||||
inline void createInterferenceGraph() { IG.createGraph(); }
|
inline void createInterferenceGraph() { IG.createGraph(); }
|
||||||
|
@ -340,8 +340,8 @@ public:
|
|||||||
|
|
||||||
class SchedulingManager: public NonCopyable {
|
class SchedulingManager: public NonCopyable {
|
||||||
public: // publicly accessible data members
|
public: // publicly accessible data members
|
||||||
const unsigned int nslots;
|
const unsigned nslots;
|
||||||
const MachineSchedInfo& schedInfo;
|
const TargetSchedInfo& schedInfo;
|
||||||
SchedPriorities& schedPrio;
|
SchedPriorities& schedPrio;
|
||||||
InstrSchedule isched;
|
InstrSchedule isched;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "llvm/CodeGen/InstrSelection.h"
|
#include "llvm/CodeGen/InstrSelection.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/MachineInstrInfo.h"
|
#include "llvm/Target/MachineInstrInfo.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "SchedGraph.h"
|
#include "SchedGraph.h"
|
||||||
#include "llvm/CodeGen/InstrScheduling.h"
|
#include "llvm/CodeGen/InstrScheduling.h"
|
||||||
#include "llvm/Target/MachineSchedInfo.h"
|
#include "llvm/Target/TargetSchedInfo.h"
|
||||||
#include "Support/hash_set"
|
#include "Support/hash_set"
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
#include "llvm/CodeGen/MachineCodeForInstruction.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
#include "llvm/iPHINode.h"
|
#include "llvm/iPHINode.h"
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/InstrForest.h"
|
#include "llvm/CodeGen/InstrForest.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include "llvm/Target/MachineInstrInfo.h"
|
#include "llvm/Target/MachineInstrInfo.h"
|
||||||
#include "llvm/Constants.h"
|
#include "llvm/Constants.h"
|
||||||
#include "llvm/Function.h"
|
#include "llvm/Function.h"
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
class LiveRange;
|
class LiveRange;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
class RegClass;
|
class RegClass;
|
||||||
class MachineRegInfo;
|
class TargetRegInfo;
|
||||||
class TargetMachine;
|
class TargetMachine;
|
||||||
class Value;
|
class Value;
|
||||||
class Function;
|
class Function;
|
||||||
@ -50,7 +50,7 @@ class LiveRangeInfo {
|
|||||||
|
|
||||||
std::vector<RegClass *> & RegClassList;// vector containing register classess
|
std::vector<RegClass *> & RegClassList;// vector containing register classess
|
||||||
|
|
||||||
const MachineRegInfo& MRI; // machine reg info
|
const TargetRegInfo& MRI; // machine reg info
|
||||||
|
|
||||||
std::vector<MachineInstr*> CallRetInstrList; // a list of all call/ret instrs
|
std::vector<MachineInstr*> CallRetInstrList; // a list of all call/ret instrs
|
||||||
|
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
=====
|
=====
|
||||||
|
|
||||||
* RegisterClasses: Each RegClass accepts a
|
* RegisterClasses: Each RegClass accepts a
|
||||||
MachineRegClass which contains machine specific info about that register
|
TargetRegClass which contains machine specific info about that register
|
||||||
class. The code in the RegClass is machine independent and they use
|
class. The code in the RegClass is machine independent and they use
|
||||||
access functions in the MachineRegClass object passed into it to get
|
access functions in the TargetRegClass object passed into it to get
|
||||||
machine specific info.
|
machine specific info.
|
||||||
|
|
||||||
* Machine dependent work: All parts of the register coloring algorithm
|
* Machine dependent work: All parts of the register coloring algorithm
|
||||||
@ -24,7 +24,7 @@
|
|||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
class MachineFunction;
|
class MachineFunction;
|
||||||
class MachineRegInfo;
|
class TargetRegInfo;
|
||||||
class FunctionLiveVarInfo;
|
class FunctionLiveVarInfo;
|
||||||
class MachineInstr;
|
class MachineInstr;
|
||||||
class LoopInfo;
|
class LoopInfo;
|
||||||
@ -57,7 +57,7 @@ class PhyRegAlloc: public NonCopyable {
|
|||||||
FunctionLiveVarInfo *const LVI; // LV information for this method
|
FunctionLiveVarInfo *const LVI; // LV information for this method
|
||||||
// (already computed for BBs)
|
// (already computed for BBs)
|
||||||
LiveRangeInfo LRI; // LR info (will be computed)
|
LiveRangeInfo LRI; // LR info (will be computed)
|
||||||
const MachineRegInfo &MRI; // Machine Register information
|
const TargetRegInfo &MRI; // Machine Register information
|
||||||
const unsigned NumOfRegClasses; // recorded here for efficiency
|
const unsigned NumOfRegClasses; // recorded here for efficiency
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ using std::cerr;
|
|||||||
// createInterferenceGraph() above.
|
// createInterferenceGraph() above.
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
RegClass::RegClass(const Function *M,
|
RegClass::RegClass(const Function *M,
|
||||||
const MachineRegClassInfo *Mrc,
|
const TargetRegClassInfo *Mrc,
|
||||||
const ReservedColorListType *RCL)
|
const ReservedColorListType *RCL)
|
||||||
: Meth(M), MRC(Mrc), RegClassID( Mrc->getRegClassID() ),
|
: Meth(M), MRC(Mrc), RegClassID( Mrc->getRegClassID() ),
|
||||||
IG(this), IGNodeStack(), ReservedColorList(RCL) {
|
IG(this), IGNodeStack(), ReservedColorList(RCL) {
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
#define REG_CLASS_H
|
#define REG_CLASS_H
|
||||||
|
|
||||||
#include "llvm/CodeGen/InterferenceGraph.h"
|
#include "llvm/CodeGen/InterferenceGraph.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include <stack>
|
#include <stack>
|
||||||
class MachineRegClassInfo;
|
class TargetRegClassInfo;
|
||||||
|
|
||||||
typedef std::vector<unsigned> ReservedColorListType;
|
typedef std::vector<unsigned> ReservedColorListType;
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ typedef std::vector<unsigned> ReservedColorListType;
|
|||||||
// This is the class that contains all data structures and common algos
|
// This is the class that contains all data structures and common algos
|
||||||
// for coloring a particular register class (e.g., int class, fp class).
|
// for coloring a particular register class (e.g., int class, fp class).
|
||||||
// This class is hardware independent. This class accepts a hardware
|
// This class is hardware independent. This class accepts a hardware
|
||||||
// dependent description of machine registers (MachineRegInfo class) to
|
// dependent description of machine registers (TargetRegInfo class) to
|
||||||
// get hardware specific info and to color an individual IG node.
|
// get hardware specific info and to color an individual IG node.
|
||||||
//
|
//
|
||||||
// This class contains the InterferenceGraph (IG).
|
// This class contains the InterferenceGraph (IG).
|
||||||
@ -35,7 +35,7 @@ typedef std::vector<unsigned> ReservedColorListType;
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
class RegClass {
|
class RegClass {
|
||||||
const Function *const Meth; // Function we are working on
|
const Function *const Meth; // Function we are working on
|
||||||
const MachineRegClassInfo *const MRC; // corresponding MRC
|
const TargetRegClassInfo *const MRC; // corresponding MRC
|
||||||
const unsigned RegClassID; // my int ID
|
const unsigned RegClassID; // my int ID
|
||||||
|
|
||||||
InterferenceGraph IG; // Interference graph - constructed by
|
InterferenceGraph IG; // Interference graph - constructed by
|
||||||
@ -69,7 +69,7 @@ class RegClass {
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
RegClass(const Function *M,
|
RegClass(const Function *M,
|
||||||
const MachineRegClassInfo *MRC,
|
const TargetRegClassInfo *MRC,
|
||||||
const ReservedColorListType *RCL = 0);
|
const ReservedColorListType *RCL = 0);
|
||||||
|
|
||||||
inline void createInterferenceGraph() { IG.createGraph(); }
|
inline void createInterferenceGraph() { IG.createGraph(); }
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
#define SPARC_INTERNALS_H
|
#define SPARC_INTERNALS_H
|
||||||
|
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "llvm/Target/MachineSchedInfo.h"
|
#include "llvm/Target/TargetSchedInfo.h"
|
||||||
#include "llvm/Target/TargetFrameInfo.h"
|
#include "llvm/Target/TargetFrameInfo.h"
|
||||||
#include "llvm/Target/TargetCacheInfo.h"
|
#include "llvm/Target/TargetCacheInfo.h"
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include "llvm/Target/TargetOptInfo.h"
|
#include "llvm/Target/TargetOptInfo.h"
|
||||||
#include "llvm/Type.h"
|
#include "llvm/Type.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -211,11 +211,11 @@ struct UltraSparcInstrInfo : public MachineInstrInfo {
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// class UltraSparcRegInfo
|
// class UltraSparcRegInfo
|
||||||
//
|
//
|
||||||
// This class implements the virtual class MachineRegInfo for Sparc.
|
// This class implements the virtual class TargetRegInfo for Sparc.
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
class UltraSparcRegInfo : public MachineRegInfo {
|
class UltraSparcRegInfo : public TargetRegInfo {
|
||||||
// The actual register classes in the Sparc
|
// The actual register classes in the Sparc
|
||||||
//
|
//
|
||||||
enum RegClassIDs {
|
enum RegClassIDs {
|
||||||
@ -511,7 +511,7 @@ public:
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
class UltraSparcSchedInfo: public MachineSchedInfo {
|
class UltraSparcSchedInfo: public TargetSchedInfo {
|
||||||
public:
|
public:
|
||||||
UltraSparcSchedInfo(const TargetMachine &tgt);
|
UltraSparcSchedInfo(const TargetMachine &tgt);
|
||||||
protected:
|
protected:
|
||||||
@ -734,8 +734,8 @@ public:
|
|||||||
UltraSparc();
|
UltraSparc();
|
||||||
|
|
||||||
virtual const MachineInstrInfo &getInstrInfo() const { return instrInfo; }
|
virtual const MachineInstrInfo &getInstrInfo() const { return instrInfo; }
|
||||||
virtual const MachineSchedInfo &getSchedInfo() const { return schedInfo; }
|
virtual const TargetSchedInfo &getSchedInfo() const { return schedInfo; }
|
||||||
virtual const MachineRegInfo &getRegInfo() const { return regInfo; }
|
virtual const TargetRegInfo &getRegInfo() const { return regInfo; }
|
||||||
virtual const TargetFrameInfo &getFrameInfo() const { return frameInfo; }
|
virtual const TargetFrameInfo &getFrameInfo() const { return frameInfo; }
|
||||||
virtual const TargetCacheInfo &getCacheInfo() const { return cacheInfo; }
|
virtual const TargetCacheInfo &getCacheInfo() const { return cacheInfo; }
|
||||||
virtual const TargetOptInfo &getOptInfo() const { return optInfo; }
|
virtual const TargetOptInfo &getOptInfo() const { return optInfo; }
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#ifndef SPARC_REG_CLASS_INFO_H
|
#ifndef SPARC_REG_CLASS_INFO_H
|
||||||
#define SPARC_REG_CLASS_INFO_H
|
#define SPARC_REG_CLASS_INFO_H
|
||||||
|
|
||||||
#include "llvm/Target/MachineRegInfo.h"
|
#include "llvm/Target/TargetRegInfo.h"
|
||||||
#include "llvm/CodeGen/IGNode.h"
|
#include "llvm/CodeGen/IGNode.h"
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -15,9 +15,9 @@
|
|||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
struct SparcIntRegClass : public MachineRegClassInfo {
|
struct SparcIntRegClass : public TargetRegClassInfo {
|
||||||
SparcIntRegClass(unsigned ID)
|
SparcIntRegClass(unsigned ID)
|
||||||
: MachineRegClassInfo(ID, NumOfAvailRegs, NumOfAllRegs) { }
|
: TargetRegClassInfo(ID, NumOfAvailRegs, NumOfAllRegs) { }
|
||||||
|
|
||||||
void colorIGNode(IGNode *Node, std::vector<bool> &IsColorUsedArr) const;
|
void colorIGNode(IGNode *Node, std::vector<bool> &IsColorUsedArr) const;
|
||||||
|
|
||||||
@ -73,12 +73,12 @@ struct SparcIntRegClass : public MachineRegClassInfo {
|
|||||||
// Float Register Class
|
// Float Register Class
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
class SparcFloatRegClass : public MachineRegClassInfo {
|
class SparcFloatRegClass : public TargetRegClassInfo {
|
||||||
int findFloatColor(const LiveRange *LR, unsigned Start,
|
int findFloatColor(const LiveRange *LR, unsigned Start,
|
||||||
unsigned End, std::vector<bool> &IsColorUsedArr) const;
|
unsigned End, std::vector<bool> &IsColorUsedArr) const;
|
||||||
public:
|
public:
|
||||||
SparcFloatRegClass(unsigned ID)
|
SparcFloatRegClass(unsigned ID)
|
||||||
: MachineRegClassInfo(ID, NumOfAvailRegs, NumOfAllRegs) {}
|
: TargetRegClassInfo(ID, NumOfAvailRegs, NumOfAllRegs) {}
|
||||||
|
|
||||||
void colorIGNode(IGNode *Node, std::vector<bool> &IsColorUsedArr) const;
|
void colorIGNode(IGNode *Node, std::vector<bool> &IsColorUsedArr) const;
|
||||||
|
|
||||||
@ -119,9 +119,9 @@ public:
|
|||||||
// allocated for two names.
|
// allocated for two names.
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
struct SparcIntCCRegClass : public MachineRegClassInfo {
|
struct SparcIntCCRegClass : public TargetRegClassInfo {
|
||||||
SparcIntCCRegClass(unsigned ID)
|
SparcIntCCRegClass(unsigned ID)
|
||||||
: MachineRegClassInfo(ID, 1, 2) { }
|
: TargetRegClassInfo(ID, 1, 2) { }
|
||||||
|
|
||||||
void colorIGNode(IGNode *Node, std::vector<bool> &IsColorUsedArr) const {
|
void colorIGNode(IGNode *Node, std::vector<bool> &IsColorUsedArr) const {
|
||||||
if (IsColorUsedArr[0])
|
if (IsColorUsedArr[0])
|
||||||
@ -149,9 +149,9 @@ struct SparcIntCCRegClass : public MachineRegClassInfo {
|
|||||||
// Only 4 Float CC registers are available
|
// Only 4 Float CC registers are available
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
struct SparcFloatCCRegClass : public MachineRegClassInfo {
|
struct SparcFloatCCRegClass : public TargetRegClassInfo {
|
||||||
SparcFloatCCRegClass(unsigned ID)
|
SparcFloatCCRegClass(unsigned ID)
|
||||||
: MachineRegClassInfo(ID, 4, 4) { }
|
: TargetRegClassInfo(ID, 4, 4) { }
|
||||||
|
|
||||||
void colorIGNode(IGNode *Node, std::vector<bool> &IsColorUsedArr) const {
|
void colorIGNode(IGNode *Node, std::vector<bool> &IsColorUsedArr) const {
|
||||||
for(unsigned c = 0; c != 4; ++c)
|
for(unsigned c = 0; c != 4; ++c)
|
||||||
|
@ -25,7 +25,7 @@ using std::cerr;
|
|||||||
using std::vector;
|
using std::vector;
|
||||||
|
|
||||||
UltraSparcRegInfo::UltraSparcRegInfo(const UltraSparc &tgt)
|
UltraSparcRegInfo::UltraSparcRegInfo(const UltraSparc &tgt)
|
||||||
: MachineRegInfo(tgt), NumOfIntArgRegs(6),
|
: TargetRegInfo(tgt), NumOfIntArgRegs(6),
|
||||||
NumOfFloatArgRegs(32), InvalidRegNum(1000) {
|
NumOfFloatArgRegs(32), InvalidRegNum(1000) {
|
||||||
|
|
||||||
MachineRegClassArr.push_back(new SparcIntRegClass(IntRegClassID));
|
MachineRegClassArr.push_back(new SparcIntRegClass(IntRegClassID));
|
||||||
|
@ -700,12 +700,12 @@ static const InstrRUsageDelta SparcInstrUsageDeltas[] = {
|
|||||||
// Purpose:
|
// Purpose:
|
||||||
// Scheduling information for the UltraSPARC.
|
// Scheduling information for the UltraSPARC.
|
||||||
// Primarily just initializes machine-dependent parameters in
|
// Primarily just initializes machine-dependent parameters in
|
||||||
// class MachineSchedInfo.
|
// class TargetSchedInfo.
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
/*ctor*/
|
/*ctor*/
|
||||||
UltraSparcSchedInfo::UltraSparcSchedInfo(const TargetMachine& tgt)
|
UltraSparcSchedInfo::UltraSparcSchedInfo(const TargetMachine& tgt)
|
||||||
: MachineSchedInfo(tgt,
|
: TargetSchedInfo(tgt,
|
||||||
(unsigned int) SPARC_NUM_SCHED_CLASSES,
|
(unsigned int) SPARC_NUM_SCHED_CLASSES,
|
||||||
SparcRUsageDesc,
|
SparcRUsageDesc,
|
||||||
SparcInstrUsageDeltas,
|
SparcInstrUsageDeltas,
|
||||||
@ -733,8 +733,8 @@ UltraSparcSchedInfo::UltraSparcSchedInfo(const TargetMachine& tgt)
|
|||||||
void
|
void
|
||||||
UltraSparcSchedInfo::initializeResources()
|
UltraSparcSchedInfo::initializeResources()
|
||||||
{
|
{
|
||||||
// Compute MachineSchedInfo::instrRUsages and MachineSchedInfo::issueGaps
|
// Compute TargetSchedInfo::instrRUsages and TargetSchedInfo::issueGaps
|
||||||
MachineSchedInfo::initializeResources();
|
TargetSchedInfo::initializeResources();
|
||||||
|
|
||||||
// Machine-dependent fixups go here. None for now.
|
// Machine-dependent fixups go here. None for now.
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "llvm/Target/MachineSchedInfo.h"
|
#include "llvm/Target/TargetSchedInfo.h"
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
|
|
||||||
resourceId_t MachineResource::nextId = 0;
|
resourceId_t MachineResource::nextId = 0;
|
||||||
@ -69,17 +69,17 @@ ComputeMinGap(const InstrRUsage &fromRU,
|
|||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// class MachineSchedInfo
|
// class TargetSchedInfo
|
||||||
// Interface to machine description for instruction scheduling
|
// Interface to machine description for instruction scheduling
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
MachineSchedInfo::MachineSchedInfo(const TargetMachine& tgt,
|
TargetSchedInfo::TargetSchedInfo(const TargetMachine& tgt,
|
||||||
int NumSchedClasses,
|
int NumSchedClasses,
|
||||||
const InstrClassRUsage* ClassRUsages,
|
const InstrClassRUsage* ClassRUsages,
|
||||||
const InstrRUsageDelta* UsageDeltas,
|
const InstrRUsageDelta* UsageDeltas,
|
||||||
const InstrIssueDelta* IssueDeltas,
|
const InstrIssueDelta* IssueDeltas,
|
||||||
unsigned int NumUsageDeltas,
|
unsigned NumUsageDeltas,
|
||||||
unsigned int NumIssueDeltas)
|
unsigned NumIssueDeltas)
|
||||||
: target(tgt),
|
: target(tgt),
|
||||||
numSchedClasses(NumSchedClasses), mii(& tgt.getInstrInfo()),
|
numSchedClasses(NumSchedClasses), mii(& tgt.getInstrInfo()),
|
||||||
classRUsages(ClassRUsages), usageDeltas(UsageDeltas),
|
classRUsages(ClassRUsages), usageDeltas(UsageDeltas),
|
||||||
@ -88,7 +88,7 @@ MachineSchedInfo::MachineSchedInfo(const TargetMachine& tgt,
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
void
|
void
|
||||||
MachineSchedInfo::initializeResources()
|
TargetSchedInfo::initializeResources()
|
||||||
{
|
{
|
||||||
assert(MAX_NUM_SLOTS >= (int)getMaxNumIssueTotal()
|
assert(MAX_NUM_SLOTS >= (int)getMaxNumIssueTotal()
|
||||||
&& "Insufficient slots for static data! Increase MAX_NUM_SLOTS");
|
&& "Insufficient slots for static data! Increase MAX_NUM_SLOTS");
|
||||||
@ -111,7 +111,7 @@ MachineSchedInfo::initializeResources()
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MachineSchedInfo::computeInstrResources(const std::vector<InstrRUsage>&
|
TargetSchedInfo::computeInstrResources(const std::vector<InstrRUsage>&
|
||||||
instrRUForClasses)
|
instrRUForClasses)
|
||||||
{
|
{
|
||||||
int numOpCodes = mii->getNumRealOpCodes();
|
int numOpCodes = mii->getNumRealOpCodes();
|
||||||
@ -141,7 +141,7 @@ MachineSchedInfo::computeInstrResources(const std::vector<InstrRUsage>&
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
MachineSchedInfo::computeIssueGaps(const std::vector<InstrRUsage>&
|
TargetSchedInfo::computeIssueGaps(const std::vector<InstrRUsage>&
|
||||||
instrRUForClasses)
|
instrRUForClasses)
|
||||||
{
|
{
|
||||||
int numOpCodes = mii->getNumRealOpCodes();
|
int numOpCodes = mii->getNumRealOpCodes();
|
||||||
|
@ -23,8 +23,8 @@ public:
|
|||||||
return &InstrInfo.getRegisterInfo();
|
return &InstrInfo.getRegisterInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const MachineSchedInfo &getSchedInfo() const { abort(); }
|
virtual const TargetSchedInfo &getSchedInfo() const { abort(); }
|
||||||
virtual const MachineRegInfo &getRegInfo() const { abort(); }
|
virtual const TargetRegInfo &getRegInfo() const { abort(); }
|
||||||
virtual const TargetCacheInfo &getCacheInfo() const { abort(); }
|
virtual const TargetCacheInfo &getCacheInfo() const { abort(); }
|
||||||
virtual const TargetOptInfo &getOptInfo() const { abort(); }
|
virtual const TargetOptInfo &getOptInfo() const { abort(); }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user