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 |
||
---|---|---|
.. | ||
Inputs | ||
branch.ll | ||
calls.ll | ||
cold-indirect-call.ll | ||
compressed-profile-symbol-list.ll | ||
cov-zero-samples.ll | ||
coverage-warning.ll | ||
discriminator.ll | ||
early-inline.ll | ||
entry_counts.ll | ||
entry_counts_cold.ll | ||
entry_counts_missing_dbginfo.ll | ||
flattened.ll | ||
fnptr.ll | ||
function_metadata.ll | ||
gcc-simple.ll | ||
indirect-call-gcc.ll | ||
indirect-call.ll | ||
inline-act.ll | ||
inline-callee-update.ll | ||
inline-cold-callsite-samplepgo.ll | ||
inline-cold.ll | ||
inline-combine.ll | ||
inline-coverage.ll | ||
inline-mergeprof.ll | ||
inline-stats.ll | ||
inline-topdown.ll | ||
inline.ll | ||
nodebug.ll | ||
nolocinfo.ll | ||
offset.ll | ||
profile-format-compress.ll | ||
profile-format.ll | ||
profile-sample-accurate.ll | ||
propagate.ll | ||
remap.ll | ||
remarks.ll | ||
section-accurate-samplepgo.ll | ||
summary.ll | ||
syntax.ll | ||
uncompressed-profile-symbol-list.ll | ||
warm-inline-instance.ll |