Remove unused fields and arguments.
[oota-llvm.git] / lib / Target / R600 / R600EmitClauseMarkers.cpp
index 7c7469a04b2386f9f9bead41dc65f86242a09afe..3fdc678b9ef1013ca870c219ba608284493c317c 100644 (file)
@@ -61,8 +61,6 @@ private:
   }
 
   bool isALU(const MachineInstr *MI) const {
-    if (MI->getOpcode() == AMDGPU::KILLGT)
-      return false;
     if (TII->isALUInstr(MI->getOpcode()))
       return true;
     if (TII->isVector(*MI) || TII->isCubeOp(MI->getOpcode()))
@@ -189,18 +187,22 @@ private:
         continue;
       if (!isALU(I))
         break;
+      if (AluInstCount > TII->getMaxAlusPerClause())
+        break;
       if (I->getOpcode() == AMDGPU::PRED_X) {
         if (TII->getFlagOp(I).getImm() & MO_FLAG_PUSH)
           PushBeforeModifier = true;
         AluInstCount ++;
         continue;
       }
+      if (I->getOpcode() == AMDGPU::KILLGT) {
+        I++;
+        break;
+      }
       if (TII->isALUInstr(I->getOpcode()) &&
           !SubstituteKCacheBank(I, KCacheBanks))
         break;
       AluInstCount += OccupiedDwords(I);
-      if (AluInstCount > 124)
-        break;
     }
     unsigned Opcode = PushBeforeModifier ?
         AMDGPU::CF_ALU_PUSH_BEFORE : AMDGPU::CF_ALU;