[PATCH] D79951: [ProfileSummary] Add the PartialProfileRatio field in ProfileSummary metadata.
Hiroshi Yamauchi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 12:03:06 PDT 2020
yamauchi added inline comments.
================
Comment at: llvm/include/llvm/IR/ProfileSummary.h:95-96
bool isPartialProfile() { return Partial; }
+ double getPartialProfileRatio() { return PartialProfileRatio; }
+ void setPartialProfileRatio(double R) { PartialProfileRatio = R; }
void printSummary(raw_ostream &OS);
----------------
wmi wrote:
> Can we add an assertion that Partial is true for getter and setter of PartialProfileRatio?
Done for the setter, but it does not work for the getter as getMD will query the field value along with all the fields and just even to write a false value for it, even when it's not partial. Just querying seems okay.
================
Comment at: llvm/lib/IR/ProfileSummary.cpp:195
- int i = 0;
- auto &FormatMD = Tuple->getOperand(i++);
+ unsigned I = 0;
+ auto &FormatMD = Tuple->getOperand(I++);
----------------
davidxl wrote:
> can you commit the style changes as NFC first?
Sure, will do.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79951/new/
https://reviews.llvm.org/D79951
More information about the llvm-commits
mailing list