aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetInstrInfo.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-11-01 23:00:31 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-11-01 23:00:31 +0000
commit981b5bd7080db6dbbac6931863d8a2e6d1fc5a0c (patch)
tree2a9b2ca0a57c923c1cc2b229a08d1e991cdea6e5 /include/llvm/Target/TargetInstrInfo.h
parent1dabb68ab45cb05a2c50e9a6f18f60cd3d7105f4 (diff)
downloadexternal_llvm-981b5bd7080db6dbbac6931863d8a2e6d1fc5a0c.zip
external_llvm-981b5bd7080db6dbbac6931863d8a2e6d1fc5a0c.tar.gz
external_llvm-981b5bd7080db6dbbac6931863d8a2e6d1fc5a0c.tar.bz2
Added getTiedToSrcOperand() to check for two-address'ness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetInstrInfo.h')
-rw-r--r--include/llvm/Target/TargetInstrInfo.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index 0098870..ead6315 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -230,7 +230,7 @@ public:
/// getOperandConstraint - Returns the value of the specific constraint if
/// it is set. Returns -1 if it is not set.
int getOperandConstraint(MachineOpCode Opcode, unsigned OpNum,
- OperandConstraint Constraint) {
+ OperandConstraint Constraint) const {
assert(OpNum < get(Opcode).numOperands &&
"Invalid operand # of TargetInstrInfo");
if (get(Opcode).OpInfo[OpNum].Constraints & (1 << Constraint)) {
@@ -240,6 +240,10 @@ public:
return -1;
}
+ /// getTiedToSrcOperand - Returns the operand that is tied to the specified
+ /// dest operand. Returns -1 if there isn't one.
+ int getTiedToSrcOperand(MachineOpCode Opcode, unsigned OpNum) const;
+
/// getDWARF_LABELOpcode - Return the opcode of the target's DWARF_LABEL
/// instruction if it has one. This is used by codegen passes that update
/// DWARF line number info as they modify the code.