forked from OSchip/llvm-project
154cd6de51
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 |
||
---|---|---|
.. | ||
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 | ||
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 | ||
indirect-call.prof | ||
inline-act.prof | ||
inline-callee-update.prof | ||
inline-cold.prof | ||
inline-combine.prof | ||
inline-coverage.prof | ||
inline-hint.prof | ||
inline-mergeprof.prof | ||
inline-topdown.prof | ||
inline.compactbinary.afdo | ||
inline.extbinary.afdo | ||
inline.prof | ||
nodebug.prof | ||
nolocinfo.prof | ||
offset.prof | ||
profile-symbol-list.ll | ||
profile-symbol-list.text | ||
profsampleacc.extbinary.afdo | ||
propagate.prof | ||
remap.map | ||
remap.prof | ||
remarks.prof | ||
summary.prof | ||
syntax.prof | ||
warm-inline-instance.prof |