From: Matt Arsenault Date: Fri, 22 Feb 2019 19:03:36 +0000 (+0000) Subject: AMDGPU: Use removeAllRegUnitsForPhysReg X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6effacc17de2a9eb4b6609c1b7723a5c8a51034;p=llvm AMDGPU: Use removeAllRegUnitsForPhysReg git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354686 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/AMDGPU/SILowerControlFlow.cpp b/lib/Target/AMDGPU/SILowerControlFlow.cpp index 20042801637..d8ee8e31e87 100644 --- a/lib/Target/AMDGPU/SILowerControlFlow.cpp +++ b/lib/Target/AMDGPU/SILowerControlFlow.cpp @@ -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) { diff --git a/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp b/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp index adf23a34805..0819fde0e1d 100644 --- a/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp +++ b/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp @@ -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); } } }