summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-20 22:54:02 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-12-20 22:54:02 +0000
commit33f5d1492d624c12d12226a3fae08aa126855c5b (patch)
treea1cb3fa51aa8a38d0a0bbc9b672aaa20963af393 /llvm/lib/CodeGen/MachineInstr.cpp
parentac4210eacbd3e3011974bb225b215b884f0799ae (diff)
downloadbcm5719-llvm-33f5d1492d624c12d12226a3fae08aa126855c5b.tar.gz
bcm5719-llvm-33f5d1492d624c12d12226a3fae08aa126855c5b.zip
Add an MF argument to MI::copyImplicitOps().
This function is often used to decorate dangling instructions, so a context reference is required to allocate memory for the operands. Also add a corresponding MachineInstrBuilder method. llvm-svn: 170797
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index fff4a67e41d..a98949025a2 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1403,12 +1403,13 @@ bool MachineInstr::allDefsAreDead() const {
/// copyImplicitOps - Copy implicit register operands from specified
/// instruction to this instruction.
-void MachineInstr::copyImplicitOps(const MachineInstr *MI) {
+void MachineInstr::copyImplicitOps(MachineFunction &MF,
+ const MachineInstr *MI) {
for (unsigned i = MI->getDesc().getNumOperands(), e = MI->getNumOperands();
i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);
if (MO.isReg() && MO.isImplicit())
- addOperand(MO);
+ addOperand(MF, MO);
}
}
OpenPOWER on IntegriCloud