[llvm-commits] CVS: llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp PhyRegAlloc.h
Brian Gaeke
gaeke at cs.uiuc.edu
Sat May 29 23:24:01 PDT 2004
Changes in directory llvm/lib/Target/SparcV9/RegAlloc:
PhyRegAlloc.cpp updated: 1.147 -> 1.148
PhyRegAlloc.h updated: 1.65 -> 1.66
---
Log message:
Rename verifySavedState to dumpSavedState. Give it a new comment.
Call it at a more appropriate point.
---
Diffs of the changes: (+11 -9)
Index: llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
diff -u llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp:1.147 llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp:1.148
--- llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp:1.147 Tue Apr 27 10:13:33 2004
+++ llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp Sat May 29 23:22:24 2004
@@ -1180,11 +1180,10 @@
}
-/// Check the saved state filled in by saveState(), and abort if it looks
-/// wrong. Only used when debugging. FIXME: Currently it just prints out
-/// the state, which isn't quite as useful.
+/// Dump the saved state filled in by saveState() out to stderr. Only
+/// used when debugging.
///
-void PhyRegAlloc::verifySavedState () {
+void PhyRegAlloc::dumpSavedState () {
std::vector<AllocInfo> &state = FnAllocState[Fn];
int ArgNum = 0;
for (Function::const_aiterator i=Fn->abegin (), e=Fn->aend (); i != e; ++i) {
@@ -1379,16 +1378,19 @@
// Save register allocation state for this function in a Constant.
if (SaveRegAllocState) {
saveState();
- if (DEBUG_RA) // Check our work.
- verifySavedState ();
- if (!SaveStateToModule)
- finishSavingState (const_cast<Module&> (*Fn->getParent ()));
}
// Now update the machine code with register names and add any additional
// code inserted by the register allocator to the instruction stream.
updateMachineCode();
+ if (SaveRegAllocState) {
+ if (DEBUG_RA) // Check our work.
+ dumpSavedState ();
+ if (!SaveStateToModule)
+ finishSavingState (const_cast<Module&> (*Fn->getParent ()));
+ }
+
if (DEBUG_RA) {
std::cerr << "\n**** Machine Code After Register Allocation:\n\n";
MF->dump();
Index: llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h
diff -u llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h:1.65 llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h:1.66
--- llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h:1.65 Fri Apr 23 13:15:47 2004
+++ llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h Sat May 29 23:22:24 2004
@@ -128,7 +128,7 @@
void saveStateForValue (std::vector<AllocInfo> &state,
const Value *V, int Insn, int Opnd);
void saveState();
- void verifySavedState();
+ void dumpSavedState();
void finishSavingState(Module &M);
void setCallInterferences(const MachineInstr *MI,
More information about the llvm-commits
mailing list