aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/RegAlloc
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-03-11 19:46:30 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-03-11 19:46:30 +0000
commitc760d647c62125e6122afd92b6142ae1c42f95eb (patch)
treeef52a569d9565d009050235a1eb1103904e785ed /lib/Target/SparcV9/RegAlloc
parentc46f8a4f42f20370006476f9fdfa7ead1df0b0bf (diff)
downloadexternal_llvm-c760d647c62125e6122afd92b6142ae1c42f95eb.zip
external_llvm-c760d647c62125e6122afd92b6142ae1c42f95eb.tar.gz
external_llvm-c760d647c62125e6122afd92b6142ae1c42f95eb.tar.bz2
Get rid of the abort in PhyRegAlloc::finishSavingState().
Make an explicit call to it from runOnFunction() if we know we're supposed to write into the global. This is lame (esp. the const_cast), but it solves the problem. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12291 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/RegAlloc')
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index 1428fc6..1524331 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -1232,9 +1232,9 @@ bool PhyRegAlloc::doFinalization (Module &M) {
/// state; this one is cumbersome and does not work well with the JIT.
///
void PhyRegAlloc::finishSavingState (Module &M) {
- std::cerr << "---- Saving reg. alloc state; SaveStateToModule = "
- << SaveStateToModule << " ----\n";
- abort ();
+ if (DEBUG_RA)
+ std::cerr << "---- Saving reg. alloc state; SaveStateToModule = "
+ << SaveStateToModule << " ----\n";
// If saving state into the module, just copy new elements to the
// correct global.
@@ -1379,9 +1379,10 @@ bool PhyRegAlloc::runOnFunction (Function &F) {
// Save register allocation state for this function in a Constant.
if (SaveRegAllocState) {
saveState();
- if (DEBUG_RA) { // Check our work.
+ 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