llvm-project/llvm/test/Transforms/SampleProfile/Inputs
Wei Mi 154cd6de51 [SampleFDO] Fix invalid branch profile generated by indirect call promotion.
Suppose an inline instance has hot total sample count but 0 entry count, and
it is an indirect call target. If the indirect call has no other call target
and inline instance associated with it and it is promoted, currently the
conditional branch generated by indirect call promotion will have invalid
branch profile which is !{!"branch_weights", i32 0, i32 0} -- because the
entry count of the promoted target is 0 and the total entry count of all
targets is also 0. This caused a SEGV in Control Height Reduction and may
cause problem in other passes.

Function entry count of an inline instance is computed by a heuristic --
using either the sample of the starting line or starting inner inline
instance. The patch changes the heuristic a little bit so that when total
sample count is larger than 0, the computed entry count will be at least 1.
Then the new branch profile will be !{!"branch_weights", i32 1, i32 0}.

Differential Revision: https://reviews.llvm.org/D72790
2020-01-15 18:36:06 -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
discriminator.prof
einline.prof [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function 2019-12-05 15:57:55 -08:00
entry_counts.prof
entry_counts_cold.prof
flattened.prof
fnptr.binprof
fnptr.prof
function_metadata.compact.afdo
function_metadata.prof
gcc-simple.afdo
indirect-call.afdo
indirect-call.compact.afdo [SampleFDO] Fix invalid branch profile generated by indirect call promotion. 2020-01-15 18:36:06 -08:00
indirect-call.prof [SampleFDO] Fix invalid branch profile generated by indirect call promotion. 2020-01-15 18:36:06 -08:00
inline-act.prof
inline-callee-update.prof [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function 2019-12-05 15:57:55 -08:00
inline-cold.prof [AutoFDO] Inline replay for cold/small callees from sample profile loader 2019-12-06 11:44:45 -08:00
inline-combine.prof
inline-coverage.prof
inline-hint.prof
inline-mergeprof.prof [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function 2019-12-05 15:57:55 -08:00
inline-topdown.prof [AutoFDO] Top-down Inlining for specialization with context-sensitive profile 2019-12-05 16:07:01 -08:00
inline.compactbinary.afdo
inline.extbinary.afdo [SampleFDO] Add indexing for function profiles so they can be loaded on demand 2019-10-09 21:36:03 +00:00
inline.prof
nodebug.prof
nolocinfo.prof
offset.prof
profile-symbol-list.ll
profile-symbol-list.text
profsampleacc.extbinary.afdo [SampleFDO] Add indexing for function profiles so they can be loaded on demand 2019-10-09 21:36:03 +00:00
propagate.prof
remap.map
remap.prof
remarks.prof
summary.prof
syntax.prof
warm-inline-instance.prof