llvm-project/llvm/test/Transforms/SampleProfile
Wenlei He 7b61ae68ec [AutoFDO] Inline replay for cold/small callees from sample profile loader
Summary:
Sample profile loader of AutoFDO tries to replay previous inlining using context sensitive profile. The replay only repeats inlining if the call site block is hot. As a result it punts inlining of small functions, some of which can be beneficial for size, and will still be inlined by CSGCC inliner later. The oscillation between sample profile loader's inlining and regular CGSSC inlining cause unnecessary loss of context-sensitive profile. It doesn't have much impact for inline decision itself, but it negatively affects post-inline profile quality as CGSCC inliner have to scale counts which is not as accurate as the original context sensitive profile, and bad post-inline profile can misguide code layout.

This change added regular Inline Cost calculation for sample profile loader, so we can inline small functions upfront under switch -sample-profile-inline-size. In addition -sample-profile-cold-inline-threshold is added so we can tune the separate size threshold - currently the default is chosen to be the same as regular inliner's cold call-site threshold.

Reviewers: wmi, davidxl

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70750
2019-12-06 11:44:45 -08:00
..
Inputs [AutoFDO] Inline replay for cold/small callees from sample profile loader 2019-12-06 11:44:45 -08:00
branch.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
calls.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
cold-indirect-call.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
compressed-profile-symbol-list.ll [SampleFDO] Add compression support for any section in ExtBinary profile format 2019-10-07 16:12:37 +00:00
cov-zero-samples.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
coverage-warning.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
discriminator.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
early-inline.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
entry_counts.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
entry_counts_cold.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
entry_counts_missing_dbginfo.ll Fix prof branch_weights in entry_counts_missing_dbginfo.ll test 2019-05-16 03:39:09 +00:00
flattened.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
fnptr.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
function_metadata.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
gcc-simple.ll [tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples 2019-05-01 15:36:18 +00:00
indirect-call-gcc.ll [tests] Add host-byteorder-*-endian; update XFAILs of big-endian triples 2019-05-01 15:36:18 +00:00
indirect-call.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
inline-act.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
inline-callee-update.ll Keep import function list for inlinee profile update 2019-11-06 18:36:00 -08:00
inline-cold-callsite-samplepgo.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
inline-cold.ll [AutoFDO] Inline replay for cold/small callees from sample profile loader 2019-12-06 11:44:45 -08:00
inline-combine.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
inline-coverage.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
inline-mergeprof.ll [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function 2019-12-05 15:57:55 -08:00
inline-topdown.ll [AutoFDO] Top-down Inlining for specialization with context-sensitive profile 2019-12-05 16:07:01 -08:00
inline.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
nodebug.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
nolocinfo.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
offset.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
profile-format-compress.ll [SampleFDO] Add compression support for any section in ExtBinary profile format 2019-10-07 16:12:37 +00:00
profile-format.ll [SampleFDO] Add ExtBinary format to support extension of binary profile. 2019-08-23 19:05:30 +00:00
profile-sample-accurate.ll [SampleFDO] Create a separate flag profile-accurate-for-symsinlist to handle 2019-09-27 22:33:59 +00:00
propagate.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
remap.ll [SampleFDO] Add profile remapping support for profile on-demand loading used 2019-10-18 22:35:20 +00:00
remarks.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
section-accurate-samplepgo.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
summary.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
syntax.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00
uncompressed-profile-symbol-list.ll [SampleFDO] Add compression support for any section in ExtBinary profile format 2019-10-07 16:12:37 +00:00
warm-inline-instance.ll Revert "Temporarily Revert "Add basic loop fusion pass."" 2019-04-17 04:52:47 +00:00