Mercurial > hg > CbC > CbC_llvm
changeset 168:980e56f2e095
...
author | anatofuz |
---|---|
date | Tue, 14 Apr 2020 15:43:20 +0900 |
parents | e037d1dd7369 |
children | 1f21f60db75c |
files | llvm/lib/Passes/PassBuilder.cpp llvm/lib/Transforms/IPO/PassManagerBuilder.cpp |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/llvm/lib/Passes/PassBuilder.cpp Tue Mar 24 17:35:46 2020 +0900 +++ b/llvm/lib/Passes/PassBuilder.cpp Tue Apr 14 15:43:20 2020 +0900 @@ -637,6 +637,9 @@ FunctionPassManager FPM; FPM.addPass(createFunctionToLoopPassAdaptor( LoopRotatePass(), EnableMSSALoopDependency, DebugLogging)); +#ifndef noCbC + FPM.addPass(TailCallElimPass()); +#endif MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); // Add the profile lowering pass.
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Mar 24 17:35:46 2020 +0900 +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Apr 14 15:43:20 2020 +0900 @@ -930,8 +930,12 @@ PM.add(createWholeProgramDevirtPass(ExportSummary, nullptr)); // That's all we need at opt level 1. - if (OptLevel == 1) + if (OptLevel == 1) { +#ifndef noCbC + PM.add(createTailCallEliminationPass(false)); +#endif return; + } // Now that we internalized some globals, see if we can hack on them! PM.add(createGlobalOptimizerPass());