[llvm-commits] CVS: llvm/include/llvm/Target/TargetSchedInfo.h

Guochun Shi gshi1 at cs.uiuc.edu
Sun Apr 6 19:01:00 PDT 2003


Changes in directory llvm/include/llvm/Target:

TargetSchedInfo.h updated: 1.14 -> 1.15

---
Log message:

added a function and a member to the TargetSchedInfo class 
which is used  by Modulo Scheduling pass


---
Diffs of the changes:

Index: llvm/include/llvm/Target/TargetSchedInfo.h
diff -u llvm/include/llvm/Target/TargetSchedInfo.h:1.14 llvm/include/llvm/Target/TargetSchedInfo.h:1.15
--- llvm/include/llvm/Target/TargetSchedInfo.h:1.14	Tue Jan 14 15:59:58 2003
+++ llvm/include/llvm/Target/TargetSchedInfo.h	Sun Apr  6 19:00:36 2003
@@ -267,6 +267,15 @@
     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 @@
     toGaps[toOp] = gap;
   }
   
+public:
+  std::vector<pair<int,int> > resourceNumVector;
+  
 protected:
   unsigned	           numSchedClasses;
   const TargetInstrInfo*   mii;
@@ -294,6 +306,12 @@
   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





More information about the llvm-commits mailing list