[llvm] 98dd390 - AMDGPU: Use removeAllRegUnitsForPhysReg()
Ruiling Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 14 19:28:36 PDT 2022
Author: Ruiling Song
Date: 2022-03-15T10:28:27+08:00
New Revision: 98dd390573dc0a350ce2aa79e31d57055700747d
URL: https://github.com/llvm/llvm-project/commit/98dd390573dc0a350ce2aa79e31d57055700747d
DIFF: https://github.com/llvm/llvm-project/commit/98dd390573dc0a350ce2aa79e31d57055700747d.diff
LOG: AMDGPU: Use removeAllRegUnitsForPhysReg()
I met the issue here when working on something else.
Actually we have already reserved EXEC, but it looks
like the register coalescer is causing the sub-register
of EXEC appears in LiveIntervals. I have not looked
deeper why register coalscer have such behavior, but
removeAllRegUnitsForPhysReg() is the right way.
Reviewed By: critson, foad, arsenm
Differential Revision: https://reviews.llvm.org/D117014
Added:
Modified:
llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
index 720fc213f77cd..efc480e79aa6c 100644
--- a/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+++ b/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
@@ -1588,11 +1588,11 @@ bool SIWholeQuadMode::runOnMachineFunction(MachineFunction &MF) {
// Physical registers like SCC aren't tracked by default anyway, so just
// removing the ranges we computed is the simplest option for maintaining
// the analysis results.
- LIS->removeRegUnit(*MCRegUnitIterator(MCRegister::from(AMDGPU::SCC), TRI));
+ LIS->removeAllRegUnitsForPhysReg(AMDGPU::SCC);
// If we performed any kills then recompute EXEC
if (!KillInstrs.empty())
- LIS->removeRegUnit(*MCRegUnitIterator(AMDGPU::EXEC, TRI));
+ LIS->removeAllRegUnitsForPhysReg(AMDGPU::EXEC);
return true;
}
More information about the llvm-commits
mailing list