This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fix promote alloca pass creating huge arrays
ClosedPublic

Authored by arsenm on May 9 2016, 3:31 PM.

Details

Reviewers
tstellarAMD
Summary

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.

Diff Detail

Event Timeline

arsenm updated this revision to Diff 56646.May 9 2016, 3:31 PM
arsenm retitled this revision from to AMDGPU: Fix promote alloca pass creating huge arrays.
arsenm updated this object.
arsenm added a reviewer: tstellarAMD.
arsenm added a subscriber: llvm-commits.
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
163–164

We should use the amdgpu-max-waves-per-eu attribute here.

arsenm updated this revision to Diff 56992.May 11 2016, 8:23 PM

Fix attribute name

tstellarAMD accepted this revision.May 16 2016, 1:39 PM
tstellarAMD edited edge metadata.

LGTM.

This revision is now accepted and ready to land.May 16 2016, 1:39 PM
arsenm closed this revision.May 16 2016, 2:26 PM

r269708