llvm-project/llvm/test/Transforms/SampleProfile/Inputs
modimo 5caad9b5d3 [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner
Adds the following switches:

1. --sample-profile-inline-replay-fallback/--cgscc-inline-replay-fallback: controls what the replay advisor does for inline sites that are not present in the replay. Options are:

 1. Original: defers to original advisor
 2. AlwaysInline: inline all sites not in replay
 3. NeverInline: inline no sites not in replay

2. --sample-profile-inline-replay-format/--cgscc-inline-replay-format: controls what format should be generated to match against the replay remarks. Options are:

  1. Line
  2. LineColumn
  3. LineDiscriminator
  4. LineColumnDiscriminator

Adds support for negative inlining decisions. These are denoted by "will not be inlined into" as compared to the positive "inlined into" in the remarks.

All of these together with the previous `--sample-profile-inline-replay-scope/--cgscc-inline-replay-scope` allow tweaking in how to apply replay. In my testing, I'm using:
1. --sample-profile-inline-replay-scope/--cgscc-inline-replay-scope = Function to only replay on a function
2. --sample-profile-inline-replay-fallback/--cgscc-inline-replay-fallback = NeverInline since I'm feeding in only positive remarks to the replay system
3. --sample-profile-inline-replay-format/--cgscc-inline-replay-format = Line since I'm generating the remarks from DWARF information from GCC which can conflict quite heavily in column number compared to Clang

An alternative configuration could be to do Function, AlwaysInline, Line fallback with negative remarks which closer matches the final call-sites. Note that this can lead to unbounded inlining if a negative remark doesn't match/exist for one reason or another.

Updated various tests to cover the new switches and negative remarks

Testing:
ninja check-all

Reviewed By: wenlei, mtrofin

Differential Revision: https://reviews.llvm.org/D112040
2021-10-29 12:32:03 -07:00
..
bad.extbinary.afdo [SampleFDO] Report error when reading a bad/incompatible profile instead of 2021-01-25 10:28:23 -08:00
bad_discriminator_value.prof
bad_fn_header.prof
bad_line_values.prof
bad_mangle.prof
bad_sample_line.prof
bad_samples.prof
branch.prof
calls.prof
cold-indirect-call.prof
cov-zero-samples.prof
coverage-warning.prof
csspgo-import-list-no-funca.prof [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
csspgo-import-list-replay.txt [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
csspgo-import-list.prof [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
csspgo-use-preinliner.prof [CSSPGO] Add switch for sample loader to honor global pre-inliner decision from llvm-profgen 2021-08-25 17:20:15 -07:00
ctxsplit.extbinary.afdo [SampleFDO] Add the support to split the function profiles with context into 2021-01-19 15:16:19 -08:00
discriminator.prof
einline.prof
entry_counts.prof
entry_counts_cold.prof
flattened.prof
fnptr.binprof
fnptr.prof
fsafdo.extbinary.afdo [SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part) 2021-06-02 10:32:52 -07:00
fsafdo.prof [SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part) 2021-06-02 10:32:52 -07:00
function_metadata.compact.afdo
function_metadata.prof
function_metadata_replay.txt [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
gcc-simple.afdo
indirect-call-csspgo.prof [CSSPGO] Call site prioritized inlining for sample PGO 2021-02-01 23:46:34 -08:00
indirect-call.afdo
indirect-call.compact.afdo
indirect-call.prof
inline-act.prof
inline-callee-update.prof
inline-cold.prof
inline-combine.prof
inline-coverage.prof
inline-hint.prof
inline-mergeprof.md5.prof
inline-mergeprof.prof
inline-replay-function.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-replay-line.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-replay-linecolumn.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-replay-linediscriminator.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-replay.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-topdown-inline-all.prof [InlineAdvisor] Add -inline-replay-scope=<Function|Module> to control replay scope 2021-10-18 13:08:39 -07:00
inline-topdown-missing.prof [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
inline-topdown.prof
inline.compactbinary.afdo
inline.extbinary.afdo
inline.fixlenmd5.extbinary.afdo
inline.md5extbinary.afdo
inline.prof
merge-function-attributes.afdo [AFDO] Merge function attributes after inlining 2021-07-09 16:47:12 -07:00
nodebug.prof
nolocinfo.prof
norepeated-icp-2.prof [SampleFDO] Another fix to prevent repeated indirect call promotion in 2021-03-04 18:44:12 -08:00
norepeated-icp-3.prof [SampleFDO] Don't mix up the existing indirect call value profile with the new 2021-03-18 09:54:34 -07:00
norepeated-icp.prof [SampleFDO] Stop repeated indirect call promotion for the same target. 2021-02-18 17:01:32 -08:00
offset.prof
profile-context-order.prof [CSSPGO] Process functions in a top-down order on a dynamic call graph. 2021-02-11 12:36:59 -08:00
profile-context-tracker.prof
profile-correlation-irreducible-loops.prof A post-processing for BFI inference 2021-06-11 21:46:04 -07:00
profile-symbol-list.ll Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
profile-symbol-list.text [SampleFDO] Add a cutoff flag to control how many symbols will be included 2021-02-27 23:15:31 -08:00
profile-topdown-order.prof [CSSPGO] Process functions in a top-down order on a dynamic call graph. 2021-02-11 12:36:59 -08:00
profsampleacc.extbinary.afdo
propagate.prof
pseudo-probe-func-metadata.prof
pseudo-probe-icp-factor.prof [CSSPGO] Fix incorrect probe distribution factor computation in top-down inliner 2021-04-07 08:48:59 -07:00
pseudo-probe-inline.prof [CSSPGO] Report zero-count probe in profile instead of dangling probes. 2021-06-16 11:45:29 -07:00
pseudo-probe-profile-metadata.prof [SamplePGO] Keeping prof metadata for IndirectBrInst 2021-03-30 10:44:48 -07:00
pseudo-probe-profile.prof
pseudo-probe-update.prof [CSSPGO] Introducing distribution factor for pseudo probe. 2021-02-02 11:55:01 -08:00
remap-2.prof
remap.map
remap.prof
remarks-hotness.prof
remarks.prof
summary.prof
syntax.prof
uniqname.nosuffix.afdo [SampleFDO] Support enabling -funique-internal-linkage-name. 2021-03-09 21:41:40 -08:00
uniqname.suffix.afdo [SampleFDO] Support enabling -funique-internal-linkage-name. 2021-03-09 21:41:40 -08:00
uniqname.suffix.prof [SampleFDO] Support enabling -funique-internal-linkage-name. 2021-03-09 21:41:40 -08:00
use-sample-profile-attr.prof
warm-inline-instance.prof