Formatting - no functional change.
[oota-llvm.git] / lib / CodeGen / StackSlotColoring.cpp
index c6ec9f5e6cf05f111082d582bf971e5483d6c3c8..bc062835fb3e0b1da7167a9587fd47bcc3fb3ed0 100644 (file)
@@ -62,10 +62,12 @@ namespace {
 
   public:
     static char ID; // Pass identification
-    StackSlotColoring() : MachineFunctionPass((intptr_t)&ID), NextColor(-1) {}
+    StackSlotColoring() : MachineFunctionPass(&ID), NextColor(-1) {}
     
     virtual void getAnalysisUsage(AnalysisUsage &AU) const {
       AU.addRequired<LiveStacks>();
+      AU.addPreservedID(MachineLoopInfoID);
+      AU.addPreservedID(MachineDominatorsID);
       MachineFunctionPass::getAnalysisUsage(AU);
     }
 
@@ -177,7 +179,7 @@ int StackSlotColoring::ColorSlot(LiveInterval *li) {
   // Record the assignment.
   Assignments[Color].push_back(li);
   int FI = li->getStackSlotIndex();
-  DOUT << "Assigning fi #" << FI << " to fi #" << Color << "\n";
+  DOUT << "Assigning fi#" << FI << " to fi#" << Color << "\n";
 
   // Change size and alignment of the allocated slot. If there are multiple
   // objects sharing the same slot, then make sure the size and alignment
@@ -218,7 +220,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
       MachineInstr &MI = *MII;
       for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
         MachineOperand &MO = MI.getOperand(i);
-        if (!MO.isFrameIndex())
+        if (!MO.isFI())
           continue;
         int FI = MO.getIndex();
         if (FI < 0)
@@ -233,7 +235,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
 
   // Delete unused stack slots.
   while (NextColor != -1) {
-    DOUT << "Removing unused stack object fi #" << NextColor << "\n";
+    DOUT << "Removing unused stack object fi#" << NextColor << "\n";
     MFI->RemoveStackObject(NextColor);
     NextColor = AllColors.find_next(NextColor);
   }
@@ -242,7 +244,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
 }
 
 bool StackSlotColoring::runOnMachineFunction(MachineFunction &MF) {
-  DOUT << "******** Stack Slot Coloring ********\n";
+  DOUT << "********** Stack Slot Coloring **********\n";
 
   MFI = MF.getFrameInfo();
   LS = &getAnalysis<LiveStacks>();