mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
Now that -loop-idiom uses TargetLibraryInfo properly, it doesn't
need to be pulled out of the pass manager when the user specifies -fno-builtin. It can intelligently determine which libcalls to optimize based on what is enabled in TargetLibraryInfo. This allows -fno-builtin-foo to work someday. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e324f6e05f
commit
0160c8a8bc
@ -67,7 +67,7 @@ namespace llvm {
|
|||||||
bool OptimizeSize,
|
bool OptimizeSize,
|
||||||
bool UnitAtATime,
|
bool UnitAtATime,
|
||||||
bool UnrollLoops,
|
bool UnrollLoops,
|
||||||
bool OptimizeBuiltins,
|
bool SimplifyLibCalls,
|
||||||
bool HaveExceptions,
|
bool HaveExceptions,
|
||||||
Pass *InliningPass) {
|
Pass *InliningPass) {
|
||||||
createStandardAliasAnalysisPasses(PM);
|
createStandardAliasAnalysisPasses(PM);
|
||||||
@ -89,7 +89,7 @@ namespace llvm {
|
|||||||
|
|
||||||
// Start of CallGraph SCC passes.
|
// Start of CallGraph SCC passes.
|
||||||
if (UnitAtATime && HaveExceptions)
|
if (UnitAtATime && HaveExceptions)
|
||||||
PM->add(createPruneEHPass()); // Remove dead EH info
|
PM->add(createPruneEHPass()); // Remove dead EH info
|
||||||
if (InliningPass)
|
if (InliningPass)
|
||||||
PM->add(InliningPass);
|
PM->add(InliningPass);
|
||||||
if (UnitAtATime)
|
if (UnitAtATime)
|
||||||
@ -101,7 +101,7 @@ namespace llvm {
|
|||||||
// Break up aggregate allocas, using SSAUpdater.
|
// Break up aggregate allocas, using SSAUpdater.
|
||||||
PM->add(createScalarReplAggregatesPass(-1, false));
|
PM->add(createScalarReplAggregatesPass(-1, false));
|
||||||
PM->add(createEarlyCSEPass()); // Catch trivial redundancies
|
PM->add(createEarlyCSEPass()); // Catch trivial redundancies
|
||||||
if (OptimizeBuiltins)
|
if (SimplifyLibCalls)
|
||||||
PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations
|
PM->add(createSimplifyLibCallsPass()); // Library Call Optimizations
|
||||||
PM->add(createJumpThreadingPass()); // Thread jumps.
|
PM->add(createJumpThreadingPass()); // Thread jumps.
|
||||||
PM->add(createCorrelatedValuePropagationPass()); // Propagate conditionals
|
PM->add(createCorrelatedValuePropagationPass()); // Propagate conditionals
|
||||||
@ -116,8 +116,7 @@ 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
|
||||||
if (OptimizeBuiltins)
|
PM->add(createLoopIdiomPass()); // Recognize idioms like memset.
|
||||||
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…
x
Reference in New Issue
Block a user