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:
parent
62370b42ad
commit
59e61c4ce2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user