mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
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. llvm-svn: 122854
This commit is contained in:
parent
be2382f9a6
commit
de8f64f331
@ -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,6 +146,7 @@ namespace llvm {
|
||||
PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3));
|
||||
PM->add(createInstructionCombiningPass());
|
||||
PM->add(createIndVarSimplifyPass()); // Canonicalize indvars
|
||||
if (OptimizeBuiltins)
|
||||
PM->add(createLoopIdiomPass()); // Recognize idioms like memset.
|
||||
PM->add(createLoopDeletionPass()); // Delete dead loops
|
||||
if (UnrollLoops)
|
||||
|
Loading…
Reference in New Issue
Block a user