1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/test/Transforms/SampleProfile
Wei Mi 866992fbb3 [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
cov-zero-samples.ll
coverage-warning.ll
discriminator.ll
early-inline.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
entry_counts.ll
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
inline-combine.ll
inline-coverage.ll
inline-mergeprof.ll
inline-stats.ll
inline-topdown.ll
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
profile-format.ll
profile-sample-accurate.ll
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
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
warm-inline-instance.ll