diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-03-19 06:19:16 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-19 06:19:16 +0000 |
commit | 5d5c93f659dd3f09375ea0fbe5d6c2df64791f73 (patch) | |
tree | eacc71f87b5051f86cb87cbd397da96ee2a0a6b9 /include/llvm/Target/TargetInstrInfo.h | |
parent | fdcd5a7740f5947a8679524f71852d36e79766a0 (diff) | |
download | external_llvm-5d5c93f659dd3f09375ea0fbe5d6c2df64791f73.zip external_llvm-5d5c93f659dd3f09375ea0fbe5d6c2df64791f73.tar.gz external_llvm-5d5c93f659dd3f09375ea0fbe5d6c2df64791f73.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35158 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetInstrInfo.h')
-rw-r--r-- | include/llvm/Target/TargetInstrInfo.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetInstrInfo.h b/include/llvm/Target/TargetInstrInfo.h index 1cb7e68..aef9093 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/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; } |