summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-03-19 06:19:16 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-03-19 06:19:16 +0000
commit04201611304389aa32bdc692aa5949cd23411d2b (patch)
tree891a5247c00773aa8db789404d35aea333e8861c /llvm
parentf89ea5068ff385d298a576c399a459f909f6dda0 (diff)
downloadbcm5719-llvm-04201611304389aa32bdc692aa5949cd23411d2b.tar.gz
bcm5719-llvm-04201611304389aa32bdc692aa5949cd23411d2b.zip
Add a TargetInstrDescriptor flag to mark an instruction as "re-materializable".
It means the instruction can be easily re-materialized at any point. e.g. constant generation, load from constantpool. llvm-svn: 35158
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Target/TargetInstrInfo.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/Target/TargetInstrInfo.h b/llvm/include/llvm/Target/TargetInstrInfo.h
index 1cb7e6817b2..aef9093d49e 100644
--- a/llvm/include/llvm/Target/TargetInstrInfo.h
+++ b/llvm/include/llvm/Target/TargetInstrInfo.h
@@ -78,6 +78,10 @@ const unsigned M_VARIABLE_OPS = 1 << 11;
// execution.
const unsigned M_PREDICATED = 1 << 12;
+// M_REMATERIALIZIBLE - Set if this instruction can be trivally re-materialized
+// at any time, e.g. constant generation, load from constant pool.
+const unsigned M_REMATERIALIZIBLE = 1 << 13;
+
// Machine operand flags
// M_LOOK_UP_PTR_REG_CLASS - Set if this operand is a pointer value and it
@@ -207,6 +211,9 @@ public:
bool isPredicated(MachineOpCode Opcode) const {
return get(Opcode).Flags & M_PREDICATED;
}
+ bool isReMaterializable(MachineOpCode Opcode) const {
+ return get(Opcode).Flags & M_REMATERIALIZIBLE;
+ }
bool isCommutableInstr(MachineOpCode Opcode) const {
return get(Opcode).Flags & M_COMMUTABLE;
}
OpenPOWER on IntegriCloud