1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/lib/Passes
Hiroshi Yamauchi a56dc5d07f [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
..
CMakeLists.txt Re-land r329273: [Plugins] Add a slim plugin API to work together with the new PM 2018-04-05 15:04:13 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
PassBuilder.cpp [PGO] Control Height Reduction 2018-09-04 17:19:13 +00:00
PassPlugin.cpp NFC, Avoid a warning on pointer casting in PassPlugin.cpp 2018-04-30 14:21:28 +00:00
PassRegistry.def [PGO] Control Height Reduction 2018-09-04 17:19:13 +00:00