aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
diff options
context:
space:
mode:
authorJeffrey Byrnes <jeffrey.byrnes@amd.com>2025-07-25 13:46:41 -0700
committerGitHub <noreply@github.com>2025-07-25 13:46:41 -0700
commit6118a254ff9acb4b54a6bdb952c088a792b679af (patch)
tree4aa75beb6db356b061e45026daeb90aa39beb0eb /llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp
parent64704c6346697efd1a981ff543f407303707b2b4 (diff)
downloadllvm-6118a254ff9acb4b54a6bdb952c088a792b679af.zip
llvm-6118a254ff9acb4b54a6bdb952c088a792b679af.tar.gz
llvm-6118a254ff9acb4b54a6bdb952c088a792b679af.tar.bz2
[AMDGPU] Allocate AVRegClass last (#146606)
This changes the RC priorities such that AVRegClass is the least prioritized. These registers are less constrained than the VRegClass and ARegClass as they can be either agpr or vgpr. Thus, assigning them last removes unnecessary constraints from VRegClass and ARegClass assignments, and allows the RA to make smarter decisions about whether to use vgpr / agpr for AVRegClass. We only have 5 bits for RC priorities, and we still want to prioritize larger RCs over smaller ones. Since this new prioritization uses the 5th bit for AVRegClass vs ARegClass / VRegClass, we only have 4 bits to encode the size priorities. Previously, each RC with a distinct size, had a distinct priority. However, this PR groups together multiple sizes to the same priority. Currently, this will have no effect on prioritization in practice because we only have one actually defined RC per group per vector register type. For example, a register class with 15 or 16 32bit registers will have the same size priority (14). However, we only have VReg_512 (VReg_480 doesn't exist), so only one actual RC in VRegClass has this priority. Similarly, we give register class with 17-32+ 32 bit registers a size priority of 15, but we only have VReg_1024. The effect of this PR is to prioritize first the vector register type (VReg & Areg have top priority, then AVReg), with the size of the register class having second priority. Passes PSDB. --------- Co-authored-by: Matt Arsenault <Matthew.Arsenault@amd.com>
Diffstat (limited to 'llvm/unittests/ExecutionEngine/Orc/ThreadSafeModuleTest.cpp')
0 files changed, 0 insertions, 0 deletions