llvm-project/llvm/test/Transforms/SampleProfile
Wei Mi 14756b70ee [SampleFDO] Don't mix up the existing indirect call value profile with the new
value profile annotated after inlining.

In https://reviews.llvm.org/D96806 and https://reviews.llvm.org/D97350, we
use the magic number -1 in the value profile to avoid repeated indirect call
promotion to the same target for an indirect call. Function updateIDTMetaData
is used to mark an target as being promoted in the value profile with the
magic number. updateIDTMetaData is also used to update the value profile
when an indirect call is inlined and new inline instance profile should be
applied. For the second case, currently updateIDTMetaData mixes up the
existing value profile of the indirect call with the new profile, leading
to the problematic senario that a target count is larger than the total count
in the value profile.

The patch fixes the problem. When updateIDTMetaData is used to update the
value profile after inlining, all the values in the existing value profile
will be dropped except the values with the magic number counts.

Differential Revision: https://reviews.llvm.org/D98835
2021-03-18 09:54:34 -07:00
..
Inputs [SampleFDO] Don't mix up the existing indirect call value profile with the new 2021-03-18 09:54:34 -07:00
branch.ll
calls.ll
cold-indirect-call.ll
compressed-profile-symbol-list.ll
cov-zero-samples.ll
coverage-warning.ll
csspgo-import-list.ll [CSSPGO] Load context profile for external functions in PreLink and populate ThinLTO import list 2021-03-15 12:22:15 -07:00
csspgo-inline-debug.ll [CSSPGO] Call site prioritized inlining for sample PGO 2021-02-01 23:46:34 -08:00
csspgo-inline-icall.ll [CSSPGO] Call site prioritized inlining for sample PGO 2021-02-01 23:46:34 -08:00
csspgo-inline.ll [CSSPGO] Use merged base profile for hot threshold calculation 2021-02-05 17:51:00 -08:00
csspgo-summary.ll [CSSPGO] Use merged base profile for hot threshold calculation 2021-02-05 17:51:00 -08:00
ctxsplit.ll [SampleFDO] Add the support to split the function profiles with context into 2021-01-19 15:16:19 -08:00
discriminator.ll
early-inline.ll
entry_counts.ll
entry_counts_cold.ll Make CallInst::updateProfWeight emit i32 weights instead of i64 2020-11-24 18:13:59 -08:00
entry_counts_missing_dbginfo.ll
flattened.ll
fnptr.ll
function_metadata.ll [CSSPGO] Consume pseudo-probe-based AutoFDO profile 2020-12-16 15:57:18 -08:00
gcc-simple.ll
indirect-call-gcc.ll
indirect-call.ll [SampleFDO] Another fix to prevent repeated indirect call promotion in 2021-03-04 18:44:12 -08:00
inline-act.ll
inline-callee-update.ll
inline-cold-callsite-samplepgo.ll
inline-cold.ll
inline-combine.ll
inline-coverage.ll
inline-mergeprof-dup.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
inline-mergeprof.ll Make CallInst::updateProfWeight emit i32 weights instead of i64 2020-11-24 18:13:59 -08:00
inline-replay.ll [Inliner] Change inline remark format and update ReplayInlineAdvisor to use it 2021-01-12 13:43:48 -08:00
inline-stats.ll
inline-topdown.ll
inline.ll
nodebug-error.ll
nodebug.ll
nolocinfo.ll
norepeated-icp-2.ll [SampleFDO] Another fix to prevent repeated indirect call promotion in 2021-03-04 18:44:12 -08:00
norepeated-icp-3.ll [SampleFDO] Don't mix up the existing indirect call value profile with the new 2021-03-18 09:54:34 -07:00
norepeated-icp.ll [SampleFDO] Stop repeated indirect call promotion for the same target. 2021-02-18 17:01:32 -08:00
offset.ll
profile-context-order.ll Remove test code that cause MSAN failure. 2021-02-11 14:51:55 -08:00
profile-context-tracker-debug.ll [CSSPGO] Call site prioritized inlining for sample PGO 2021-02-01 23:46:34 -08:00
profile-context-tracker.ll [CSSPGO] Call site prioritized inlining for sample PGO 2021-02-01 23:46:34 -08:00
profile-format-compress.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
profile-format.ll [SampleFDO] Report error when reading a bad/incompatible profile instead of 2021-01-25 10:28:23 -08:00
profile-sample-accurate.ll [SampleFDO] Add a cutoff flag to control how many symbols will be included 2021-02-27 23:15:31 -08:00
profile-topdown-order.ll [CSSPGO] Process functions in a top-down order on a dynamic call graph. 2021-02-11 12:36:59 -08:00
propagate.ll
pseudo-probe-dangle.ll [CSSPGO] Deduplicating dangling pseudo probes. 2021-03-03 22:44:42 -08:00
pseudo-probe-dangling.mir [CSSPGO] Introducing dangling pseudo probes. 2021-03-03 22:44:41 -08:00
pseudo-probe-dedup.ll [CSSPGO] Deduplicating dangling pseudo probes. 2021-03-03 22:44:42 -08:00
pseudo-probe-emit-inline.ll [CSSPGO] Introducing distribution factor for pseudo probe. 2021-02-02 11:55:01 -08:00
pseudo-probe-emit.ll [CSSPGO] Introducing distribution factor for pseudo probe. 2021-02-02 11:55:01 -08:00
pseudo-probe-inline.ll [CSSPGO] Introducing distribution factor for pseudo probe. 2021-02-02 11:55:01 -08:00
pseudo-probe-instcombine.ll [CSSPGO] Unblock optimizations with pseudo probe instrumentation. 2021-02-10 12:43:17 -08:00
pseudo-probe-instsched.ll [CSSPGO] Restrict pseudo probe tests to x86_64 only. 2021-02-10 14:41:10 -08:00
pseudo-probe-peep.ll [CSSPGO] Restrict pseudo probe tests to x86_64 only. 2021-02-10 14:41:10 -08:00
pseudo-probe-profile.ll [CSSPGO] Introducing distribution factor for pseudo probe. 2021-02-02 11:55:01 -08:00
pseudo-probe-twoaddr.ll [CSSPGO] Restrict pseudo probe tests to x86_64 only. 2021-02-10 14:41:10 -08:00
pseudo-probe-update.ll [CSSPGO] Introducing distribution factor for pseudo probe. 2021-02-02 11:55:01 -08:00
pseudo-probe-verify.ll [CSSPGO] Introducing distribution factor for pseudo probe. 2021-02-02 11:55:01 -08:00
pseudo-probe.mir [CSSPGO] MIR target-independent pseudo instruction for pseudo-probe intrinsic 2020-11-20 10:52:43 -08:00
remap-2.ll
remap.ll
remarks-hotness.ll [Inliner] Change inline remark format and update ReplayInlineAdvisor to use it 2021-01-12 13:43:48 -08:00
remarks.ll [CSSPGO] Factor out common part for CSSPGO inline and AFDO inline 2021-02-02 07:55:08 -08:00
section-accurate-samplepgo.ll [CodeGen] Add text section prefix for COFF object file 2020-12-08 18:56:21 +08:00
summary.ll
syntax.ll
uncompressed-profile-symbol-list.ll
uniqname.ll [SampleFDO] Support enabling -funique-internal-linkage-name. 2021-03-09 21:41:40 -08:00
use-sample-profile-attr.ll
warm-inline-instance.ll