aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/RegAlloc
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-08-06 19:11:43 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-08-06 19:11:43 +0000
commit16ca1947fdc9391d222a1601439566f7e8a7c698 (patch)
treeaebe1d48624002de5a4a9d28b3797ad31ba0c6dd /lib/Target/SparcV9/RegAlloc
parent3ee14deb32daccc706e3f3c064bb3d3dbd342dcc (diff)
downloadexternal_llvm-16ca1947fdc9391d222a1601439566f7e8a7c698.zip
external_llvm-16ca1947fdc9391d222a1601439566f7e8a7c698.tar.gz
external_llvm-16ca1947fdc9391d222a1601439566f7e8a7c698.tar.bz2
dumpSavedState has outlived its usefulness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15555 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/RegAlloc')
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp49
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h1
2 files changed, 3 insertions, 47 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index 2920284..74834f0 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -1181,44 +1181,6 @@ void PhyRegAlloc::saveState () {
}
-/// Dump the saved state filled in by saveState() out to stderr. Only
-/// used when debugging.
-///
-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) {
- const Argument *Arg = &*i;
- std::cerr << "Argument: " << *Arg << "\n"
- << "FnAllocState:\n";
- for (unsigned i = 0; i < state.size (); ++i) {
- AllocInfo &S = state[i];
- if (S.Instruction == -1 && S.Operand == ArgNum)
- std::cerr << " " << S << "\n";
- }
- std::cerr << "----------\n";
- ++ArgNum;
- }
- int Insn = 0;
- for (const_inst_iterator II=inst_begin (Fn), IE=inst_end (Fn); II!=IE; ++II) {
- const Instruction *I = &*II;
- MachineCodeForInstruction &Instrs = MachineCodeForInstruction::get (I);
- std::cerr << "Instruction: " << *I
- << "MachineCodeForInstruction:\n";
- for (unsigned i = 0, n = Instrs.size (); i != n; ++i)
- std::cerr << " " << *Instrs[i];
- std::cerr << "FnAllocState:\n";
- for (unsigned i = 0; i < state.size (); ++i) {
- AllocInfo &S = state[i];
- if (Insn == S.Instruction)
- std::cerr << " " << S << "\n";
- }
- std::cerr << "----------\n";
- ++Insn;
- }
-}
-
-
bool PhyRegAlloc::doFinalization (Module &M) {
if (SaveRegAllocState) finishSavingState (M);
return false;
@@ -1377,20 +1339,15 @@ bool PhyRegAlloc::runOnFunction (Function &F) {
colorIncomingArgs();
// Save register allocation state for this function in a Constant.
- if (SaveRegAllocState) {
+ if (SaveRegAllocState)
saveState();
- }
// 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 (SaveRegAllocState && !SaveStateToModule)
+ finishSavingState (const_cast<Module&> (*Fn->getParent ()));
if (DEBUG_RA) {
std::cerr << "\n**** Machine Code After Register Allocation:\n\n";
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h
index f344f0e..307836c 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h
@@ -128,7 +128,6 @@ private:
void saveStateForValue (std::vector<AllocInfo> &state,
const Value *V, int Insn, int Opnd);
void saveState();
- void dumpSavedState();
void finishSavingState(Module &M);
void setCallInterferences(const MachineInstr *MI,