[PATCH] D148438: [AMDGPU] Allow AGPR hi16 regs in AMDGPUResourceUsageAnalysis
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 17 03:20:42 PDT 2023
Pierre-vh added a comment.
In D148438#4273268 <https://reviews.llvm.org/D148438#4273268>, @foad wrote:
> An alternative would be to fix/optimize the branch folder. Currently BranchFolder::mergeCommonTails adds IMPLICIT_DEFs based on the regs computed by LivePhysRegs:computeLiveIns before calling addLiveIns, which means it lacks the "Skip the register if we are about to add one of its super registers" optimization from addLiveIns and adds redundant IMPLICIT_DEFs of subregs. But I haven't found a neat way to implement this yet.
This sounds like it definitely needs fixing, but I feel like this is a separate issue. Resource usage analysis shouldn't crash on valid code, though i guess the definition of "valid" is quite loose here - agpr_hi16 isn't addressable I think so it's not exactly valid, but it doesn't crash at emission so I would say there's no reason for resource usage analysis to crash.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148438/new/
https://reviews.llvm.org/D148438
More information about the llvm-commits
mailing list