[llvm-commits] [llvm] r122854 - /llvm/trunk/include/llvm/Support/StandardPasses.h
Chris Lattner
sabre at nondot.org
Tue Jan 4 17:03:32 PST 2011
Author: lattner
Date: Tue Jan 4 19:03:32 2011
New Revision: 122854
URL: http://llvm.org/viewvc/llvm-project?rev=122854&view=rev
Log:
Fix PR8906: -fno-builtin should disable loop-idiom recognition.
It forms memset and memcpy's, and will someday form popcount and
other stuff. All of this is bad when compiling the implementation
of memset, memcpy, popcount, etc.
Modified:
llvm/trunk/include/llvm/Support/StandardPasses.h
Modified: llvm/trunk/include/llvm/Support/StandardPasses.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/StandardPasses.h?rev=122854&r1=122853&r2=122854&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/StandardPasses.h (original)
+++ llvm/trunk/include/llvm/Support/StandardPasses.h Tue Jan 4 19:03:32 2011
@@ -97,7 +97,7 @@
bool OptimizeSize,
bool UnitAtATime,
bool UnrollLoops,
- bool SimplifyLibCalls,
+ bool OptimizeBuiltins,
bool HaveExceptions,
Pass *InliningPass) {
createStandardAliasAnalysisPasses(PM);
@@ -130,7 +130,7 @@
// 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 @@
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
More information about the llvm-commits
mailing list