[llvm-commits] CVS: llvm/include/llvm/CodeGen/PhyRegAlloc.h

Vikram Adve vadve at cs.uiuc.edu
Fri Jul 25 16:01:01 PDT 2003


Changes in directory llvm/include/llvm/CodeGen:

PhyRegAlloc.h updated: 1.42 -> 1.43

---
Log message:

Remove unused field.  Change the way unused regs. are marked and
found to consider regType info (since multiple reg types may share
the same reg class, e.g., single and double on Sparc).


---
Diffs of the changes:

Index: llvm/include/llvm/CodeGen/PhyRegAlloc.h
diff -u llvm/include/llvm/CodeGen/PhyRegAlloc.h:1.42 llvm/include/llvm/CodeGen/PhyRegAlloc.h:1.43
--- llvm/include/llvm/CodeGen/PhyRegAlloc.h:1.42	Sat May 31 02:41:54 2003
+++ llvm/include/llvm/CodeGen/PhyRegAlloc.h	Fri Jul 25 16:00:13 2003
@@ -71,8 +71,6 @@
 
   AddedInstrns AddedInstrAtEntry;       // to store instrns added at entry
   LoopInfo *LoopDepthCalc;              // to calculate loop depths 
-  std::vector<unsigned> ResColList;     // A set of reserved regs if desired.
-                                        // currently not used
 
 public:
   PhyRegAlloc(Function *F, const TargetMachine& TM, FunctionLiveVarInfo *Lvi,
@@ -87,11 +85,11 @@
   // access to register classes by class ID
   // 
   const RegClass*  getRegClassByID(unsigned int id) const {
-                                                    return RegClassList[id];
+    return RegClassList[id];
+  }
+  RegClass*  getRegClassByID(unsigned int id) {
+    return RegClassList[id];
   }
-        RegClass*  getRegClassByID(unsigned int id)       {
-                                                    return RegClassList[id]; }
-  
   
 private:
   void addInterference(const Value *Def, const ValueSet *LVSet, 
@@ -134,11 +132,14 @@
                           std::vector<MachineInstr*>& MIBef,
                           std::vector<MachineInstr*>& MIAft);
   
-  int getUnusedUniRegAtMI(RegClass *RC,  const MachineInstr *MInst, 
-                          const ValueSet *LVSetBef);
+  int getUnusedUniRegAtMI(RegClass *RC, const int RegType,
+                          const MachineInstr *MInst, const ValueSet *LVSetBef);
+
+  void setRelRegsUsedByThisInst(RegClass *RC, const int RegType,
+                                const MachineInstr *MInst );
 
-  void setRelRegsUsedByThisInst(RegClass *RC, const MachineInstr *MInst );
-  int getUniRegNotUsedByThisInst(RegClass *RC, const MachineInstr *MInst);
+  int getUniRegNotUsedByThisInst(RegClass *RC, const int RegType,
+                                 const MachineInstr *MInst);
 
   void addInterf4PseudoInstr(const MachineInstr *MInst);
 };





More information about the llvm-commits mailing list