[PATCH] D145586: [AMDGPU] Tweak PromoteAlloca limits

Pierre van Houtryve via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 00:22:31 PDT 2023


Pierre-vh added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp:408
+  const unsigned SizeFactor =
+      ((MaxVGPRs >= 64 && !PromoteAllocaToVectorLimit) ? 2 : 4);
+  if (DL.getTypeSizeInBits(AllocaTy) * SizeFactor > Limit) {
----------------
rampitec wrote:
> It does not make sense to me to do things differently if -amdgpu-promote-alloca-to-vector-limit is used. This option is not for users, it is for us to debug the pass and experiment. Changing pass behavior while debugging does not help.
Would you prefer if I left the factor to 1 so promote-alloca-to-vector-limit becomes an absolute value?
It'd change the behavior from before (because it was x4) but may make the option easier to understand.


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