[PATCH] D120342: [SampleProf][Inliner] Add an option to turn off inliner in sample-profile loader pass.
Mingming Liu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 22 11:52:50 PST 2022
luna updated this revision to Diff 410603.
luna added a comment.
remove newline added by vscode editor..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120342/new/
https://reviews.llvm.org/D120342
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
@@ -183,6 +183,11 @@
cl::desc("Inline cold call sites in profile loader if it's beneficial "
"for code size."));
+static cl::opt<bool>
+ ProfileInlineHotFunctions("sample-profile-inline-hot", cl::Hidden,
+ cl::init(false),
+ cl::desc("Inline hot functions"));
+
cl::opt<int> ProfileInlineGrowthLimit(
"sample-profile-inline-growth-limit", cl::Hidden, cl::init(12),
cl::desc("The size growth ratio limit for proirity-based sample profile "
@@ -1113,6 +1118,8 @@
/// \returns True if there is any inline happened.
bool SampleProfileLoader::inlineHotFunctions(
Function &F, DenseSet<GlobalValue::GUID> &InlinedGUIDs) {
+ if (!ProfileInlineHotFunctions)
+ return false;
// ProfAccForSymsInList is used in callsiteIsHot. The assertion makes sure
// Profile symbol list is ignored when profile-sample-accurate is on.
assert((!ProfAccForSymsInList ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120342.410603.patch
Type: text/x-patch
Size: 1166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220222/f5473e07/attachment.bin>
More information about the llvm-commits
mailing list