[llvm] 271853c - [Pipelines] Move AddDescriminators to consistent position

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 04:25:59 PDT 2023


Author: Nikita Popov
Date: 2023-04-11T13:19:06+02:00
New Revision: 271853c62f2a6f8830451f74c1998479c8bcd2d0

URL: https://github.com/llvm/llvm-project/commit/271853c62f2a6f8830451f74c1998479c8bcd2d0
DIFF: https://github.com/llvm/llvm-project/commit/271853c62f2a6f8830451f74c1998479c8bcd2d0.diff

LOG: [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.

Added: 
    

Modified: 
    llvm/lib/Passes/PassBuilderPipelines.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Passes/PassBuilderPipelines.cpp b/llvm/lib/Passes/PassBuilderPipelines.cpp
index 943823c5227c..fce249973a0a 100644
--- a/llvm/lib/Passes/PassBuilderPipelines.cpp
+++ b/llvm/lib/Passes/PassBuilderPipelines.cpp
@@ -1414,13 +1414,13 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level,
   // Force any function attributes we want the rest of the pipeline to observe.
   MPM.addPass(ForceFunctionAttrsPass());
 
+  if (PGOOpt && PGOOpt->DebugInfoForProfiling)
+    MPM.addPass(createModuleToFunctionPassAdaptor(AddDiscriminatorsPass()));
+
   // Apply module pipeline start EP callback.
   for (auto &C : PipelineStartEPCallbacks)
     C(MPM, Level);
 
-  if (PGOOpt && PGOOpt->DebugInfoForProfiling)
-    MPM.addPass(createModuleToFunctionPassAdaptor(AddDiscriminatorsPass()));
-
   const ThinOrFullLTOPhase LTOPhase = LTOPreLink
                                           ? ThinOrFullLTOPhase::FullLTOPreLink
                                           : ThinOrFullLTOPhase::None;


        


More information about the llvm-commits mailing list