summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGStmt.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-28 18:34:41 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-08-28 18:34:41 +0000
commite56c60c5ebf8892af79ef2c5c5bf1cdf62ce2666 (patch)
treec54b221b6e7e53d377993c8afb9f5f859799da4f /clang/lib/CodeGen/CGStmt.cpp
parentf70b7e284ca2f95da2eba3870334a3246097f682 (diff)
downloadbcm5719-llvm-e56c60c5ebf8892af79ef2c5c5bf1cdf62ce2666.tar.gz
bcm5719-llvm-e56c60c5ebf8892af79ef2c5c5bf1cdf62ce2666.zip
Add a MachineOperand::isTied() flag.
While in SSA form, a MachineInstr can have pairs of tied defs and uses. The tied operands are used to represent read-modify-write operands that must be assigned the same physical register. Previously, tied operand pairs were computed from fixed MCInstrDesc fields, or by using black magic on inline assembly instructions. The isTied flag makes it possible to add tied operands to any instruction while getting rid of (some of) the inlineasm magic. Tied operands on normal instructions are needed to represent predicated individual instructions in SSA form. An extra <tied,imp-use> operand is required to represent the output value when the instruction predicate is false. Adding a predicate to: %vreg0<def> = ADD %vreg1, %vreg2 Will look like: %vreg0<tied,def> = ADD %vreg1, %vreg2, pred:3, %vreg7<tied,imp-use> The virtual register %vreg7 is the value given to %vreg0 when the predicate is false. It will be assigned the same physreg as %vreg0. This commit adds the isTied flag and sets it based on MCInstrDesc when building an instruction. The flag is not used for anything yet. llvm-svn: 162774
Diffstat (limited to 'clang/lib/CodeGen/CGStmt.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud