[PATCH] D119048: [CSSPGO] Turn on ext-tsp by default for CSSPGO.
Hongtao Yu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 4 19:48:58 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdee058c67059: [CSSPGO] Turn on ext-tsp by default for CSSPGO. (authored by hoy).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119048/new/
https://reviews.llvm.org/D119048
Files:
llvm/lib/CodeGen/MachineBlockPlacement.cpp
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/lib/Transforms/Utils/CodeLayout.cpp
Index: llvm/lib/Transforms/Utils/CodeLayout.cpp
===================================================================
--- llvm/lib/Transforms/Utils/CodeLayout.cpp
+++ llvm/lib/Transforms/Utils/CodeLayout.cpp
@@ -45,6 +45,11 @@
using namespace llvm;
#define DEBUG_TYPE "code-layout"
+cl::opt<bool> EnableExtTspBlockPlacement(
+ "enable-ext-tsp-block-placement", cl::Hidden, cl::init(false),
+ cl::desc("Enable machine block placement based on the ext-tsp model, "
+ "optimizing I-cache utilization."));
+
// Algorithm-specific constants. The values are tuned for the best performance
// of large-scale front-end bound binaries.
static cl::opt<double>
Index: llvm/lib/Transforms/IPO/SampleProfile.cpp
===================================================================
--- llvm/lib/Transforms/IPO/SampleProfile.cpp
+++ llvm/lib/Transforms/IPO/SampleProfile.cpp
@@ -295,6 +295,8 @@
"overwrite-existing-weights", cl::Hidden, cl::init(false),
cl::desc("Ignore existing branch weights on IR and always overwrite."));
+extern cl::opt<bool> EnableExtTspBlockPlacement;
+
namespace {
using BlockWeightMap = DenseMap<const BasicBlock *, uint64_t>;
@@ -2000,6 +2002,10 @@
if (!SampleProfileUseProfi.getNumOccurrences())
SampleProfileUseProfi = true;
+ // Enable EXT-TSP block layout for CSSPGO.
+ if (!EnableExtTspBlockPlacement.getNumOccurrences())
+ EnableExtTspBlockPlacement = true;
+
if (FunctionSamples::ProfileIsCSFlat) {
// Tracker for profiles under different context
ContextTracker = std::make_unique<SampleContextTracker>(
Index: llvm/lib/CodeGen/MachineBlockPlacement.cpp
===================================================================
--- llvm/lib/CodeGen/MachineBlockPlacement.cpp
+++ llvm/lib/CodeGen/MachineBlockPlacement.cpp
@@ -200,10 +200,7 @@
cl::init(2),
cl::Hidden);
-static cl::opt<bool> EnableExtTspBlockPlacement(
- "enable-ext-tsp-block-placement", cl::Hidden, cl::init(false),
- cl::desc("Enable machine block placement based on the ext-tsp model, "
- "optimizing I-cache utilization."));
+extern cl::opt<bool> EnableExtTspBlockPlacement;
namespace llvm {
extern cl::opt<unsigned> StaticLikelyProb;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119048.406146.patch
Type: text/x-patch
Size: 2236 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220205/958de693/attachment-0001.bin>
More information about the llvm-commits
mailing list