AMDGPU/SI: Move the local memory usage related checking after calling convention...
authorChangpeng Fang <changpeng.fang@gmail.com>
Tue, 23 May 2017 20:25:41 +0000 (20:25 +0000)
committerChangpeng Fang <changpeng.fang@gmail.com>
Tue, 23 May 2017 20:25:41 +0000 (20:25 +0000)
commit1dbace195d29b18dee93bb8f5fd906035e9daf83
treed63f6bc48aa696ee03d4456f2efd6d42aca7fa0b
parent3334cc017eecbd1eb95272cd5c523bdc01d1ed52
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

llvm-svn: 303684
llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
llvm/test/CodeGen/AMDGPU/vector-alloca.ll