[llvm] [llvm][ctx_profile] Add instrumentation (PR #90136)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 29 21:18:41 PDT 2024


================
@@ -2015,9 +2053,8 @@ static bool annotateAllFunctions(
 
   // If the profile marked as always instrument the entry BB, do the
   // same. Note this can be overwritten by the internal option in CFGMST.h
-  bool InstrumentFuncEntry = PGOReader->instrEntryBBEnabled();
-  if (PGOInstrumentEntry.getNumOccurrences() > 0)
----------------
teresajohnson wrote:

I think by removing this you have changed the behavior of the code? With the old version, I think if the user explicitly specified `-pgo-instrument-entry=false` it would override instrEntryBBEnabled ? At least I believe that is the behavior when checking `if (PGOInstrumentEntry.getNumOccurrences() > 0)`.

https://github.com/llvm/llvm-project/pull/90136


More information about the llvm-commits mailing list