[all-commits] [llvm/llvm-project] d37673: RegAllocGreedy: Fix subrange based instruction spl...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Fri Dec 20 00:45:40 PST 2024


  Branch: refs/heads/users/arsenm/greedy-fix-subrange-instruction-split-logic
  Home:   https://github.com/llvm/llvm-project
  Commit: d376736e94529e082b00d370395c47086172596e
      https://github.com/llvm/llvm-project/commit/d376736e94529e082b00d370395c47086172596e
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2024-12-20 (Fri, 20 Dec 2024)

  Changed paths:
    M llvm/lib/CodeGen/RegAllocGreedy.cpp
    M llvm/test/CodeGen/AMDGPU/gfx-callable-return-types.ll
    A llvm/test/CodeGen/AMDGPU/inflated-reg-class-snippet-copy-inst-reads-lane-subset-use-after-free.mir
    M llvm/test/CodeGen/AMDGPU/inflated-reg-class-snippet-copy-use-after-free.mir
    M llvm/test/CodeGen/AMDGPU/remat-smrd.mir
    M llvm/test/CodeGen/AMDGPU/splitkit-copy-live-lanes.mir
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-interleaved-access.ll
    M llvm/test/CodeGen/RISCV/rvv/vector-deinterleave-load.ll
    M llvm/test/CodeGen/RISCV/rvv/vector-deinterleave.ll

  Log Message:
  -----------
  RegAllocGreedy: Fix subrange based instruction split logic

Fix the logic for readsLaneSubset. Check at the correct point
for the use operands of the instruction, instead of the result.
Only consider the use register operands, and stop considering
whether the subranges are actually live at this point.

This avoids some unproductive splits. This also happens to avoid
a use after free due to a split of an unspillable register. That
issue still exists if the instruction does not reference the full
set of register lanes.



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