[all-commits] [llvm/llvm-project] e3c6fa: AMDGPU: Restrict soft clause bundling at half of t...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Thu Feb 11 11:09:23 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: e3c6fa36119ea428b17cef468e4aceee786433bf
https://github.com/llvm/llvm-project/commit/e3c6fa36119ea428b17cef468e4aceee786433bf
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2021-02-11 (Thu, 11 Feb 2021)
Changed paths:
M llvm/lib/Target/AMDGPU/SIFormMemoryClauses.cpp
M llvm/test/CodeGen/AMDGPU/gfx-callable-argument-types.ll
A llvm/test/CodeGen/AMDGPU/limit-soft-clause-reg-pressure.mir
A llvm/test/CodeGen/AMDGPU/soft-clause-exceeds-register-budget.ll
M llvm/test/CodeGen/AMDGPU/spill-vgpr-to-agpr.ll
M llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll
Log Message:
-----------
AMDGPU: Restrict soft clause bundling at half of the available regs
Fixes a testcase that was overcommitting large register tuples to a
bundle, which the register allocator could not possibly satisfy. This
was producing a bundle which used nearly all of the available SGPRs
with a series of 16-dword loads (not all of which are freely available
to use).
This is a quick hack for some deeper issues with how the clause
bundler tracks register pressure.
Overall the pressure tracking used here doesn't make sense and is too
imprecise for what it needs to avoid the allocator failing. The
pressure estimate does not account for the alignment requirements of
large SGPR tuples, so this was really underestimating the pressure
impact. This also ignores the impact of the extended live range of the
use registers after the bundle is introduced. Additionally, it didn't
account for some wide tuples not being available due to reserved
registers.
This regresses a few cases. These end up introducing more
spilling. This is also a function of the global pressure being used in
the decision to bundle, not the local pressure impact of the bundle
itself.
More information about the All-commits
mailing list