1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

added a function and a member to the TargetSchedInfo class

which is used  by Modulo Scheduling pass

llvm-svn: 5766
This commit is contained in:
Guochun Shi 2003-04-07 00:00:36 +00:00
parent 62370b42ad
commit 59e61c4ce2

View File

@ -267,6 +267,15 @@ public:
return getInstrRUsage(opCode).numBubbles;
}
inline unsigned getCPUResourceNum(int rd)const{
for(unsigned i=0;i<resourceNumVector.size();i++){
if(resourceNumVector[i].first == rd) return resourceNumVector[i].second;
}
assert( 0&&"resource not found");
return 0;
}
protected:
virtual void initializeResources ();
@ -281,6 +290,9 @@ private:
toGaps[toOp] = gap;
}
public:
std::vector<pair<int,int> > resourceNumVector;
protected:
unsigned numSchedClasses;
const TargetInstrInfo* mii;
@ -294,6 +306,12 @@ protected:
std::vector<std::vector<int> > issueGaps; // indexed by [opcode1][opcode2]
std::vector<std::vector<MachineOpCode> >
conflictLists; // indexed by [opcode]
friend class ModuloSchedGraph;
friend class ModuloScheduling;
};
#endif