[PATCH] D106202: [CSSPGO] Turn on iterative-BFI for CSSPGO
Wenlei He via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 16 17:10:34 PDT 2021
wenlei created this revision.
wenlei added reviewers: hoy, wlei, wmi.
Herald added subscribers: ormris, modimo, lxfind, hiraditya.
wenlei requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Iterative-BFI produces better count quality and performance when evaluated on internal benchmarks. Turning it on by default now for CSSPGO. We can consider turn it on by default for AutoFDO as well in the future.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D106202
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
@@ -36,6 +36,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Analysis/AssumptionCache.h"
+#include "llvm/Analysis/BlockFrequencyInfoImpl.h"
#include "llvm/Analysis/CallGraph.h"
#include "llvm/Analysis/CallGraphSCCPass.h"
#include "llvm/Analysis/InlineAdvisor.h"
@@ -1804,6 +1805,10 @@
if (!CallsitePrioritizedInline.getNumOccurrences())
CallsitePrioritizedInline = true;
+ // Enable iterative-BFI by defualt for CSSPGO.
+ if (!UseIterativeBFIInference.getNumOccurrences())
+ UseIterativeBFIInference = true;
+
// Tracker for profiles under different context
ContextTracker =
std::make_unique<SampleContextTracker>(Reader->getProfiles());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106202.359494.patch
Type: text/x-patch
Size: 929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210717/2a08ed02/attachment.bin>
More information about the llvm-commits
mailing list