Annotate VirtRegRewriter debug output with slot indexes.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 12 Jan 2011 22:28:48 +0000 (22:28 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 12 Jan 2011 22:28:48 +0000 (22:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123333 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/LiveIntervalAnalysis.h
lib/CodeGen/VirtRegRewriter.cpp

index 143a1a68367e4c063dcea56e92edbd8094c085f4..e4fc062dc7bc3f9e0631dfb3fced573b335b849e 100644 (file)
@@ -171,6 +171,10 @@ namespace llvm {
       r2iMap_.erase(I);
     }
 
+    SlotIndexes *getSlotIndexes() const {
+      return indexes_;
+    }
+
     SlotIndex getZeroIndex() const {
       return indexes_->getZeroIndex();
     }
index 87781067ef8a37e12b2fe897310d0d2beb041d79..6ff6ae2e05b5f33895741d481171bc2cb045d217 100644 (file)
@@ -1133,7 +1133,7 @@ bool LocalRewriter::runOnMachineFunction(MachineFunction &MF, VirtRegMap &vrm,
         << MF.getFunction()->getName() << "':\n");
   DEBUG(dbgs() << "**** Machine Instrs (NOTE! Does not include spills and"
         " reloads!) ****\n");
-  DEBUG(MF.dump());
+  DEBUG(MF.print(dbgs(), LIs->getSlotIndexes()));
 
   // Spills - Keep track of which spilled values are available in physregs
   // so that we can choose to reuse the physregs instead of emitting
@@ -1184,7 +1184,7 @@ bool LocalRewriter::runOnMachineFunction(MachineFunction &MF, VirtRegMap &vrm,
   }
 
   DEBUG(dbgs() << "**** Post Machine Instrs ****\n");
-  DEBUG(MF.dump());
+  DEBUG(MF.print(dbgs(), LIs->getSlotIndexes()));
 
   // Mark unused spill slots.
   MachineFrameInfo *MFI = MF.getFrameInfo();