[PATCH] D129407: [InstrProf] Allow CSIRPGO function entry coverage

Ellis Hoag via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 10:30:11 PDT 2022


ellis created this revision.
Herald added subscribers: Enna1, wenlei, hiraditya.
Herald added a project: All.
ellis retitled this revision from "[instrprof] Allow CSIRPGO function entry coverage" to "[InstrProf] Allow CSIRPGO function entry coverage".
ellis edited the summary of this revision.
ellis added reviewers: kyulee, phosek, davidxl, MaskRay.
Herald added a subscriber: StephenFan.
ellis published this revision for review.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The flag `-fcs-profile-generate` for enabling CSIRPGO moves the pass
`pgo-instrumentation` after inlining. Function entry coverage works fine
with this change, so remove the assert. I had originally left this
assert in because I had not tested this at the time.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D129407

Files:
  llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp


Index: llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
+++ llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
@@ -832,8 +832,6 @@
   auto CFGHash = ConstantInt::get(Type::getInt64Ty(M->getContext()),
                                   FuncInfo.FunctionHash);
   if (PGOFunctionEntryCoverage) {
-    assert(!IsCS &&
-           "entry coverge does not support context-sensitive instrumentation");
     auto &EntryBB = F.getEntryBlock();
     IRBuilder<> Builder(&EntryBB, EntryBB.getFirstInsertionPt());
     // llvm.instrprof.cover(i8* <name>, i64 <hash>, i32 <num-counters>,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D129407.443378.patch
Type: text/x-patch
Size: 726 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220711/4923e754/attachment.bin>


More information about the llvm-commits mailing list