summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/ControlHeightReduction.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Move some helpers from the global namespace into anonymous ones.Benjamin Kramer2018-10-131-3/+4
| | | | llvm-svn: 344468
* [PGO][CHR] Add opt remarks.Hiroshi Yamauchi2018-09-181-5/+75
| | | | | | | | | | | | Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D52056 llvm-svn: 342495
* [PGO] Fix some style issue of ControlHeightReductionFangrui Song2018-09-071-33/+30
| | | | | | | | | | | | Reviewers: yamauchi Reviewed By: yamauchi Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51811 llvm-svn: 341702
* [PGO][CHR] Build/warning fixHiroshi Yamauchi2018-09-071-0/+2
| | | | llvm-svn: 341692
* [PGO][CHR] Small cleanup.Hiroshi Yamauchi2018-09-071-36/+17
| | | | | | | | | | | | | | | | Summary: Do away with demangling. It wasn't really necessary. Declared some local functions to be static. Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51740 llvm-svn: 341681
* [ControlHeightReduction] Remove unused includesBenjamin Kramer2018-09-051-5/+5
| | | | | | Also clang-format them. llvm-svn: 341468
* Prevent unsigned overflow.Richard Trieu2018-09-051-7/+9
| | | | | | | | | | The sum of the weights is caculated in an APInt, which has a width smaller than 64. In certain cases, the sum of the widths would overflow when calculations are done inside an APInt, but would not if done with uint64_t. Since the values will be passed as uint64_t in the function call anyways, do all the math in 64 bits. Also added an assert in case the probabilities overflow 64 bits. llvm-svn: 341444
* Fix -Wunused-function in release build after rL341386Fangrui Song2018-09-051-7/+10
| | | | llvm-svn: 341443
* Fix a memory leak after rL341386.Hiroshi Yamauchi2018-09-041-1/+1
| | | | | | | | | | | | Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51658 llvm-svn: 341412
* Fix unused variable warningReid Kleckner2018-09-041-2/+2
| | | | llvm-svn: 341400
* Fix build failures after rL341386.Hiroshi Yamauchi2018-09-041-0/+8
| | | | | | | | | | | | Reviewers: davidxl Reviewed By: davidxl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51647 llvm-svn: 341391
* [PGO] Control Height ReductionHiroshi Yamauchi2018-09-041-0/+2010
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
OpenPOWER on IntegriCloud