llvm-project/llvm/test/Transforms/SampleProfile
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
..
Inputs [SampleFDO] Fix invalid branch profile generated by indirect call promotion. 2020-01-15 18:36:06 -08:00
branch.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
calls.ll
cold-indirect-call.ll
compressed-profile-symbol-list.ll [SampleFDO] Add compression support for any section in ExtBinary profile format 2019-10-07 16:12:37 +00:00
cov-zero-samples.ll
coverage-warning.ll
discriminator.ll
early-inline.ll
entry_counts.ll
entry_counts_cold.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
entry_counts_missing_dbginfo.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
flattened.ll
fnptr.ll
function_metadata.ll
gcc-simple.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
indirect-call-gcc.ll
indirect-call.ll [SampleFDO] Fix invalid branch profile generated by indirect call promotion. 2020-01-15 18:36:06 -08:00
inline-act.ll Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
inline-callee-update.ll [SampleFDO] Fix invalid branch profile generated by indirect call promotion. 2020-01-15 18:36:06 -08:00
inline-cold-callsite-samplepgo.ll
inline-cold.ll [AutoFDO] Inline replay for cold/small callees from sample profile loader 2019-12-06 11:44:45 -08:00
inline-combine.ll
inline-coverage.ll [AutoFDO] Statistic for context sensitive profile guided inlining 2019-12-11 21:37:21 -08:00
inline-mergeprof.ll [AutoFDO] Properly merge context-sensitive profile of inlinee back to outlined function 2019-12-05 15:57:55 -08:00
inline-stats.ll [AutoFDO] Statistic for context sensitive profile guided inlining 2019-12-11 21:37:21 -08:00
inline-topdown.ll [AutoFDO] Top-down Inlining for specialization with context-sensitive profile 2019-12-05 16:07:01 -08:00
inline.ll
nodebug.ll
nolocinfo.ll
offset.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
profile-format-compress.ll [SampleFDO] Add compression support for any section in ExtBinary profile format 2019-10-07 16:12:37 +00:00
profile-format.ll
profile-sample-accurate.ll [SampleFDO] Create a separate flag profile-accurate-for-symsinlist to handle 2019-09-27 22:33:59 +00:00
propagate.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
remap.ll [SampleFDO] Add profile remapping support for profile on-demand loading used 2019-10-18 22:35:20 +00:00
remarks.ll Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
section-accurate-samplepgo.ll
summary.ll
syntax.ll
uncompressed-profile-symbol-list.ll [SampleFDO] Add compression support for any section in ExtBinary profile format 2019-10-07 16:12:37 +00:00
warm-inline-instance.ll