OSDN Git Service

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)
commit6b7bd0e1f9608748b277a0916a9e7f8aed4b2f82
tree2684b957e2bf5698041bef39d79a70300c7ff622
parent8eeef874d9f4e651a673bd776444a00d55a5fa45
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303684 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp
test/CodeGen/AMDGPU/vector-alloca.ll