aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Support/StandardPasses.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/llvm/Support/StandardPasses.h b/include/llvm/Support/StandardPasses.h
index 9372bf299a..e5c8b7eb7a 100644
--- a/include/llvm/Support/StandardPasses.h
+++ b/include/llvm/Support/StandardPasses.h
@@ -97,7 +97,7 @@ namespace llvm {
bool OptimizeSize,
bool UnitAtATime,
bool UnrollLoops,
- bool SimplifyLibCalls,
+ bool OptimizeBuiltins,
bool HaveExceptions,
Pass *InliningPass) {
createStandardAliasAnalysisPasses(PM);
@@ -130,7 +130,7 @@ namespace llvm {
// Start of function pass.
PM->add(createScalarReplAggregatesPass()); // Break up aggregate allocas
PM->add(createEarlyCSEPass()); // Catch trivial redundancies
- if (SimplifyLibCalls)
+ if (OptimizeBuiltins)
PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations
PM->add(createInstructionCombiningPass()); // Cleanup for scalarrepl.
PM->add(createJumpThreadingPass()); // Thread jumps.
@@ -146,7 +146,8 @@ namespace llvm {
PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3));
PM->add(createInstructionCombiningPass());
PM->add(createIndVarSimplifyPass()); // Canonicalize indvars
- PM->add(createLoopIdiomPass()); // Recognize idioms like memset.
+ if (OptimizeBuiltins)
+ PM->add(createLoopIdiomPass()); // Recognize idioms like memset.
PM->add(createLoopDeletionPass()); // Delete dead loops
if (UnrollLoops)
PM->add(createLoopUnrollPass()); // Unroll small loops