forked from OSchip/llvm-project
Eliminate the distinction between "real" and "unreal" instructions
llvm-svn: 11986
This commit is contained in:
parent
e65125dcdf
commit
f20abac9bc
|
@ -83,27 +83,25 @@ struct TargetInstrDescriptor {
|
|||
///
|
||||
class TargetInstrInfo {
|
||||
const TargetInstrDescriptor* desc; // raw array to allow static init'n
|
||||
unsigned descSize; // number of entries in the desc array
|
||||
unsigned NumOpcodes; // number of entries in the desc array
|
||||
unsigned numRealOpCodes; // number of non-dummy op codes
|
||||
|
||||
TargetInstrInfo(const TargetInstrInfo &); // DO NOT IMPLEMENT
|
||||
void operator=(const TargetInstrInfo &); // DO NOT IMPLEMENT
|
||||
public:
|
||||
TargetInstrInfo(const TargetInstrDescriptor *desc, unsigned descSize,
|
||||
unsigned numRealOpCodes);
|
||||
TargetInstrInfo(const TargetInstrDescriptor *desc, unsigned NumOpcodes);
|
||||
virtual ~TargetInstrInfo();
|
||||
|
||||
// Invariant: All instruction sets use opcode #0 as the PHI instruction
|
||||
enum { PHI = 0 };
|
||||
|
||||
unsigned getNumRealOpCodes() const { return numRealOpCodes; }
|
||||
unsigned getNumTotalOpCodes() const { return descSize; }
|
||||
unsigned getNumOpcodes() const { return NumOpcodes; }
|
||||
|
||||
/// get - Return the machine instruction descriptor that corresponds to the
|
||||
/// specified instruction opcode.
|
||||
///
|
||||
const TargetInstrDescriptor& get(MachineOpCode opCode) const {
|
||||
assert(opCode >= 0 && opCode < (int)descSize);
|
||||
assert((unsigned)opCode < NumOpcodes);
|
||||
return desc[opCode];
|
||||
}
|
||||
|
||||
|
|
|
@ -520,7 +520,7 @@ SchedulingManager::SchedulingManager(const TargetMachine& target,
|
|||
nextEarliestIssueTime(0),
|
||||
choicesForSlot(nslots),
|
||||
numInClass(target.getSchedInfo().getNumSchedClasses(), 0), // set all to 0
|
||||
nextEarliestStartTime(target.getInstrInfo().getNumRealOpCodes(),
|
||||
nextEarliestStartTime(target.getInstrInfo().getNumOpcodes(),
|
||||
(cycles_t) 0) // set all to 0
|
||||
{
|
||||
updateTime(0);
|
||||
|
|
|
@ -119,7 +119,7 @@ void
|
|||
TargetSchedInfo::computeInstrResources(const std::vector<InstrRUsage>&
|
||||
instrRUForClasses)
|
||||
{
|
||||
int numOpCodes = mii->getNumRealOpCodes();
|
||||
int numOpCodes = mii->getNumOpcodes();
|
||||
instrRUsages.resize(numOpCodes);
|
||||
|
||||
// First get the resource usage information from the class resource usages.
|
||||
|
@ -149,7 +149,7 @@ void
|
|||
TargetSchedInfo::computeIssueGaps(const std::vector<InstrRUsage>&
|
||||
instrRUForClasses)
|
||||
{
|
||||
int numOpCodes = mii->getNumRealOpCodes();
|
||||
int numOpCodes = mii->getNumOpcodes();
|
||||
issueGaps.resize(numOpCodes);
|
||||
conflictLists.resize(numOpCodes);
|
||||
|
||||
|
|
Loading…
Reference in New Issue