# HG changeset patch # User anatofuz # Date 1585031452 -32400 # Node ID 597b3f1c2c936cf3484e54303692a46da9470a04 # Parent fdfabb438fbf6a6a8a2083fbaff58451351bd2a4 fix call createTailCallEliminationPass diff -r fdfabb438fbf -r 597b3f1c2c93 llvm/lib/Transforms/IPO/PassManagerBuilder.cpp --- 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