diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-06-15 21:13:54 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-06-15 21:13:54 +0000 |
commit | 61a2598ebe007091e054325f568d1cc50c9ff3d2 (patch) | |
tree | b6d99860e7fc4b8d84b9cbf894e576c5cae4d49d /include/llvm/Target/TargetInstrInfo.h | |
parent | bedcd3bb9da90fe2c7334eeca334cf78eceff15a (diff) | |
download | external_llvm-61a2598ebe007091e054325f568d1cc50c9ff3d2.zip external_llvm-61a2598ebe007091e054325f568d1cc50c9ff3d2.tar.gz external_llvm-61a2598ebe007091e054325f568d1cc50c9ff3d2.tar.bz2 |
Added CanBeDuplicated(). It returns true if an instruction can be safely duplicated (e.g. during ifcvt).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37605 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 2d73dbf..c73fdfb 100644 --- a/include/llvm/Target/TargetInstrInfo.h +++ b/include/llvm/Target/TargetInstrInfo.h @@ -415,6 +415,13 @@ 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; |