[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 17:22:42 PDT 2023


wlei created this revision.
Herald added subscribers: ormris, hoy, wenlei, hiraditya.
Herald added a project: All.
wlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

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,10 @@
         UsePreInlinerDecision = true;
     }
 
+    // Enable stale profile matching by default for CSSPGO.
+    if (!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.535575.patch
Type: text/x-patch
Size: 624 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230629/d4f937c2/attachment.bin>


More information about the llvm-commits mailing list