Use instruction itinerary to determine what instructions are 'cheap'.
[oota-llvm.git] / include / llvm / CodeGen / CalcSpillWeights.h
index a47d8477393dede15641a41b1830b405f44fc3c1..24264d7f97f0e7177df61c911f3924e106c0ceb6 100644 (file)
@@ -32,10 +32,10 @@ namespace llvm {
                    const MachineLoopInfo &loops) :
       mf_(mf), lis_(lis), loops_(loops) {}
 
-    /// CalculateRegClass - recompute the register class for li from its uses.
+    /// CalculateRegClass - recompute the register class for reg from its uses.
     /// Since the register class can affect the allocation hint, this function
     /// should be called before CalculateWeightAndHint if both are called.
-    void CalculateRegClass(LiveInterval &li);
+    void CalculateRegClass(unsigned reg);
 
     /// CalculateWeightAndHint - (re)compute li's spill weight and allocation
     /// hint.
@@ -48,7 +48,9 @@ namespace llvm {
   public:
     static char ID;
 
-    CalculateSpillWeights() : MachineFunctionPass(ID) {}
+    CalculateSpillWeights() : MachineFunctionPass(ID) {
+      initializeCalculateSpillWeightsPass(*PassRegistry::getPassRegistry());
+    }
 
     virtual void getAnalysisUsage(AnalysisUsage &au) const;