Remove many calls to TII::isMoveInstr. Targets should be producing COPY anyway.
[oota-llvm.git] / lib / CodeGen / RegAllocPBQP.cpp
index 7e61a12a7eea5ccf48d746391ea0033528d1e503..45104b48fe423ab6f1a6b8623016639702dc775d 100644 (file)
@@ -379,12 +379,14 @@ PBQPRegAlloc::CoalesceMap PBQPRegAlloc::findCoalesces() {
          iItr != iEnd; ++iItr) {
 
       const MachineInstr *instr = &*iItr;
-      unsigned srcReg, dstReg, srcSubReg, dstSubReg;
 
       // If this isn't a copy then continue to the next instruction.
-      if (!tii->isMoveInstr(*instr, srcReg, dstReg, srcSubReg, dstSubReg))
+      if (!instr->isCopy())
         continue;
 
+      unsigned srcReg = instr->getOperand(1).getReg();
+      unsigned dstReg = instr->getOperand(0).getReg();
+
       // If the registers are already the same our job is nice and easy.
       if (dstReg == srcReg)
         continue;