8 Commits

Author SHA1 Message Date
Matt Arsenault
3ea47bf285 AMDGPU: Don't error on out of bounds address spaces
We should never abort on valid IR. The most reasonable
interpretation of an arbitrary address space pointer is
probably some kind of special subset of global memory.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@341894 91177308-0d34-0410-b5e6-96231b3b80d8
2018-09-11 04:00:41 +00:00
Samuel Pitoiset
7226e5bf26 AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space
32-bit constant address space is declared as 6, so the
maximum number of address spaces is 6, not 5.

Fixes "LLVM ERROR: Pointer address space out of range".

v5: rename MAX_COMMON_ADDRESS to MAX_AMDGPU_ADDRESS
v4: - fix compilation issues
    - fix out of bounds access
v3: use static_assert()
v2: add a very simple test for 32-bit addr space

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106630

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340417 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-22 16:08:48 +00:00
Samuel Pitoiset
8ea5abf0df AMDGPU: fix existing alias rules for constant and global
Constant and global may alias, also one rules table wasn't
ordered correctly.

Pinpointed by Matt.

v2: add a test with swapped parameters

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340416 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-22 16:08:43 +00:00
Vitaly Buka
70a5f27583 Revert "AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space"
As it introduces out of bound access.

This reverts commit r340172 and r340171

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340202 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-20 19:31:03 +00:00
Samuel Pitoiset
52379849f9 AMDGPU: bump AS.MAX_COMMON_ADDRESS to 6 since 32-bit addr space
32-bit constant address space is declared as 6, so the
maximum number of address spaces is 6, not 5.

Fixes "LLVM ERROR: Pointer address space out of range".

v3: use static_assert()
v2: add a very simple test for 32-bit addr space

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106630
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340171 91177308-0d34-0410-b5e6-96231b3b80d8
2018-08-20 13:18:59 +00:00
Yaxun Liu
a2386c3b26 [AMDGPU] Switch to the new addr space mapping by default
This requires corresponding clang change.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324101 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-02 16:07:16 +00:00
Jan Vesely
1abd9ecbfc AMDGPU/R600: Fix amdgpu alias analysis pass.
R600 uses higher AS number to access kernel parameters

Fixes: r298846
Differential Revision: https://reviews.llvm.org/D31520

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299245 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-31 19:26:23 +00:00
Stanislav Mekhanoshin
30b1056d8f [AMDGPU] Add AMDGPUAliasAnalysis to opt pipeline
Previously it was added only to the BE.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298721 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-24 18:01:14 +00:00