[PATCH] D17624: Metadata support for profile summary
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 13:31:49 PST 2016
vsk added a comment.
Nice!
================
Comment at: lib/ProfileData/ProfileSummary.cpp:255
@@ +254,3 @@
+static bool getSummaryFromMD(MDTuple *MD,
+ std::vector<ProfileSummaryEntry> &Summary) {
+ if (!MD || MD->getNumOperands() != 2)
----------------
`std::vector<ProfileSummaryEntry>` shows up enough to warrant having a typedef for it. Maybe that could be a follow-up?
================
Comment at: lib/ProfileData/ProfileSummary.cpp:264
@@ +263,3 @@
+ return false;
+ for (size_t i = 0; i < EntriesMD->getNumOperands(); i++) {
+ MDTuple *EntryMD = dyn_cast<MDTuple>(EntriesMD->getOperand(i));
----------------
nit: I have a slight preference for `auto *MDOp : EntriesMD->operands()`, but either way is fine.
http://reviews.llvm.org/D17624
More information about the llvm-commits
mailing list