mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 01:38:26 +00:00
PMBuilder: Expose an option to disable tail calls
Adds API to allow frontends to disable tail calls in PassManagerBuilder. <rdar://problem/16050591> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cfe02c46dc
commit
bf1d0f417e
@ -106,6 +106,7 @@ public:
|
||||
/// added to the per-module passes.
|
||||
Pass *Inliner;
|
||||
|
||||
bool DisableTailCalls;
|
||||
bool DisableUnitAtATime;
|
||||
bool DisableUnrollLoops;
|
||||
bool BBVectorize;
|
||||
|
@ -58,6 +58,7 @@ PassManagerBuilder::PassManagerBuilder() {
|
||||
SizeLevel = 0;
|
||||
LibraryInfo = 0;
|
||||
Inliner = 0;
|
||||
DisableTailCalls = false;
|
||||
DisableUnitAtATime = false;
|
||||
DisableUnrollLoops = false;
|
||||
BBVectorize = RunBBVectorization;
|
||||
@ -183,7 +184,8 @@ void PassManagerBuilder::populateModulePassManager(PassManagerBase &MPM) {
|
||||
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
|
||||
MPM.add(createInstructionCombiningPass()); // Combine silly seq's
|
||||
|
||||
MPM.add(createTailCallEliminationPass()); // Eliminate tail calls
|
||||
if (!DisableTailCalls)
|
||||
MPM.add(createTailCallEliminationPass()); // Eliminate tail calls
|
||||
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
|
||||
MPM.add(createReassociatePass()); // Reassociate expressions
|
||||
MPM.add(createLoopRotatePass()); // Rotate Loop
|
||||
|
Loading…
x
Reference in New Issue
Block a user