[all-commits] [llvm/llvm-project] 167fd5: AMDGPU: Respect amdgpu-no-agpr in functions and wi...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Feb 21 00:01:36 PST 2025


  Branch: refs/heads/users/arsenm/amdgpu/stop-ignoring-amdgpu-no-agpr-functions
  Home:   https://github.com/llvm/llvm-project
  Commit: 167fd5a33f8ea0a162e31d33add76b202abcb43a
      https://github.com/llvm/llvm-project/commit/167fd5a33f8ea0a162e31d33add76b202abcb43a
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-02-21 (Fri, 21 Feb 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp
    M llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
    A llvm/test/CodeGen/AMDGPU/agpr-copy-no-free-registers-assertion-after-ra-failure.xfail.ll
    M llvm/test/CodeGen/AMDGPU/agpr-copy-no-free-registers.ll
    M llvm/test/CodeGen/AMDGPU/mfma-cd-select.ll
    M llvm/test/CodeGen/AMDGPU/spill-regpressure-less.mir
    M llvm/test/CodeGen/AMDGPU/vgpr-agpr-limit-gfx90a.ll

  Log Message:
  -----------
  AMDGPU: Respect amdgpu-no-agpr in functions and with calls

Remove the MIR scan to detect whether AGPRs are used or not,
and the special case for callable functions. This behavior was
confusing, and not overridable. The amdgpu-no-agpr attribute was
intended to avoid this imprecise heuristic for how many AGPRs to
allocate. It was also too confusing to make this interact with
the pending amdgpu-num-agpr replacement for amdgpu-no-agpr.

Also adds an xfail-ish test where the register allocator asserts
after allocation fails which I ran into.

Future work should reintroduce a more refined MIR scan to estimate
AGPR pressure for how to split AGPRs and VGPRs.



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