Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
klensy committed Feb 6, 2024
1 parent 2a06b69 commit ca35cfb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,10 +934,8 @@ LLVMRustOptimize(
} else {
for (const auto &C : PipelineStartEPCallbacks)
PB.registerPipelineStartEPCallback(C);
if (OptStage != LLVMRustOptStage::PreLinkThinLTO) {
for (const auto &C : OptimizerLastEPCallbacks)
PB.registerOptimizerLastEPCallback(C);
}
for (const auto &C : OptimizerLastEPCallbacks)
PB.registerOptimizerLastEPCallback(C);

switch (OptStage) {
case LLVMRustOptStage::PreLinkNoLTO:
Expand All @@ -946,8 +944,6 @@ LLVMRustOptimize(
case LLVMRustOptStage::PreLinkThinLTO:
MPM = PB.buildThinLTOPreLinkDefaultPipeline(OptLevel);
NeedThinLTOBufferPasses = false;
for (const auto &C : OptimizerLastEPCallbacks)
C(MPM, OptLevel);
break;
case LLVMRustOptStage::PreLinkFatLTO:
MPM = PB.buildLTOPreLinkDefaultPipeline(OptLevel);
Expand Down

0 comments on commit ca35cfb

Please sign in to comment.