mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-29 06:30:39 +03:00
Fix the LLVM 3.4 build.
The disable-simplify-libcalls is gone.
This commit is contained in:
parent
d0ef732cbd
commit
609b362410
1 changed files with 6 additions and 0 deletions
|
@ -80,10 +80,12 @@ disableSimplifyDruntimeCalls("disable-simplify-drtcalls",
|
|||
cl::desc("Disable simplification of druntime calls"),
|
||||
cl::ZeroOrMore);
|
||||
|
||||
#if LDC_LLVM_VER < 304
|
||||
static cl::opt<bool>
|
||||
disableSimplifyLibCalls("disable-simplify-libcalls",
|
||||
cl::desc("Disable simplification of well-known C runtime calls"),
|
||||
cl::ZeroOrMore);
|
||||
#endif
|
||||
|
||||
static cl::opt<bool>
|
||||
disableGCToStack("disable-gc2stack",
|
||||
|
@ -179,7 +181,9 @@ static void addOptimizationPasses(PassManagerBase &mpm, FunctionPassManager &fpm
|
|||
} else {
|
||||
builder.Inliner = createAlwaysInlinerPass();
|
||||
}
|
||||
#if LDC_LLVM_VER < 304
|
||||
builder.DisableSimplifyLibCalls = disableSimplifyLibCalls;
|
||||
#endif
|
||||
builder.DisableUnitAtATime = !unitAtATime;
|
||||
builder.DisableUnrollLoops = optLevel == 0;
|
||||
/* builder.Vectorize is set in ctor from command line switch */
|
||||
|
@ -211,9 +215,11 @@ bool ldc_optimize_module(llvm::Module* m)
|
|||
// Add an appropriate TargetLibraryInfo pass for the module's triple.
|
||||
TargetLibraryInfo *tli = new TargetLibraryInfo(Triple(m->getTargetTriple()));
|
||||
|
||||
#if LDC_LLVM_VER < 304
|
||||
// The -disable-simplify-libcalls flag actually disables all builtin optzns.
|
||||
if (disableSimplifyLibCalls)
|
||||
tli->disableAllFunctions();
|
||||
#endif
|
||||
mpm.add(tli);
|
||||
|
||||
// Add an appropriate TargetData instance for this module.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue