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 | 2382d320b31c4fe5fdd6866b7efafe3e9a1b6792 (patch) | |
tree | 081cb45d3122d040972ebb9b1599773cd53a6c87 /llvm/utils/TableGen/CodeGenInstruction.cpp | |
parent | 426f78555e415f599b8ad9dc7468a0aff3272fce (diff) | |
download | bcm5719-llvm-2382d320b31c4fe5fdd6866b7efafe3e9a1b6792.tar.gz bcm5719-llvm-2382d320b31c4fe5fdd6866b7efafe3e9a1b6792.zip |
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.
llvm-svn: 162059
Diffstat (limited to 'llvm/utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenInstruction.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp index 33381e95690..12e153a6651 100644 --- a/llvm/utils/TableGen/CodeGenInstruction.cpp +++ b/llvm/utils/TableGen/CodeGenInstruction.cpp @@ -297,6 +297,7 @@ CodeGenInstruction::CodeGenInstruction(Record *R) : TheDef(R), Operands(R) { isCompare = R->getValueAsBit("isCompare"); isMoveImm = R->getValueAsBit("isMoveImm"); isBitcast = R->getValueAsBit("isBitcast"); + isSelect = R->getValueAsBit("isSelect"); isBarrier = R->getValueAsBit("isBarrier"); isCall = R->getValueAsBit("isCall"); canFoldAsLoad = R->getValueAsBit("canFoldAsLoad"); |