[llvm] [ctx_prof] API to get the instrumentation of a BB (PR #105468)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 17:15:12 PDT 2024
================
@@ -202,6 +202,13 @@ InstrProfCallsite *CtxProfAnalysis::getCallsiteInstrumentation(CallBase &CB) {
return nullptr;
}
+InstrProfIncrementInst *CtxProfAnalysis::getBBInstrumentation(BasicBlock &BB) {
+ for (auto &I : BB)
----------------
mtrofin wrote:
why, this is a typical iteration pattern for BBs (doing a very naive search though llvm/lib for either patterns - i.e. `for (auto &I : BB)` or `for (Instruction &I : BB)` reveals about the same nr of instances.
https://github.com/llvm/llvm-project/pull/105468
More information about the llvm-commits
mailing list