aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-05-21 23:50:44 +0000
committerChris Lattner <sabre@nondot.org>2011-05-21 23:50:44 +0000
commit9ca02e521b6aabc63d7af95e5c0140e20e137a07 (patch)
treecf0c24a353056218e16126e689ec9416c3477983 /lib/CodeGen
parent84ee2eeec9f63e4938bafd060105fa4f0c9cd89b (diff)
adjust to mainline api change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131815 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/BackendUtil.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp
index 92b298b7a3..34c1635daa 100644
--- a/lib/CodeGen/BackendUtil.cpp
+++ b/lib/CodeGen/BackendUtil.cpp
@@ -110,20 +110,18 @@ void EmitAssemblyHelper::CreatePasses() {
}
PassManagerBuilder PMBuilder;
- PMBuilder.setOptimizationLevel(OptLevel);
- PMBuilder.setSizeLevel(CodeGenOpts.OptimizeSize);
+ PMBuilder.OptLevel = OptLevel;
+ PMBuilder.SizeLevel = CodeGenOpts.OptimizeSize;
- if (!CodeGenOpts.SimplifyLibCalls) PMBuilder.disableSimplifyLibCalls();
- if (!CodeGenOpts.UnitAtATime) PMBuilder.disableUnitAtATime();
- if (!CodeGenOpts.UnrollLoops) PMBuilder.disableUnrollLoops();
+ PMBuilder.DisableSimplifyLibCalls = !CodeGenOpts.SimplifyLibCalls;
+ PMBuilder.DisableUnitAtATime = !CodeGenOpts.UnitAtATime;
+ PMBuilder.DisableUnrollLoops = !CodeGenOpts.UnrollLoops;
// Figure out TargetLibraryInfo.
Triple TargetTriple(TheModule->getTargetTriple());
- TargetLibraryInfo *TLI = new TargetLibraryInfo(TargetTriple);
+ PMBuilder.LibraryInfo = new TargetLibraryInfo(TargetTriple);
if (!CodeGenOpts.SimplifyLibCalls)
- TLI->disableAllFunctions();
- PMBuilder.setLibraryInfo(TLI);
-
+ PMBuilder.LibraryInfo->disableAllFunctions();
switch (Inlining) {
case CodeGenOptions::NoInlining: break;
@@ -136,12 +134,12 @@ void EmitAssemblyHelper::CreatePasses() {
Threshold = 25;
else if (OptLevel > 2)
Threshold = 275;
- PMBuilder.setInliner(createFunctionInliningPass(Threshold));
+ PMBuilder.Inliner = createFunctionInliningPass(Threshold);
break;
}
case CodeGenOptions::OnlyAlwaysInlining:
// Respect always_inline.
- PMBuilder.setInliner(createAlwaysInlinerPass());
+ PMBuilder.Inliner = createAlwaysInlinerPass();
break;
}