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
25 lines
508 B
CMake
25 lines
508 B
CMake
add_llvm_library(LLVMInstrumentation
|
|
AddressSanitizer.cpp
|
|
BoundsChecking.cpp
|
|
CGProfile.cpp
|
|
ControlHeightReduction.cpp
|
|
DataFlowSanitizer.cpp
|
|
GCOVProfiling.cpp
|
|
MemorySanitizer.cpp
|
|
IndirectCallPromotion.cpp
|
|
Instrumentation.cpp
|
|
InstrProfiling.cpp
|
|
PGOInstrumentation.cpp
|
|
PGOMemOPSizeOpt.cpp
|
|
SanitizerCoverage.cpp
|
|
ThreadSanitizer.cpp
|
|
EfficiencySanitizer.cpp
|
|
HWAddressSanitizer.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
|
|
|
|
DEPENDS
|
|
intrinsics_gen
|
|
)
|