[all-commits] [llvm/llvm-project] cb0c71: AMDGPU: Adjust register allocation priority values...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Jul 25 12:47:27 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb0c71e8b198aedd7569c0561ad3efba1d3d5766
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-07-25 (Mon, 25 Jul 2022)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIRegisterInfo.td
    M llvm/test/CodeGen/AMDGPU/agpr-copy-no-free-registers.ll
    M llvm/test/CodeGen/AMDGPU/constant-address-space-32bit.ll
    M llvm/test/CodeGen/AMDGPU/extend-phi-subrange-not-in-parent.mir
    M llvm/test/CodeGen/AMDGPU/indirect-call.ll
    M llvm/test/CodeGen/AMDGPU/llvm.amdgcn.wqm.demote.ll
    M llvm/test/CodeGen/AMDGPU/spill-vgpr.ll
    M llvm/test/CodeGen/AMDGPU/srem64.ll
    M llvm/test/CodeGen/AMDGPU/unstructured-cfg-def-use-issue.ll
    M llvm/test/CodeGen/AMDGPU/urem64.ll

  Log Message:
  AMDGPU: Adjust register allocation priority values down

Set the priorities consistently to number of registers in the tuple -
1. Previously we started at 1, and also tried to give SGPR higher
values than VGPRs. There's no point in assigning SGPRs higher values
now that those are allocated in a separate regalloc run.

This avoids overflowing the 5 bits used for the class priority in the
allocation heuristic for 32 element tuples. This avoids some cases
where smaller registers unexpectedly get prioritized over larger.

  Commit: 62531518f989fb7dacf4b4bd3fa781a99f65c55e
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-07-25 (Mon, 25 Jul 2022)

  Changed paths:
    M llvm/lib/CodeGen/RegAllocGreedy.cpp
    M llvm/lib/CodeGen/RegAllocGreedy.h
    A llvm/test/CodeGen/AMDGPU/greedy-reverse-local-assignment.ll

  Log Message:
  RegAllocGreedy: Add a command line flag for reverseLocalAssignment

Introduce a flag like for some of the other target heuristic controls
to help with experimentation.

Compare: https://github.com/llvm/llvm-project/compare/d61d72dae604...62531518f989

More information about the All-commits mailing list