mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 22:29:37 +00:00
Rename verifySavedState to dumpSavedState. Give it a new comment.
Call it at a more appropriate point. llvm-svn: 13905
This commit is contained in:
parent
b4f49d8da5
commit
7f4ad50481
@ -1180,11 +1180,10 @@ void PhyRegAlloc::saveState () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Check the saved state filled in by saveState(), and abort if it looks
|
/// Dump the saved state filled in by saveState() out to stderr. Only
|
||||||
/// wrong. Only used when debugging. FIXME: Currently it just prints out
|
/// used when debugging.
|
||||||
/// the state, which isn't quite as useful.
|
|
||||||
///
|
///
|
||||||
void PhyRegAlloc::verifySavedState () {
|
void PhyRegAlloc::dumpSavedState () {
|
||||||
std::vector<AllocInfo> &state = FnAllocState[Fn];
|
std::vector<AllocInfo> &state = FnAllocState[Fn];
|
||||||
int ArgNum = 0;
|
int ArgNum = 0;
|
||||||
for (Function::const_aiterator i=Fn->abegin (), e=Fn->aend (); i != e; ++i) {
|
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.
|
// Save register allocation state for this function in a Constant.
|
||||||
if (SaveRegAllocState) {
|
if (SaveRegAllocState) {
|
||||||
saveState();
|
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
|
// Now update the machine code with register names and add any additional
|
||||||
// code inserted by the register allocator to the instruction stream.
|
// code inserted by the register allocator to the instruction stream.
|
||||||
updateMachineCode();
|
updateMachineCode();
|
||||||
|
|
||||||
|
if (SaveRegAllocState) {
|
||||||
|
if (DEBUG_RA) // Check our work.
|
||||||
|
dumpSavedState ();
|
||||||
|
if (!SaveStateToModule)
|
||||||
|
finishSavingState (const_cast<Module&> (*Fn->getParent ()));
|
||||||
|
}
|
||||||
|
|
||||||
if (DEBUG_RA) {
|
if (DEBUG_RA) {
|
||||||
std::cerr << "\n**** Machine Code After Register Allocation:\n\n";
|
std::cerr << "\n**** Machine Code After Register Allocation:\n\n";
|
||||||
MF->dump();
|
MF->dump();
|
||||||
|
@ -128,7 +128,7 @@ private:
|
|||||||
void saveStateForValue (std::vector<AllocInfo> &state,
|
void saveStateForValue (std::vector<AllocInfo> &state,
|
||||||
const Value *V, int Insn, int Opnd);
|
const Value *V, int Insn, int Opnd);
|
||||||
void saveState();
|
void saveState();
|
||||||
void verifySavedState();
|
void dumpSavedState();
|
||||||
void finishSavingState(Module &M);
|
void finishSavingState(Module &M);
|
||||||
|
|
||||||
void setCallInterferences(const MachineInstr *MI,
|
void setCallInterferences(const MachineInstr *MI,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user