5 Commits

Author SHA1 Message Date
Fangrui Song
ea500dcb7b Fix -Wunused-function in release build after rL341386
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341443 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-05 03:10:20 +00:00
Hiroshi Yamauchi
66ded417a2 Fix a memory leak after rL341386.
Reviewers: davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341412 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 21:28:22 +00:00
Reid Kleckner
801cfc82da Fix unused variable warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341400 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 20:34:47 +00:00
Hiroshi Yamauchi
012ff47f2f Fix build failures after rL341386.
Reviewers: davidxl

Reviewed By: davidxl

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341391 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 18:10:54 +00:00
Hiroshi Yamauchi
c38c85037d [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341386 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-04 17:19:13 +00:00