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/Transforms | |
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/Transforms')
-rw-r--r-- | llvm/lib/Transforms/IPO/PassManagerBuilder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp index 0505135673b..9e241aa335a 100644 --- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp @@ -896,6 +896,10 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) { // Break up allocas PM.add(createSROAPass()); + // LTO provides additional opportunities for tailcall elimination due to + // link-time inlining, and visibility of nocapture attribute. + PM.add(createTailCallEliminationPass()); + // Run a few AA driven optimizations here and now, to cleanup the code. PM.add(createPostOrderFunctionAttrsLegacyPass()); // Add nocapture. PM.add(createGlobalsAAWrapperPass()); // IP alias analysis. |