HomePhabricator

AMDGPU/SI: Move the local memory usage related checking after calling…

Description

AMDGPU/SI: Move the local memory usage related checking after calling convention checking in PromoteAlloca

Summary:

Promoting Alloca to Vector and Promoting Alloca to LDS are two independent handling of Alloca and should not affect each other.

As a result, we should not give up promoting to vector if there is not enough LDS. This patch factors out the local memory usage
related checking out and replace it after the calling convention checking.

Reviewer:

arsenm

Differential Revision:

http://reviews.llvm.org/D33139