summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit29a64c9575dd91df633b74aa612ed572b9a45242 (patch)
tree387acc5de4ec313296c11350df464618e198fb2e /llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
parent5fd6feb883dced8a54ba44678c3f7bf4c6e2ddd8 (diff)
downloadbcm5719-llvm-29a64c9575dd91df633b74aa612ed572b9a45242.tar.gz
bcm5719-llvm-29a64c9575dd91df633b74aa612ed572b9a45242.zip
Add Target hook to duplicate machine instructions.
Some instructions refer to unique labels, and so cannot be trivially cloned with CloneMachineInstr. llvm-svn: 92873
Diffstat (limited to 'llvm/lib/CodeGen/TargetInstrInfoImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetInstrInfoImpl.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp b/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
index 393e315a321..a0fccabdb5a 100644
--- a/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp
+++ b/llvm/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,
OpenPOWER on IntegriCloud