aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-01-15 18:08:07 +0000
committerChris Lattner <sabre@nondot.org>2003-01-15 18:08:07 +0000
commitf6ee49fcf0ac86d3b39376939fe731b34c9ae6cb (patch)
treec11c5d5c09fd3cab13a9a07ef1a7d3bc411d6a64
parent1fbaa0a1ef53dc75db43000588590baac4fa7d5d (diff)
Use buildmi not MI ctor directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5293 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/RegAlloc/PhyRegAlloc.cpp5
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp5
2 files changed, 4 insertions, 6 deletions
diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
index 94db3dc165..2290dc4902 100644
--- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
@@ -8,7 +8,7 @@
#include "llvm/CodeGen/RegAllocCommon.h"
#include "llvm/CodeGen/IGNode.h"
#include "llvm/CodeGen/PhyRegAlloc.h"
-#include "llvm/CodeGen/MachineInstr.h"
+#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineInstrAnnot.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionInfo.h"
@@ -578,8 +578,7 @@ void PhyRegAlloc::updateMachineCode() {
// needs spill code inserted before or after it.
// Move it before the preceding branch.
InsertBefore(MInst, MBB, --MII);
- MachineInstr* nopI =
- new MachineInstr(TM.getInstrInfo().getNOPOpCode());
+ MachineInstr* nopI = BuildMI(TM.getInstrInfo().getNOPOpCode(),1);
SubstituteInPlace(nopI, MBB, MII+1); // replace orig with NOP
--MII; // point to MInst in new location
bumpIteratorBy = 2; // later skip the branch and the NOP!
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index 94db3dc165..2290dc4902 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
@@ -8,7 +8,7 @@
#include "llvm/CodeGen/RegAllocCommon.h"
#include "llvm/CodeGen/IGNode.h"
#include "llvm/CodeGen/PhyRegAlloc.h"
-#include "llvm/CodeGen/MachineInstr.h"
+#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineInstrAnnot.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionInfo.h"
@@ -578,8 +578,7 @@ void PhyRegAlloc::updateMachineCode() {
// needs spill code inserted before or after it.
// Move it before the preceding branch.
InsertBefore(MInst, MBB, --MII);
- MachineInstr* nopI =
- new MachineInstr(TM.getInstrInfo().getNOPOpCode());
+ MachineInstr* nopI = BuildMI(TM.getInstrInfo().getNOPOpCode(),1);
SubstituteInPlace(nopI, MBB, MII+1); // replace orig with NOP
--MII; // point to MInst in new location
bumpIteratorBy = 2; // later skip the branch and the NOP!