mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +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;
|
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:
|
protected:
|
||||||
virtual void initializeResources ();
|
virtual void initializeResources ();
|
||||||
|
|
||||||
@ -281,6 +290,9 @@ private:
|
|||||||
toGaps[toOp] = gap;
|
toGaps[toOp] = gap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
std::vector<pair<int,int> > resourceNumVector;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
unsigned numSchedClasses;
|
unsigned numSchedClasses;
|
||||||
const TargetInstrInfo* mii;
|
const TargetInstrInfo* mii;
|
||||||
@ -294,6 +306,12 @@ protected:
|
|||||||
std::vector<std::vector<int> > issueGaps; // indexed by [opcode1][opcode2]
|
std::vector<std::vector<int> > issueGaps; // indexed by [opcode1][opcode2]
|
||||||
std::vector<std::vector<MachineOpCode> >
|
std::vector<std::vector<MachineOpCode> >
|
||||||
conflictLists; // indexed by [opcode]
|
conflictLists; // indexed by [opcode]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
friend class ModuloSchedGraph;
|
||||||
|
friend class ModuloScheduling;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user