llvm-project/llvm/lib
Dehao Chen f8ac3d26d5 Using branch probability to guide critical edge splitting.
Summary:
The original heuristic to break critical edge during machine sink is relatively conservertive: when there is only one instruction sinkable to the critical edge, it is likely that the machine sink pass will not break the critical edge. This leads to many speculative instructions executed at runtime. However, with profile info, we could model the splitting benefits: if the critical edge has 50% taken rate, it would always be beneficial to split the critical edge to avoid the speculated runtime instructions. This patch uses profile to guide critical edge splitting in machine sink pass.

The performance impact on speccpu2006 on Intel sandybridge machines:

spec/2006/fp/C++/444.namd                  25.3  +0.26%
spec/2006/fp/C++/447.dealII               45.96  -0.10%
spec/2006/fp/C++/450.soplex               41.97  +1.49%
spec/2006/fp/C++/453.povray               36.83  -0.96%
spec/2006/fp/C/433.milc                   23.81  +0.32%
spec/2006/fp/C/470.lbm                    41.17  +0.34%
spec/2006/fp/C/482.sphinx3                48.13  +0.69%
spec/2006/int/C++/471.omnetpp             22.45  +3.25%
spec/2006/int/C++/473.astar               21.35  -2.06%
spec/2006/int/C++/483.xalancbmk           36.02  -2.39%
spec/2006/int/C/400.perlbench              33.7  -0.17%
spec/2006/int/C/401.bzip2                  22.9  +0.52%
spec/2006/int/C/403.gcc                   32.42  -0.54%
spec/2006/int/C/429.mcf                   39.59  +0.19%
spec/2006/int/C/445.gobmk                 26.98  -0.00%
spec/2006/int/C/456.hmmer                 24.52  -0.18%
spec/2006/int/C/458.sjeng                 28.26  +0.02%
spec/2006/int/C/462.libquantum            55.44  +3.74%
spec/2006/int/C/464.h264ref               46.67  -0.39%

geometric mean                                   +0.20%

Manually checked 473 and 471 to verify the diff is in the noise range.

Reviewers: rengolin, davidxl

Subscribers: llvm-commits

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

llvm-svn: 284545
2016-10-18 23:24:02 +00:00
..
Analysis [SCEV] Make CompareValueComplexity a little bit smarter 2016-10-18 17:45:16 +00:00
AsmParser DebugInfo: change alignment type from uint64_t to uint32_t to save space. 2016-10-18 14:31:22 +00:00
Bitcode DebugInfo: change alignment type from uint64_t to uint32_t to save space. 2016-10-18 14:31:22 +00:00
CodeGen Using branch probability to guide critical edge splitting. 2016-10-18 23:24:02 +00:00
DebugInfo dwarfdump: add space missing from the type unit header description 2016-10-18 21:18:43 +00:00
Demangle Avoid using alignas and constexpr. 2016-09-06 20:36:24 +00:00
ExecutionEngine Handle relocations to thumb functions when dynamic linking COFF modules 2016-10-17 18:56:18 +00:00
Fuzzer [libFuzzer] detect leaks after every run when executing fixed inputs (./fuzzer -runs=1000000 my-file) 2016-10-18 18:38:08 +00:00
IR Use profile info to set function section prefix to group hot/cold functions. 2016-10-18 20:42:47 +00:00
IRReader
LTO Reduce global namespace pollution. NFC. 2016-10-18 19:39:31 +00:00
LibDriver Object: Replace NewArchiveIterator with a simpler NewArchiveMember class. NFCI. 2016-06-29 22:27:42 +00:00
LineEditor
Linker [ThinLTO] Don't link module level assembly when importing 2016-10-12 18:39:29 +00:00
MC [ADT] Move CachedHashString to its own header in ADT, and rename to CachedHashStringRef. 2016-10-17 22:24:36 +00:00
Object One more additional error check for invalid Mach-O files for a 2016-10-18 20:24:12 +00:00
ObjectYAML [macho2yaml] Don't write empty linkedit data 2016-08-17 21:46:04 +00:00
Option Generalize ArgList::AddAllArgs more 2016-09-29 19:47:58 +00:00
Passes Conditionally eliminate library calls where the result value is not used 2016-10-18 21:36:27 +00:00
ProfileData [Coverage] Support loading multiple binaries into a CoverageMapping 2016-10-14 17:16:53 +00:00
Support Reduce global namespace pollution. NFC. 2016-10-18 19:39:31 +00:00
TableGen Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes. 2016-08-23 17:14:32 +00:00
Target Improve ARM lowering for "icmp <2 x i64> eq". 2016-10-18 21:03:40 +00:00
Transforms Conditionally eliminate library calls where the result value is not used 2016-10-18 21:36:27 +00:00
CMakeLists.txt Try to fix a circular dependency in the modules build. 2016-09-06 20:16:19 +00:00
LLVMBuild.txt Add an c++ itanium demangler to llvm. 2016-09-06 19:16:48 +00:00