[PATCH] D95795: [AMDGPU] Add new CostPerUse values for VGPRs
Christudasan Devadasan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 09:39:52 PST 2021
cdevadas created this revision.
cdevadas added a reviewer: arsenm.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
cdevadas requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
We introduced more scratch VGPRs with D76356 <https://reviews.llvm.org/D76356>.
To yield a better occupancy, the CSRs and
the scratch registers were interleaved at a
regular interval.
This patch is to have a balanced allocation of
both CSRs and scratch registers by setting high
cost value for higher indices. This should improve the
cases that ended up with a higher register usage when
one set of VGPRs (either CSR or scratch) is over
allocated than the other.
With D86836 <https://reviews.llvm.org/D86836> targets can support multiple cost models.
The new cost values will be applied only in the presence
of a calling convention. Otherwise, the default
cost model will be used.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95795
Files:
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
llvm/lib/Target/AMDGPU/SIRegisterInfo.h
llvm/lib/Target/AMDGPU/SIRegisterInfo.td
llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement-stack-lower.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/saddsat.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/ssubsat.ll
llvm/test/CodeGen/AMDGPU/splitkit-copy-live-lanes.mir
llvm/test/CodeGen/AMDGPU/vgpr-tuple-allocation.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95795.320501.patch
Type: text/x-patch
Size: 151588 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210201/f9a8c00b/attachment-0001.bin>
More information about the llvm-commits
mailing list