[PATCH] D136627: [SampleFDO] Compute profile mismatch metrics
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 24 12:22:25 PDT 2022
davidxl added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:132
+static cl::opt<bool> SampleProfileMatching(
+ "sample-profile-fuzzy-match", cl::Hidden, cl::init(false),
----------------
The stats seems like a useful thing independent of fuzzy matching. Should it be controlled with a different option?
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2069
+ // If instruction is callbase, match function name with profile
+ if (const auto *CB = dyn_cast<CallBase>(&I)) {
+ LineLocation IRCallsite =
----------------
skip non calls earlier in the loop to reduce nesting level.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2086
+ else if (CallsiteFS &&
+ ((CalleeName.empty() && !CallsiteFS->empty()) ||
+ (CallsiteFS->find(CalleeName) != CallsiteFS->end())))
----------------
what does this case cover? inlined indirect call?
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:2098
+ const LineLocation &Loc = I.first;
+ if (Loc.LineOffset & 0x8000)
+ continue;
----------------
use symbolic constant?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136627/new/
https://reviews.llvm.org/D136627
More information about the llvm-commits
mailing list