Mercurial > hg > CbC > CbC_llvm
changeset 165:597b3f1c2c93
fix call createTailCallEliminationPass
author | anatofuz |
---|---|
date | Tue, 24 Mar 2020 15:30:52 +0900 |
parents | fdfabb438fbf |
children | 3a3539a2fb79 |
files | llvm/lib/Transforms/IPO/PassManagerBuilder.cpp |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp Thu Mar 19 17:02:53 2020 +0900 +++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp Tue Mar 24 15:30:52 2020 +0900 @@ -396,12 +396,13 @@ // Optimize memory intrinsic calls based on the profiled size information. if (SizeLevel == 0) MPM.add(createPGOMemOPSizeOptLegacyPass()); +#ifndef noCbc + MPM.add(createTailCallEliminationPass(false)); // CbC +#endif // TODO: Investigate the cost/benefit of tail call elimination on debugging. +#ifdef noCbC if (OptLevel > 1) -#ifndef noCbC - MPM.add(createTailCallEliminationPass(false)); // CbC -#else MPM.add(createTailCallEliminationPass()); // Eliminate tail calls #endif MPM.add(createCFGSimplificationPass()); // Merge & remove BBs @@ -993,10 +994,10 @@ // LTO provides additional opportunities for tailcall elimination due to // link-time inlining, and visibility of nocapture attribute. - if (OptLevel > 1) #ifndef noCbC PM.add(createTailCallEliminationPass(false)); #else + if (OptLevel > 1) PM.add(createTailCallEliminationPass()); #endif