findRegisterUseOperand() changed.
authorEvan Cheng <evan.cheng@apple.com>
Mon, 26 Mar 2007 22:41:48 +0000 (22:41 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 26 Mar 2007 22:41:48 +0000 (22:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35366 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMInstrInfo.cpp
lib/Target/ARM/ARMLoadStoreOptimizer.cpp

index e89dcf0ac8eb45668b0ace1ee9cf0f78d41216c5..b630fcb1dc26ca4b115fcbc215d3a0e7387774ce 100644 (file)
@@ -278,8 +278,8 @@ ARMInstrInfo::convertToThreeAddress(MachineFunction::iterator &MFI,
         for (unsigned j = 0; j < 2; ++j) {
           // Look at the two new MI's in reverse order.
           MachineInstr *NewMI = NewMIs[j];
-          MachineOperand *NMO = NewMI->findRegisterUseOperand(Reg);
-          if (!NMO)
+          int NIdx = NewMI->findRegisterUseOperand(Reg);
+          if (NIdx != -1)
             continue;
           LV.addVirtualRegisterKilled(Reg, NewMI);
           if (VI.removeKill(MI))
index d75c8a6398543d803899edb306f1f36a3a5c36df..6dee9c619865cf8af5a8d82b9691cce472cb96fe 100644 (file)
@@ -221,7 +221,7 @@ ARMLoadStoreOpt::MergeLDR_STR(MachineBasicBlock &MBB, unsigned SIndex,
     }
   }
 
-  bool BaseKill = Loc->findRegisterUseOperand(Base, true) != NULL;
+  bool BaseKill = Loc->findRegisterUseOperand(Base, true) != -1;
   if (mergeOps(MBB, ++Loc, SOffset, Base, BaseKill, Opcode,Scratch,Regs, TII)) {
     Merges.push_back(prior(Loc));
     for (unsigned i = SIndex, e = MemOps.size(); i != e; ++i) {