summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-06-19 01:21:41 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-06-19 01:21:41 +0000
commit4e6b1e1d999a224d932c466118aad577f27cdd56 (patch)
tree2de4290494ff4d9b516f9968413b74f36ef9f833 /include
parent52387be1e00291a88edc4c2b8a0b5c22478bcd83 (diff)
downloadllvm-4e6b1e1d999a224d932c466118aad577f27cdd56.tar.gz
llvm-4e6b1e1d999a224d932c466118aad577f27cdd56.tar.bz2
llvm-4e6b1e1d999a224d932c466118aad577f27cdd56.tar.xz
Replace CanBeDuplicated() with a M_NOT_DUPLICABLE bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetInstrInfo.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h
index c73fdfb46c..2a1843f8df 100644
--- a/include/llvm/Target/TargetInstrInfo.h
+++ b/include/llvm/Target/TargetInstrInfo.h
@@ -86,6 +86,10 @@ const unsigned M_REMATERIALIZIBLE = 1 << 13;
// register and / or registers that are used to predicate instructions.
const unsigned M_CLOBBERS_PRED = 1 << 14;
+// M_NOT_DUPLICABLE - Set if this instruction cannot be safely duplicated.
+// (e.g. instructions with unique labels attached).
+const unsigned M_NOT_DUPLICABLE = 1 << 15;
+
// Machine operand flags
// M_LOOK_UP_PTR_REG_CLASS - Set if this operand is a pointer value and it
// requires a callback to look up its register class.
@@ -211,15 +215,6 @@ public:
return get(Opcode).Flags & M_RET_FLAG;
}
- bool isPredicable(MachineOpCode Opcode) const {
- return get(Opcode).Flags & M_PREDICABLE;
- }
- bool clobbersPredicate(MachineOpCode Opcode) const {
- return get(Opcode).Flags & M_CLOBBERS_PRED;
- }
- bool isReMaterializable(MachineOpCode Opcode) const {
- return get(Opcode).Flags & M_REMATERIALIZIBLE;
- }
bool isCommutableInstr(MachineOpCode Opcode) const {
return get(Opcode).Flags & M_COMMUTABLE;
}
@@ -265,6 +260,22 @@ public:
return get(Opcode).Flags & M_VARIABLE_OPS;
}
+ bool isPredicable(MachineOpCode Opcode) const {
+ return get(Opcode).Flags & M_PREDICABLE;
+ }
+
+ bool isReMaterializable(MachineOpCode Opcode) const {
+ return get(Opcode).Flags & M_REMATERIALIZIBLE;
+ }
+
+ bool clobbersPredicate(MachineOpCode Opcode) const {
+ return get(Opcode).Flags & M_CLOBBERS_PRED;
+ }
+
+ bool isNotDuplicable(MachineOpCode Opcode) const {
+ return get(Opcode).Flags & M_NOT_DUPLICABLE;
+ }
+
/// 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,
@@ -415,13 +426,6 @@ public:
return false;
}
- /// CanBeDuplicated - Returns true if the instruction can be duplicated
- /// without causing unforseenable side-effect (e.g. instructions with unique
- /// labels attached).
- virtual bool CanBeDuplicated(const MachineInstr *MI) const {
- return false;
- }
-
/// isUnpredicatedTerminator - Returns true if the instruction is a
/// terminator instruction that has not been predicated.
virtual bool isUnpredicatedTerminator(const MachineInstr *MI) const;