mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-23 17:29:19 +00: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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122854 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
2d31d14bac
commit
be478819cb
@ -97,7 +97,7 @@ namespace llvm {
|
|||||||
bool OptimizeSize,
|
bool OptimizeSize,
|
||||||
bool UnitAtATime,
|
bool UnitAtATime,
|
||||||
bool UnrollLoops,
|
bool UnrollLoops,
|
||||||
bool SimplifyLibCalls,
|
bool OptimizeBuiltins,
|
||||||
bool HaveExceptions,
|
bool HaveExceptions,
|
||||||
Pass *InliningPass) {
|
Pass *InliningPass) {
|
||||||
createStandardAliasAnalysisPasses(PM);
|
createStandardAliasAnalysisPasses(PM);
|
||||||
@ -130,7 +130,7 @@ namespace llvm {
|
|||||||
// Start of function pass.
|
// Start of function pass.
|
||||||
PM->add(createScalarReplAggregatesPass()); // Break up aggregate allocas
|
PM->add(createScalarReplAggregatesPass()); // Break up aggregate allocas
|
||||||
PM->add(createEarlyCSEPass()); // Catch trivial redundancies
|
PM->add(createEarlyCSEPass()); // Catch trivial redundancies
|
||||||
if (SimplifyLibCalls)
|
if (OptimizeBuiltins)
|
||||||
PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations
|
PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations
|
||||||
PM->add(createInstructionCombiningPass()); // Cleanup for scalarrepl.
|
PM->add(createInstructionCombiningPass()); // Cleanup for scalarrepl.
|
||||||
PM->add(createJumpThreadingPass()); // Thread jumps.
|
PM->add(createJumpThreadingPass()); // Thread jumps.
|
||||||
@ -146,7 +146,8 @@ namespace llvm {
|
|||||||
PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3));
|
PM->add(createLoopUnswitchPass(OptimizeSize || OptimizationLevel < 3));
|
||||||
PM->add(createInstructionCombiningPass());
|
PM->add(createInstructionCombiningPass());
|
||||||
PM->add(createIndVarSimplifyPass()); // Canonicalize indvars
|
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
|
PM->add(createLoopDeletionPass()); // Delete dead loops
|
||||||
if (UnrollLoops)
|
if (UnrollLoops)
|
||||||
PM->add(createLoopUnrollPass()); // Unroll small loops
|
PM->add(createLoopUnrollPass()); // Unroll small loops
|
||||||
|
Loading…
Reference in New Issue
Block a user