[llvm] [ctx_prof] "Use" support for pre-thinlink. (PR #101338)
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 18:30:00 PDT 2024
================
@@ -1176,8 +1180,11 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level,
// Enable contextual profiling instrumentation.
const bool IsCtxProfGen = !IsPGOInstrGen && IsPreLink &&
PGOCtxProfLoweringPass::isContextualIRPGOEnabled();
+ const bool IsCtxProfUse = !UseCtxProfile.empty() && !PGOOpt &&
+ Phase == ThinOrFullLTOPhase::ThinLTOPreLink;
----------------
teresajohnson wrote:
Just use the IsPreLink flag like you did above for IsCtxProfGen? What happens for regular LTO, which is the other case where IsPreLink could be true? If not supported there then consider adding an assert.
https://github.com/llvm/llvm-project/pull/101338
More information about the llvm-commits
mailing list