Add an experimental early if-conversion pass, off by default.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 4 Jul 2012 00:09:54 +0000 (00:09 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 4 Jul 2012 00:09:54 +0000 (00:09 +0000)
commit33242fd3ed5586091e73254b58dd1825e9d53c60
tree1cd48f1af6b26d35653abd52edd3df39f303773d
parent0fd518beb38568e58eeec86876bb597bab06b722
Add an experimental early if-conversion pass, off by default.

This pass performs if-conversion on SSA form machine code by
speculatively executing both sides of the branch and using a cmov
instruction to select the result. This can help lower the number of
branch mispredictions on architectures like x86 that don't have
predicable instructions.

The current implementation is very aggressive, and causes regressions on
mosts tests. It needs good heuristics that have yet to be implemented.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159694 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/Passes.h
include/llvm/InitializePasses.h
include/llvm/Target/TargetInstrInfo.h
lib/CodeGen/CMakeLists.txt
lib/CodeGen/CodeGen.cpp
lib/CodeGen/EarlyIfConversion.cpp [new file with mode: 0644]
lib/CodeGen/Passes.cpp