[PATCH] D36052: Update the new PM pipeline to make ICP aware if it is SamplePGO build.
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 29 15:57:20 PDT 2017
chandlerc added inline comments.
Comment at: lib/Passes/PassBuilder.cpp:765-767
+ if (!PGOOpt->ProfileGenFile.empty() || !PGOOpt->ProfileUseFile.empty())
+ addPGOInstrPasses(MPM, DebugLogging, Level, PGOOpt->RunProfileGen,
+ PGOOpt->ProfileGenFile, PGOOpt->ProfileUseFile);
This is a *very* significant change in the PGO instrumentation pass ordering.
Before, we would do non-trivial cleanup of the IR module before adding instrumentation passes. Now they get added before any of that cleanup. This includes thing such as the first (and primary) SSA formation pass, lowering @llvm.expect intrinsics into branch weight metadata, dead argument elimination, global-opt, etc.
Was all of that intended? Is it really OK to instrument before those cleanups?
More information about the llvm-commits