[PATCH] D122442: [CSSPGO] Turn on profi and ext-tsp when using probe-based profile.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 24 16:30:32 PDT 2022


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

Probe-based profile leads to a better performance when combined with profi and ext-tsp block layout. I'm turning them on by default.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122442

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
@@ -2034,6 +2034,13 @@
       ContextTracker = std::make_unique<SampleContextTracker>(
           Reader->getProfiles(), &GUIDToFuncNameMap);
     }
+  } else if (Reader->profileIsProbeBased()) {
+    if (!UseIterativeBFIInference.getNumOccurrences())
+      UseIterativeBFIInference = true;
+    if (!SampleProfileUseProfi.getNumOccurrences())
+      SampleProfileUseProfi = true;
+    if (!EnableExtTspBlockPlacement.getNumOccurrences())
+      EnableExtTspBlockPlacement = true;
   }
 
   // Load pseudo probe descriptors for probe-based function samples.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122442.418074.patch
Type: text/x-patch
Size: 768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220324/e2873206/attachment.bin>


More information about the llvm-commits mailing list