[PATCH] D78310: [ProfileSummary] Add partial profile annotation on IR.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 10:48:49 PDT 2020


yamauchi added inline comments.


================
Comment at: llvm/lib/IR/ProfileSummary.cpp:191
   SummaryEntryVector Summary;
-  if (!getSummaryFromMD(dyn_cast<MDTuple>(Tuple->getOperand(7)), Summary))
+  if (!getSummaryFromMD(dyn_cast<MDTuple>(Tuple->getOperand(i++)), Summary))
     return nullptr;
----------------
wmi wrote:
> yamauchi wrote:
> > Depending on whether/how we do tuple->getNumOperands check above, we may need to check if there's a 9th operand here.
> > 
> I did the check above.
Would we access out of bounds if we get an 8-entry tuple with the IsPartialProfile entry but without the DetailedSummary entry?


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78310/new/

https://reviews.llvm.org/D78310





More information about the llvm-commits mailing list