Skip to content

Commit

Permalink
llvm-wrapper: remove llvm 12 hack
Browse files Browse the repository at this point in the history
effectively reverts 9a8acea
  • Loading branch information
klensy committed Jan 26, 2024
1 parent 69db514 commit f1b5131
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -945,12 +945,7 @@ LLVMRustOptimize(
break;
case LLVMRustOptStage::PreLinkThinLTO:
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel);
// The ThinLTOPreLink pipeline already includes ThinLTOBuffer passes. However, callback
// passes may still run afterwards. This means we need to run the buffer passes again.
// FIXME: In LLVM 13, the ThinLTOPreLink pipeline also runs OptimizerLastEPCallbacks
// before the RequiredLTOPreLinkPasses, in which case we can remove these hacks.
if (OptimizerLastEPCallbacks.empty())
NeedThinLTOBufferPasses = false;
NeedThinLTOBufferPasses = false;
for (const auto &C : OptimizerLastEPCallbacks)
C(MPM, OptLevel);
break;
Expand Down

0 comments on commit f1b5131

Please sign in to comment.