aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/TargetInstrInfoImpl.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2010-01-06 23:47:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2010-01-06 23:47:07 +0000
commit30ac0467ced4627a9b84d8a1d3ca5e8706ddad63 (patch)
tree8b12d1fe8932095354d1a6a11ce9f294622abf12 /lib/CodeGen/TargetInstrInfoImpl.cpp
parentce3e769c15be90463abf14bb71b5a8e1205d3661 (diff)
Add Target hook to duplicate machine instructions.
Some instructions refer to unique labels, and so cannot be trivially cloned with CloneMachineInstr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92873 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r--lib/CodeGen/TargetInstrInfoImpl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/TargetInstrInfoImpl.cpp b/lib/CodeGen/TargetInstrInfoImpl.cpp
index 393e315a32..a0fccabdb5 100644
--- a/lib/CodeGen/TargetInstrInfoImpl.cpp
+++ b/lib/CodeGen/TargetInstrInfoImpl.cpp
@@ -150,6 +150,13 @@ void TargetInstrInfoImpl::reMaterialize(MachineBasicBlock &MBB,
MBB.insert(I, MI);
}
+MachineInstr *TargetInstrInfoImpl::duplicate(MachineInstr *Orig,
+ MachineFunction &MF) const {
+ assert(!Orig->getDesc().isNotDuplicable() &&
+ "Instruction cannot be duplicated");
+ return MF.CloneMachineInstr(Orig);
+}
+
bool
TargetInstrInfoImpl::isIdentical(const MachineInstr *MI,
const MachineInstr *Other,