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

Chris Lattner lattner at cs.uiuc.edu
Tue Oct 29 11:09:02 PST 2002


Changes in directory llvm/include/llvm/CodeGen:

PhyRegAlloc.h updated: 1.38 -> 1.39

---
Log message:

Remove #include, misleading comment, and a typedef used only once


---
Diffs of the changes:

Index: llvm/include/llvm/CodeGen/PhyRegAlloc.h
diff -u llvm/include/llvm/CodeGen/PhyRegAlloc.h:1.38 llvm/include/llvm/CodeGen/PhyRegAlloc.h:1.39
--- llvm/include/llvm/CodeGen/PhyRegAlloc.h:1.38	Mon Oct 28 13:43:23 2002
+++ llvm/include/llvm/CodeGen/PhyRegAlloc.h	Tue Oct 29 11:08:05 2002
@@ -14,17 +14,6 @@
 
  * Machine dependent work: All parts of the register coloring algorithm
    except coloring of an individual node are machine independent.
-
-   Register allocation must be done  as:	
-
-      FunctionLiveVarInfo LVI(*FunctionI );           // compute LV info
-      LVI.analyze();
-
-      TargetMachine &target = ....	                        
-
-
-      PhyRegAlloc PRA(*FunctionI, target, &LVI);     // allocate regs
-      PRA.allocateRegisters();
 */ 
 
 #ifndef PHY_REG_ALLOC_H
@@ -32,7 +21,6 @@
 
 #include "llvm/CodeGen/RegClass.h"
 #include "llvm/CodeGen/LiveRangeInfo.h"
-#include <vector>
 #include <map>
 
 class MachineFunction;
@@ -55,19 +43,13 @@
   std::vector<MachineInstr*> InstrnsAfter; //Insts added AFTER an existing inst
 };
 
-typedef std::map<const MachineInstr *, AddedInstrns> AddedInstrMapType;
-
-
-
 //----------------------------------------------------------------------------
 // class PhyRegAlloc:
 // Main class the register allocator. Call allocateRegisters() to allocate
 // registers for a Function.
 //----------------------------------------------------------------------------
 
-
 class PhyRegAlloc: public NonCopyable {
-
   std::vector<RegClass *> RegClassList; // vector of register classes
   const TargetMachine &TM;              // target machine
   const Function *Fn;                   // name of the function we work on
@@ -79,7 +61,9 @@
   const unsigned NumOfRegClasses;       // recorded here for efficiency
 
   
-  AddedInstrMapType AddedInstrMap;      // to store instrns added in this phase
+  // AddedInstrMap - Used to store instrns added in this phase
+  std::map<const MachineInstr *, AddedInstrns> AddedInstrMap;
+
   AddedInstrns AddedInstrAtEntry;       // to store instrns added at entry
   LoopInfo *LoopDepthCalc;              // to calculate loop depths 
   ReservedColorListType ResColList;     // A set of reserved regs if desired.
@@ -105,11 +89,6 @@
   
   
 private:
-
-
-
-  //------- ------------------ private methods---------------------------------
-
   void addInterference(const Value *Def, const ValueSet *LVSet, 
 		       bool isCallInst);
 
@@ -140,8 +119,8 @@
   void printLabel(const Value *const Val);
   void printMachineCode();
 
-  friend class UltraSparcRegInfo;
 
+  friend class UltraSparcRegInfo;  // FIXME: remove this
 
   int getUsableUniRegAtMI(int RegType, 
 			  const ValueSet *LVSetBef,





More information about the llvm-commits mailing list