SIFrameLowering currently uses the LivePhysRegs utility class to
track the liveness of registers. The LiveRegUnits appear to be a
better design that works on register units and expected to be a
slightly more compile time efficient, especially for targets that
have register tuples.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Time | Test | |
---|---|---|
60,030 ms | x64 debian > MLIR.Examples/standalone::test.toy |
Event Timeline
llvm/include/llvm/CodeGen/LiveRegUnits.h | ||
---|---|---|
115–120 | This is potentially confusing, I think either they need to have separate names indicating one considers reserved registers or not. Or there should just be the one that does consider reserved registers. Can't think of a case off the top of my head where you would ever want to ignore reservations | |
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | ||
34–37 | The isPhysRegUsed check should be redundant This loop seems backwards, we could start by finding unused regunits and go up to the the register |
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | ||
---|---|---|
34–37 | The utility for finding the used physical registers in a function is already available by querying the alias register set. However, in the case of Register Units, appears like we don't have one ready in the LiveRegUnits implementation that would help us track the used Register Units. At this point, we may have to compute the information on used register units which would require iterating over all instructions in the function, further worsening the complexity. Would it be worth going in that direction. |
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp | ||
---|---|---|
34–37 | Ideally UsedPhysRegMask would use register units and be up-to-date by this point |
This is potentially confusing, I think either they need to have separate names indicating one considers reserved registers or not. Or there should just be the one that does consider reserved registers. Can't think of a case off the top of my head where you would ever want to ignore reservations