mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Stop resetting NoFramePointerElim in TargetMachine::resetTargetOptions.
This is part of the work to remove TargetMachine::resetTargetOptions. In this patch, instead of updating global variable NoFramePointerElim in resetTargetOptions, its use in DisableFramePointerElim is replaced with a call to TargetFrameLowering::noFramePointerElim. This function determines on a per-function basis if frame pointer elimination should be disabled. There is no change in functionality except that cl:opt option "disable-fp-elim" can now override function attribute "no-frame-pointer-elim". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238080 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -179,9 +179,16 @@ LLVMBool LLVMCreateMCJITCompilerForModule(
|
||||
TargetOptions targetOptions;
|
||||
targetOptions.NoFramePointerElim = options.NoFramePointerElim;
|
||||
targetOptions.EnableFastISel = options.EnableFastISel;
|
||||
std::unique_ptr<Module> Mod(unwrap(M));
|
||||
|
||||
if (Mod)
|
||||
// Set function attribute "no-frame-pointer-elim" based on
|
||||
// NoFramePointerElim.
|
||||
setFunctionAttributes(/* CPU */ "", /* Features */ "", targetOptions, *Mod,
|
||||
/* AlwaysRecordAttrs */ true);
|
||||
|
||||
std::string Error;
|
||||
EngineBuilder builder(std::unique_ptr<Module>(unwrap(M)));
|
||||
EngineBuilder builder(std::move(Mod));
|
||||
builder.setEngineKind(EngineKind::JIT)
|
||||
.setErrorStr(&Error)
|
||||
.setOptLevel((CodeGenOpt::Level)options.OptLevel)
|
||||
|
Reference in New Issue
Block a user