mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-26 09:18:56 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -53,7 +53,7 @@ RegAllocDebugLevel_t DEBUG_RA;
|
|||||||
/// allocator's state after it has done its job. This is a hack.
|
/// allocator's state after it has done its job. This is a hack.
|
||||||
///
|
///
|
||||||
PhyRegAlloc::SavedStateMapTy ExportedFnAllocState;
|
PhyRegAlloc::SavedStateMapTy ExportedFnAllocState;
|
||||||
const bool SaveStateToModule = false;
|
const bool SaveStateToModule = true;
|
||||||
|
|
||||||
static cl::opt<RegAllocDebugLevel_t, true>
|
static cl::opt<RegAllocDebugLevel_t, true>
|
||||||
DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA),
|
DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA),
|
||||||
@@ -1286,7 +1286,7 @@ bool PhyRegAlloc::doFinalization (Module &M) {
|
|||||||
std::vector<Constant *> CV2;
|
std::vector<Constant *> CV2;
|
||||||
CV2.push_back (ConstantUInt::get (Type::UIntTy, Size));
|
CV2.push_back (ConstantUInt::get (Type::UIntTy, Size));
|
||||||
CV2.push_back (ConstantArray::get (AT2, allstate));
|
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",
|
ConstantStruct::get (ST2, CV2), "_llvm_regAllocState",
|
||||||
&M);
|
&M);
|
||||||
return false; // No error.
|
return false; // No error.
|
||||||
|
@@ -53,7 +53,7 @@ RegAllocDebugLevel_t DEBUG_RA;
|
|||||||
/// allocator's state after it has done its job. This is a hack.
|
/// allocator's state after it has done its job. This is a hack.
|
||||||
///
|
///
|
||||||
PhyRegAlloc::SavedStateMapTy ExportedFnAllocState;
|
PhyRegAlloc::SavedStateMapTy ExportedFnAllocState;
|
||||||
const bool SaveStateToModule = false;
|
const bool SaveStateToModule = true;
|
||||||
|
|
||||||
static cl::opt<RegAllocDebugLevel_t, true>
|
static cl::opt<RegAllocDebugLevel_t, true>
|
||||||
DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA),
|
DRA_opt("dregalloc", cl::Hidden, cl::location(DEBUG_RA),
|
||||||
@@ -1286,7 +1286,7 @@ bool PhyRegAlloc::doFinalization (Module &M) {
|
|||||||
std::vector<Constant *> CV2;
|
std::vector<Constant *> CV2;
|
||||||
CV2.push_back (ConstantUInt::get (Type::UIntTy, Size));
|
CV2.push_back (ConstantUInt::get (Type::UIntTy, Size));
|
||||||
CV2.push_back (ConstantArray::get (AT2, allstate));
|
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",
|
ConstantStruct::get (ST2, CV2), "_llvm_regAllocState",
|
||||||
&M);
|
&M);
|
||||||
return false; // No error.
|
return false; // No error.
|
||||||
|
Reference in New Issue
Block a user