Index: lib/Passes/PassBuilder.cpp =================================================================== --- lib/Passes/PassBuilder.cpp +++ lib/Passes/PassBuilder.cpp @@ -621,9 +621,6 @@ true)); } - if (EnableHotColdSplit) - MPM.addPass(HotColdSplittingPass()); - // Interprocedural constant propagation now that basic cleanup has occurred // and prior to optimizing globals. // FIXME: This position in the pipeline hasn't been carefully considered in @@ -713,6 +710,9 @@ MainCGPipeline.addPass(createCGSCCToFunctionPassAdaptor( buildFunctionSimplificationPipeline(Level, Phase, DebugLogging))); + if (EnableHotColdSplit) + MPM.addPass(HotColdSplittingPass()); + for (auto &C : CGSCCOptimizerLateEPCallbacks) C(MainCGPipeline, Level);