From 297d43be007adc922e6d38725ef71ccfb0e7ea9b Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 15 Jun 2007 21:13:54 +0000 Subject: [PATCH] Added CanBeDuplicated(). It returns true if an instruction can be safely duplicated (e.g. during ifcvt). llvm-svn: 37605 --- llvm/include/llvm/Target/TargetInstrInfo.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/llvm/include/llvm/Target/TargetInstrInfo.h b/llvm/include/llvm/Target/TargetInstrInfo.h index 2d73dbf83c85..c73fdfb46cd8 100644 --- a/llvm/include/llvm/Target/TargetInstrInfo.h +++ b/llvm/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;