diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-10 07:12:01 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-10 07:12:01 +0000 |
commit | 8f53a89edf13bdf745b86f8614a9bf26e69504cd (patch) | |
tree | a2a2ab1ccf964b9da5368824104a48989631283f /llvm | |
parent | 1e6d3053f271aa12f12c5febd579ef30427015b5 (diff) | |
download | bcm5719-llvm-8f53a89edf13bdf745b86f8614a9bf26e69504cd.tar.gz bcm5719-llvm-8f53a89edf13bdf745b86f8614a9bf26e69504cd.zip |
Fix problems linking against the reoptimizer; _llvm_regAllocState must have
externally-visible linkage, and SaveStateToModule must default to true for llc.
I don't remember why I made it const; perhaps it should be deconstified.
llvm-svn: 9858
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index fd615545f23..99917cdf0b4 100644 --- a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp @@ -53,7 +53,7 @@ RegAllocDebugLevel_t DEBUG_RA; /// allocator's state after it has done its job. This is a hack. /// PhyRegAlloc::SavedStateMapTy ExportedFnAllocState; -const bool SaveStateToModule = false; +const bool SaveStateToModule = true; static cl::opt<RegAllocDebugLevel_t, true> DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA), @@ -1286,7 +1286,7 @@ bool PhyRegAlloc::doFinalization (Module &M) { std::vector<Constant *> CV2; CV2.push_back (ConstantUInt::get (Type::UIntTy, Size)); CV2.push_back (ConstantArray::get (AT2, allstate)); - new GlobalVariable (ST2, true, GlobalValue::InternalLinkage, + new GlobalVariable (ST2, true, GlobalValue::ExternalLinkage, ConstantStruct::get (ST2, CV2), "_llvm_regAllocState", &M); return false; // No error. |