[PATCH] D20087: AMDGPU: Fix promote alloca pass creating huge arrays

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 15:31:52 PDT 2016


arsenm created this revision.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
Herald added subscribers: kzhuravl, arsenm.

This was assuming it could use all memory before, which is
a bad decision because it restricts occupancy.
    
By default, only try to use enough space that could reduce
occupancy to 7, an arbitrarily chosen limit.
    
Based on the exist LDS usage, try to round up to the limit
in the current tier instead of further hurting occupancy.
This isn't ideal, because it doesn't accurately know how much
space is going to be used for alignment padding.

http://reviews.llvm.org/D20087

Files:
  lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
  lib/Target/AMDGPU/AMDGPUSubtarget.cpp
  lib/Target/AMDGPU/AMDGPUSubtarget.h
  lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
  lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  test/CodeGen/AMDGPU/array-ptr-calc-i32.ll
  test/CodeGen/AMDGPU/indirect-private-64.ll
  test/CodeGen/AMDGPU/large-work-group-promote-alloca.ll
  test/CodeGen/AMDGPU/private-memory-r600.ll
  test/CodeGen/AMDGPU/private-memory.ll
  test/CodeGen/AMDGPU/promote-alloca-globals.ll
  test/CodeGen/AMDGPU/promote-alloca-mem-intrinsics.ll
  test/CodeGen/AMDGPU/promote-alloca-no-opts.ll
  test/CodeGen/AMDGPU/promote-alloca-padding-size-estimate.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20087.56646.patch
Type: text/x-patch
Size: 37513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160509/ea039263/attachment.bin>


More information about the llvm-commits mailing list