[PATCH] D28923: Add indirect call promotion to SamplePGO
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 10:31:13 PST 2017
davidxl added inline comments.
================
Comment at: include/llvm/ProfileData/SampleProf.h:241
+ ErrorOr<SampleRecord::CallTargetMap>
+ findCallTargetMapAt(uint32_t LineOffset, uint32_t Discriminator) const {
+ const auto &ret = BodySamples.find(LineLocation(LineOffset, Discriminator));
----------------
Add a documentation comment.
================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1106
+ unsigned Lineno = DLoc.getLine();
+ unsigned HeaderLineno = DIL->getScope()->getSubprogram()->getLine();
+ uint32_t LineOffset = getOffset(Lineno, HeaderLineno);
----------------
HeaderLineno --> FuncStartLine?
================
Comment at: lib/Transforms/IPO/SampleProfile.cpp:1119
+ LLVMContext &Ctx = I.getParent()->getParent()->getContext();
+ MDBuilder MDHelper(Ctx);
+ SmallVector<Metadata *, 3> Vals;
----------------
Can the following be a utility function shared with instrumentation based PGO?
https://reviews.llvm.org/D28923
More information about the llvm-commits
mailing list