[all-commits] [llvm/llvm-project] e32469: [SampleFDO] Enable sample-profile-top-down-load an...
wmi-11 via All-commits
all-commits at lists.llvm.org
Wed Jul 8 09:24:12 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: e32469a140374737ad0ece395d5b52444bd94cd1
https://github.com/llvm/llvm-project/commit/e32469a140374737ad0ece395d5b52444bd94cd1
Author: Wei Mi <wmi at google.com>
Date: 2020-07-08 (Wed, 08 Jul 2020)
Changed paths:
M llvm/lib/Transforms/IPO/SampleProfile.cpp
M llvm/test/Transforms/SampleProfile/inline-mergeprof.ll
M llvm/test/Transforms/SampleProfile/inline-topdown.ll
Log Message:
-----------
[SampleFDO] Enable sample-profile-top-down-load and sample-profile-merge-inlinee
by default.
sample-profile-top-down-load is an internal option which can enable top-down
order of inlining and profile annotation in sample profile load pass. It was
found to be beneficial for better profile annotation.
Recently we found it could also solve some build time issue. Suppose function
A has many callsites in function B. In the last release binary where sample
profile was collected, the outline copy of A is large because there are many
other functions inlined into A. However although all the callsites calling A
in B are inlined, but every inlined body is small (A was inlined into B
before other functions are inlined into A), there is no build time issue in
last release.
In an optimized build using the sample profile collected from last release,
without top-down inlining, we saw a case that A got very large because of
inlining, and then multiple callsites of A got inlined into B, and that led
to a huge B which caused significant build time issue besides profile
annotation issue.
To solve that problem, the patch enables the flag
sample-profile-top-down-load by default. sample-profile-top-down-load can
have better performance when it is enabled together with
sample-profile-merge-inlinee so in this patch we also enable
sample-profile-merge-inlinee by default.
Differential Revision: https://reviews.llvm.org/D82919
More information about the All-commits
mailing list