[PATCH] D145586: [AMDGPU] Tweak PromoteAlloca limits
    Stanislav Mekhanoshin via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Mar 13 15:06:39 PDT 2023
    
    
  
rampitec 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) {
----------------
Pierre-vh wrote:
> 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.
It is absolute value, maximum size of alloca in bytes. But actually it looks like it still does the same. It is just the readability of this is off. But OK, resolved.
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