Skip to content

Commit 5ee8e4f

Browse files
committed
[SIFrameLowering] Added TODO to findUnusedRegister
We need an 'isRegUnitUsed' function similar to 'isPhysRegUsed' in order to implement the loop in 'findUnusedRegister' in terms of MCRegUnits.
1 parent a69dec0 commit 5ee8e4f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/AMDGPU/SIFrameLowering.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ static cl::opt<bool> EnableSpillVGPRToAGPR(
2828

2929
// Find a register matching \p RC from \p LiveUnits which is unused and
3030
// available throughout the function. On failure, returns AMDGPU::NoRegister.
31+
// TODO: Rewrite the loop here to iterate over MCRegUnits instead of
32+
// MCRegisters. This should reduce the number of iterations and avoid redundant
33+
// checking.
3134
static MCRegister findUnusedRegister(MachineRegisterInfo &MRI,
3235
const LiveRegUnits &LiveUnits,
3336
const TargetRegisterClass &RC) {

0 commit comments

Comments
 (0)