[all-commits] [llvm/llvm-project] 92d119: AMDGPU: Add assertion to determineCalleeSaves

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Jan 26 10:02:05 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92d1195b5f76548ca35bc00d97e0a28053b2c4a4
      https://github.com/llvm/llvm-project/commit/92d1195b5f76548ca35bc00d97e0a28053b2c4a4
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFrameLowering.cpp

  Log Message:
  -----------
  AMDGPU: Add assertion to determineCalleeSaves

Make sure this isn't getting called multiple times. I was surprised we
were modifying the function here, which I think is a bit questionable.


  Commit: 5f9707b7960e9a86330dacb814b2ec55207e6f87
      https://github.com/llvm/llvm-project/commit/5f9707b7960e9a86330dacb814b2ec55207e6f87
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2021-01-26 (Tue, 26 Jan 2021)

  Changed paths:
    M llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
    A llvm/test/CodeGen/AMDGPU/need-fp-from-csr-vgpr-spill.ll

  Log Message:
  -----------
  AMDGPU: Fix redundant FP spilling/assert in some functions

If a function has stack objects, and a call, we require an FP. If we
did not initially have any stack objects, and only introduced them
during PrologEpilogInserter for CSR VGPR spills, SILowerSGPRSpills
would end up spilling the FP register as if it were a normal
register. This would result in an assert in a debug build, or
redundant handling of the FP register in a release build.

Try to predict that we will have an FP later, although this is ugly.


Compare: https://github.com/llvm/llvm-project/compare/7c03f7d7d04c...5f9707b7960e


More information about the All-commits mailing list