mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
- Added option -relocation-model to set relocation model. Valid values include static, pic,
dynamic-no-pic, and default. PPC and x86 default is dynamic-no-pic for Darwin, pic for others. - Removed options -enable-pic and -ppc-static. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26315 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -67,6 +67,11 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, IntrinsicLowering *IL,
|
||||
if (Subtarget.isAIX()) PPCTarget = TargetAIX;
|
||||
if (Subtarget.isDarwin()) PPCTarget = TargetDarwin;
|
||||
}
|
||||
if (getRelocationModel() == Reloc::Default)
|
||||
if (Subtarget.isDarwin())
|
||||
setRelocationModel(Reloc::DynamicNoPIC);
|
||||
else
|
||||
setRelocationModel(Reloc::PIC);
|
||||
}
|
||||
|
||||
/// addPassesToEmitFile - Add passes to the specified pass manager to implement
|
||||
@@ -129,8 +134,8 @@ bool PPCTargetMachine::addPassesToEmitFile(PassManager &PM,
|
||||
}
|
||||
|
||||
void PPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
|
||||
// The JIT does not support or need PIC.
|
||||
PICEnabled = false;
|
||||
// The JIT should use static relocation model.
|
||||
TM.setRelocationModel(Reloc::Static);
|
||||
|
||||
// Run loop strength reduction before anything else.
|
||||
PM.add(createLoopStrengthReducePass());
|
||||
|
||||
Reference in New Issue
Block a user