llvm-project/llvm/test/Transforms/PGOProfile
Hiroshi Yamauchi 9775a620b0 [PGO] Control Height Reduction
Summary:
Control height reduction merges conditional blocks of code and reduces the
number of conditional branches in the hot path based on profiles.

if (hot_cond1) { // Likely true.
  do_stg_hot1();
}
if (hot_cond2) { // Likely true.
  do_stg_hot2();
}

->

if (hot_cond1 && hot_cond2) { // Hot path.
  do_stg_hot1();
  do_stg_hot2();
} else { // Cold path.
  if (hot_cond1) {
    do_stg_hot1();
  }
  if (hot_cond2) {
    do_stg_hot2();
  }
}

This speeds up some internal benchmarks up to ~30%.

Reviewers: davidxl

Reviewed By: davidxl

Subscribers: xbolva00, dmgreen, mehdi_amini, llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D50591

llvm-svn: 341386
2018-09-04 17:19:13 +00:00
..
Inputs [PGO] Fix branch probability remarks assert 2018-03-27 18:55:56 +00:00
X86
PR28219.ll
branch1.ll
branch2.ll
chr.ll [PGO] Control Height Reduction 2018-09-04 17:19:13 +00:00
comdat_internal.ll
comdat_rename.ll [InstrProf] Use comdats on COFF for available_externally functions 2018-07-26 22:59:17 +00:00
counter_promo.ll
counter_promo_exit_merge.ll
counter_promo_mexits.ll
counter_promo_nest.ll
criticaledge.ll
diag_FE_profile.ll
diag_mismatch.ll
diag_no_funcprofdata.ll
diag_no_profile.ll
do-not-instrument.ll
icp_covariant_call_return.ll
icp_covariant_invoke_return.ll
icp_invoke.ll
icp_invoke_nouse.ll
icp_mismatch_msg.ll [PGO] add target md5sum in warning message for icall 2018-08-24 21:38:24 +00:00
icp_sample.ll
icp_vararg.ll
indirect_call_annotation.ll
indirect_call_profile.ll
indirect_call_promotion.ll
indirect_call_promotion_vla.ll [ICP] Do not attempt type matching for variable length arguments. 2018-04-25 17:19:21 +00:00
indirectbr.ll
infinite_loop.ll
infinite_loop_gen.ll
irreducible.ll
landingpad.ll
large_count_remarks.ll [PGO] Fix branch probability remarks assert 2018-03-27 18:55:56 +00:00
loop1.ll
loop2.ll
memcpy.ll
memop_clone.ll [PGOMemOPSize] Preserve the DominatorTree 2018-07-09 08:07:21 +00:00
memop_size_annotation.ll
memop_size_from_strlen.ll
memop_size_opt.ll [PGOMemOPSize] Preserve the DominatorTree 2018-07-09 08:07:21 +00:00
memop_size_opt_zero.ll [PGOMemOPSize] Preserve the DominatorTree 2018-07-09 08:07:21 +00:00
multiple_hash_profile.ll
noreturncall.ll
preinline.ll
select1.ll
select2.ll
single_bb.ll
split-indirectbr-critical-edges.ll
statics_counter_naming.ll
switch.ll
thinlto_indirect_call_promotion.ll
thinlto_samplepgo_icp.ll
thinlto_samplepgo_icp2.ll
thinlto_samplepgo_icp3.ll [ThinLTO] Recommit of import global variables 2018-03-12 10:30:50 +00:00
thinlto_samplepgo_icp_droppeddead.ll
unreachable_bb.ll