diff options
author | Robert Lougher <rob.lougher@gmail.com> | 2019-03-20 19:08:18 +0000 |
---|---|---|
committer | Robert Lougher <rob.lougher@gmail.com> | 2019-03-20 19:08:18 +0000 |
commit | f2158a8ef06c87dc979b47e98dd2e8d8493c11ff (patch) | |
tree | 726ff37ba9534062a90cf36b146a49f57a0ff385 /llvm/lib/Passes | |
parent | 364cb6b5d70ab8aadb564b7385d500c519aa4dfa (diff) | |
download | bcm5719-llvm-f2158a8ef06c87dc979b47e98dd2e8d8493c11ff.tar.gz bcm5719-llvm-f2158a8ef06c87dc979b47e98dd2e8d8493c11ff.zip |
Resubmit r356511 "[TailCallElim] Add tailcall elimination pass to LTO pipelines"
Failing LLD tests have been fixed in r356593.
llvm-svn: 356594
Diffstat (limited to 'llvm/lib/Passes')
-rw-r--r-- | llvm/lib/Passes/PassBuilder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp index 2baff899010..ba0d6c2bd68 100644 --- a/llvm/lib/Passes/PassBuilder.cpp +++ b/llvm/lib/Passes/PassBuilder.cpp @@ -1185,6 +1185,10 @@ PassBuilder::buildLTODefaultPipeline(OptimizationLevel Level, bool DebugLogging, // Break up allocas FPM.addPass(SROA()); + // LTO provides additional opportunities for tailcall elimination due to + // link-time inlining, and visibility of nocapture attribute. + FPM.addPass(TailCallElimPass()); + // Run a few AA driver optimizations here and now to cleanup the code. MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM))); |