diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-30 04:22:24 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2004-05-30 04:22:24 +0000 |
commit | a7afac29d0686ed689bc0cd2138d0443db3ef90a (patch) | |
tree | 2d11105b24bf43513b1f7e71fb87d4498aa20626 /lib/Target | |
parent | 2ffbb6d20a865d55be4856a42afb699505c9922a (diff) | |
download | external_llvm-a7afac29d0686ed689bc0cd2138d0443db3ef90a.zip external_llvm-a7afac29d0686ed689bc0cd2138d0443db3ef90a.tar.gz external_llvm-a7afac29d0686ed689bc0cd2138d0443db3ef90a.tar.bz2 |
Rename verifySavedState to dumpSavedState. Give it a new comment.
Call it at a more appropriate point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13905 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 18 | ||||
-rw-r--r-- | lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index 0f4c4bd..fbabc61 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -1180,11 +1180,10 @@ void PhyRegAlloc::saveState () { } -/// 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 @@ bool PhyRegAlloc::runOnFunction (Function &F) { // 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(); diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h index 1d3541c..9e6070f 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h @@ -128,7 +128,7 @@ private: 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, |