HomePhabricator

[AMDGPU] Increase alignment of LDS globals if necessary before LDS lowering.

Authored by hsmhsm on Jun 3 2021, 9:04 PM.

Description

[AMDGPU] Increase alignment of LDS globals if necessary before LDS lowering.

Before packing LDS globals into a sorted structure, make sure that
their alignment is properly updated based on their size. This will make
sure that the members of sorted structure are properly aligned, and
hence it will further reduce the probability of unaligned LDS access.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D103261