[all-commits] [llvm/llvm-project] a7f489: [AMDGPU] Limit allocation of lo128 registers for o...

Stanislav Mekhanoshin via All-commits all-commits at lists.llvm.org
Wed Jan 14 16:41:05 PST 2026


  Branch: refs/heads/users/rampitec/lo128-occ-limit
  Home:   https://github.com/llvm/llvm-project
  Commit: a7f489b0c6686a9ee6ac6e0571868b445103e07b
      https://github.com/llvm/llvm-project/commit/a7f489b0c6686a9ee6ac6e0571868b445103e07b
  Author: Stanislav Mekhanoshin <Stanislav.Mekhanoshin at amd.com>
  Date:   2026-01-14 (Wed, 14 Jan 2026)

  Changed paths:
    M llvm/lib/Target/AMDGPU/GCNSubtarget.cpp
    M llvm/lib/Target/AMDGPU/GCNSubtarget.h
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.td
    M llvm/test/CodeGen/AMDGPU/regalloc-vgpr_lo128-gfx1250-t16.mir
    M llvm/test/CodeGen/AMDGPU/regalloc-vgpr_lo128-gfx1250.mir
    M llvm/test/CodeGen/AMDGPU/shrink-vgpr_lo128-gfx1250-t16.mir
    M llvm/test/CodeGen/AMDGPU/shrink-vgpr_lo128-gfx1250.mir

  Log Message:
  -----------
  [AMDGPU] Limit allocation of lo128 registers for occupancy

Parent change allows allocation of lo128 VGPRs from all 4 banks.
That may result in the undesired allocation leaving a hole of
maximum 128 registers in case if for example v0-v127 are allocated,
and v128-v255 are free.

Limit the available allocation order to the occupancy. Both hard
occupancy limits and occupancy achieved during scheduling are
considered. That is better to spill a register than to drop occupancy
in this case.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list