[PATCH] D145586: [AMDGPU] Tweak PromoteAlloca limits

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 12:00:17 PST 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:181
-    MaxVGPRs = ST.getMaxNumVGPRs(ST.getWavesPerEU(F).first);
-    // A non-entry function has only 32 caller preserved registers.
-    // Do not promote alloca which will force spilling.
----------------
rampitec wrote:
> Isn't this still true? You might not see alloca, but you will see spills.
Trading spills inside a function for CSR spills can be profitable, such as if the spilling occurs in a loop.

IIRC this was to workaround some compile failures 


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145586/new/

https://reviews.llvm.org/D145586



More information about the llvm-commits mailing list