aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuochun Shi <gshi1@uiuc.edu>2003-04-07 00:00:36 +0000
committerGuochun Shi <gshi1@uiuc.edu>2003-04-07 00:00:36 +0000
commit681220dc3c80b2485cac895a18e63a028eb0fed0 (patch)
treeefbc50c542a2cecdb4e9bd254b411eb18ec59402
parent105cb77d6fd3f29f3777d07f522bd878fc0b6a21 (diff)
downloadexternal_llvm-681220dc3c80b2485cac895a18e63a028eb0fed0.zip
external_llvm-681220dc3c80b2485cac895a18e63a028eb0fed0.tar.gz
external_llvm-681220dc3c80b2485cac895a18e63a028eb0fed0.tar.bz2
added a function and a member to the TargetSchedInfo class
which is used by Modulo Scheduling pass git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5766 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Target/TargetSchedInfo.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetSchedInfo.h b/include/llvm/Target/TargetSchedInfo.h
index c137565..22d8045 100644
--- a/include/llvm/Target/TargetSchedInfo.h
+++ b/include/llvm/Target/TargetSchedInfo.h
@@ -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