diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-16 23:11:47 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-08-16 23:11:47 +0000 |
commit | f2c64ef519b38a4328809b27b4a3a8e0c26e9709 (patch) | |
tree | ce3233b4960acdefe47ab3644925c8196a84e3c3 /include/llvm/Target/Target.td | |
parent | 05b2bc8781d9af403a257599613e12cb8fef19e8 (diff) | |
download | llvm-f2c64ef519b38a4328809b27b4a3a8e0c26e9709.tar.gz llvm-f2c64ef519b38a4328809b27b4a3a8e0c26e9709.tar.bz2 llvm-f2c64ef519b38a4328809b27b4a3a8e0c26e9709.tar.xz |
Add an MCID::Select flag and TII hooks for optimizing selects.
Select instructions pick one of two virtual registers based on a
condition, like x86 cmov. On targets like ARM that support predication,
selects can sometimes be eliminated by predicating the instruction
defining one of the operands.
Teach PeepholeOptimizer to recognize select instructions, and ask the
target to optimize them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162059 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/Target.td')
-rw-r--r-- | include/llvm/Target/Target.td | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Target/Target.td b/include/llvm/Target/Target.td index cc76714812..1816445579 100644 --- a/include/llvm/Target/Target.td +++ b/include/llvm/Target/Target.td @@ -339,6 +339,7 @@ class Instruction { bit isCompare = 0; // Is this instruction a comparison instruction? bit isMoveImm = 0; // Is this instruction a move immediate instruction? bit isBitcast = 0; // Is this instruction a bitcast instruction? + bit isSelect = 0; // Is this instruction a select instruction? bit isBarrier = 0; // Can control flow fall through this instruction? bit isCall = 0; // Is this instruction a call instruction? bit canFoldAsLoad = 0; // Can this be folded as a simple memory operand? |