diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-12-20 22:54:02 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-12-20 22:54:02 +0000 |
commit | be06aacaa9a270384599bbfa850b967e9996b9fb (patch) | |
tree | 1446520759b387e2b888b0deb6977ee0f721f234 /include/llvm | |
parent | 9500e5d07ac9b94c8fed74150e444778a0dcb036 (diff) | |
download | external_llvm-be06aacaa9a270384599bbfa850b967e9996b9fb.zip external_llvm-be06aacaa9a270384599bbfa850b967e9996b9fb.tar.gz external_llvm-be06aacaa9a270384599bbfa850b967e9996b9fb.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170797 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CodeGen/MachineInstr.h | 2 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineInstrBuilder.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 00df495..c34711c 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -929,7 +929,7 @@ public: /// copyImplicitOps - Copy implicit register operands from specified /// instruction to this instruction. - void copyImplicitOps(const MachineInstr *MI); + void copyImplicitOps(MachineFunction &MF, const MachineInstr *MI); // // Debugging support diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h index 0fc284c..a2d3d63 100644 --- a/include/llvm/CodeGen/MachineInstrBuilder.h +++ b/include/llvm/CodeGen/MachineInstrBuilder.h @@ -208,6 +208,12 @@ public: } } } + + /// Copy all the implicit operands from OtherMI onto this one. + const MachineInstrBuilder ©ImplicitOps(const MachineInstr *OtherMI) { + MI->copyImplicitOps(*MF, OtherMI); + return *this; + } }; /// BuildMI - Builder interface. Specify how to create the initial instruction |