[PATCH] D154027: [CSSPGO] Enable stale profile matching by default for CSSPGO
Lei Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 28 18:21:36 PDT 2023
wlei updated this revision to Diff 535595.
wlei added a comment.
addressing feedback, updated the comments.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154027/new/
https://reviews.llvm.org/D154027
Files:
llvm/lib/Transforms/IPO/SampleProfile.cpp
Index: llvm/lib/Transforms/IPO/SampleProfile.cpp
===================================================================
--- llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -2048,6 +2048,16 @@
UsePreInlinerDecision = true;
}
+ // Enable stale profile matching by default for probe-based profile.
+ // Currently the matching relies on if the checksum mismatch is detected,
+ // which is currently only available for pseudo-probe mode. Removing the
+ // checksum check could cause regressions for some cases, so further tuning
+ // might be needed if we want to enable it for all cases.
+ if (Reader->profileIsProbeBased() &&
+ !SalvageStaleProfile.getNumOccurrences()) {
+ SalvageStaleProfile = true;
+ }
+
if (!Reader->profileIsCS()) {
// Non-CS profile should be fine without a function size budget for the
// inliner since the contexts in the profile are either all from inlining
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154027.535595.patch
Type: text/x-patch
Size: 989 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230629/570064d8/attachment.bin>
More information about the llvm-commits
mailing list