mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
AMDGPU: Improve alias analysis for GDS
Summary: GDS cannot alias anything else. Original patch by: Marek Olšák Reviewers: arsenm, mareko Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, Petar.Avramovic, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64114 Change-Id: I07bfbd96f5d5c37a6dfba7997df12f291dd794b0 llvm-svn: 366313
This commit is contained in:
parent
2e592185f9
commit
b38a60e03a
@ -56,13 +56,13 @@ void AMDGPUAAWrapperPass::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
// These arrays are indexed by address space value enum elements 0 ... to 7
|
||||
static const AliasResult ASAliasRules[8][8] = {
|
||||
/* Flat Global Region Group Constant Private Constant 32-bit Buffer Fat Ptr */
|
||||
/* Flat */ {MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
|
||||
/* Flat */ {MayAlias, MayAlias, NoAlias, MayAlias, MayAlias, MayAlias, MayAlias, MayAlias},
|
||||
/* Global */ {MayAlias, MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, MayAlias},
|
||||
/* Region */ {MayAlias, NoAlias , NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, NoAlias},
|
||||
/* Region */ {NoAlias, NoAlias , MayAlias, NoAlias , NoAlias, NoAlias , NoAlias, NoAlias},
|
||||
/* Group */ {MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , NoAlias , NoAlias , NoAlias},
|
||||
/* Constant */ {MayAlias, MayAlias, MayAlias, NoAlias , NoAlias , NoAlias , MayAlias, MayAlias},
|
||||
/* Constant */ {MayAlias, MayAlias, NoAlias, NoAlias , NoAlias , NoAlias , MayAlias, MayAlias},
|
||||
/* Private */ {MayAlias, NoAlias , NoAlias , NoAlias , NoAlias , MayAlias, NoAlias , NoAlias},
|
||||
/* Constant 32-bit */ {MayAlias, MayAlias, MayAlias, NoAlias , MayAlias, NoAlias , NoAlias , MayAlias},
|
||||
/* Constant 32-bit */ {MayAlias, MayAlias, NoAlias, NoAlias , MayAlias, NoAlias , NoAlias , MayAlias},
|
||||
/* Buffer Fat Ptr */ {MayAlias, MayAlias, NoAlias , NoAlias , MayAlias, NoAlias , MayAlias, MayAlias}
|
||||
};
|
||||
|
||||
|
@ -51,6 +51,41 @@ define void @test_999_1(i8 addrspace(999)* %p, i8 addrspace(1)* %p1) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: NoAlias: i8 addrspace(2)* %p, i8* %p1
|
||||
define void @test_region_vs_flat(i8 addrspace(2)* %p, i8 addrspace(0)* %p1) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: NoAlias: i8 addrspace(1)* %p1, i8 addrspace(2)* %p
|
||||
define void @test_region_vs_global(i8 addrspace(2)* %p, i8 addrspace(1)* %p1) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: MayAlias: i8 addrspace(2)* %p, i8 addrspace(2)* %p1
|
||||
define void @test_region(i8 addrspace(2)* %p, i8 addrspace(2)* %p1) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: NoAlias: i8 addrspace(2)* %p, i8 addrspace(3)* %p1
|
||||
define void @test_region_vs_group(i8 addrspace(2)* %p, i8 addrspace(3)* %p1) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: NoAlias: i8 addrspace(2)* %p, i8 addrspace(4)* %p1
|
||||
define void @test_region_vs_constant(i8 addrspace(2)* %p, i8 addrspace(4)* %p1) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: NoAlias: i8 addrspace(2)* %p, i8 addrspace(5)* %p1
|
||||
define void @test_region_vs_private(i8 addrspace(2)* %p, i8 addrspace(5)* %p1) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: NoAlias: i8 addrspace(2)* %p, i8 addrspace(6)* %p1
|
||||
define void @test_region_vs_const32(i8 addrspace(2)* %p, i8 addrspace(6)* %p1) {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK: MayAlias: i8 addrspace(7)* %p, i8* %p1
|
||||
define void @test_7_0(i8 addrspace(7)* %p, i8 addrspace(0)* %p1) {
|
||||
ret void
|
||||
|
Loading…
x
Reference in New Issue
Block a user