Skip to content

Commit

Permalink
Rollup merge of rust-lang#120368 - klensy:llvm-fixme, r=nikic
Browse files Browse the repository at this point in the history
llvm-wrapper: remove llvm 12 hack

effectively reverts rust-lang@9a8acea

r? `@nikic`
  • Loading branch information
matthiaskrgr authored Jan 26, 2024
2 parents 9000bf6 + f1b5131 commit 8fe3ffa
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 8fe3ffa

Please sign in to comment.