]> granicus.if.org Git - llvm/commitdiff
AMDGPU: Use removeAllRegUnitsForPhysReg
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 22 Feb 2019 19:03:36 +0000 (19:03 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 22 Feb 2019 19:03:36 +0000 (19:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354686 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/SILowerControlFlow.cpp
lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp

index 20042801637b01a035d6a068467b45f9c0beeb1d..d8ee8e31e874199c75ec30389ceb61ae6df23071 100644 (file)
@@ -239,7 +239,7 @@ void SILowerControlFlow::emitIf(MachineInstr &MI) {
   LIS->InsertMachineInstrInMaps(*SetExec);
   LIS->InsertMachineInstrInMaps(*NewBr);
 
-  LIS->removeRegUnit(*MCRegUnitIterator(AMDGPU::EXEC, TRI));
+  LIS->removeAllRegUnitsForPhysReg(AMDGPU::EXEC);
   MI.eraseFromParent();
 
   // FIXME: Is there a better way of adjusting the liveness? It shouldn't be
@@ -323,7 +323,7 @@ void SILowerControlFlow::emitElse(MachineInstr &MI) {
     LIS->createAndComputeVirtRegInterval(SaveReg);
 
   // Let this be recomputed.
-  LIS->removeRegUnit(*MCRegUnitIterator(AMDGPU::EXEC, TRI));
+  LIS->removeAllRegUnitsForPhysReg(AMDGPU::EXEC);
 }
 
 void SILowerControlFlow::emitIfBreak(MachineInstr &MI) {
index adf23a3480582956518c8c3c9cd72c3d4667ea6b..0819fde0e1df2ec8f35f82403b30683996380002 100644 (file)
@@ -374,8 +374,7 @@ bool SIOptimizeExecMaskingPreRA::runOnMachineFunction(MachineFunction &MF) {
         if (!MRI.reg_empty(Reg))
           LIS->createAndComputeVirtRegInterval(Reg);
       } else {
-        for (MCRegUnitIterator U(Reg, TRI); U.isValid(); ++U)
-          LIS->removeRegUnit(*U);
+        LIS->removeAllRegUnitsForPhysReg(Reg);
       }
     }
   }