Skip to content

Commit 271853c

Browse files
committed
[Pipelines] Move AddDescriminators to consistent position
In the non-ThinLTO pipeline this was directly before PipelineStartEP, in the ThinLTO pipeline it was directly after. I don't think the specific position matters here, just make sure it's the same for both pipelines.
1 parent f5f04a5 commit 271853c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Passes/PassBuilderPipelines.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,13 +1414,13 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level,
14141414
// Force any function attributes we want the rest of the pipeline to observe.
14151415
MPM.addPass(ForceFunctionAttrsPass());
14161416

1417+
if (PGOOpt && PGOOpt->DebugInfoForProfiling)
1418+
MPM.addPass(createModuleToFunctionPassAdaptor(AddDiscriminatorsPass()));
1419+
14171420
// Apply module pipeline start EP callback.
14181421
for (auto &C : PipelineStartEPCallbacks)
14191422
C(MPM, Level);
14201423

1421-
if (PGOOpt && PGOOpt->DebugInfoForProfiling)
1422-
MPM.addPass(createModuleToFunctionPassAdaptor(AddDiscriminatorsPass()));
1423-
14241424
const ThinOrFullLTOPhase LTOPhase = LTOPreLink
14251425
? ThinOrFullLTOPhase::FullLTOPreLink
14261426
: ThinOrFullLTOPhase::None;

0 commit comments

Comments
 (0)