Skip to content

Commit f8b4182

Browse files
authored
Revert "[SPIR-V] Fixup storage class for global private (#116636)" (#118312)
This reverts commit aa7fe1c.
1 parent 071da92 commit f8b4182

File tree

20 files changed

+48
-127
lines changed

20 files changed

+48
-127
lines changed

clang/include/clang/Basic/AddressSpaces.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ enum class LangAS : unsigned {
5858

5959
// HLSL specific address spaces.
6060
hlsl_groupshared,
61-
hlsl_private,
6261

6362
// Wasm specific address spaces.
6463
wasm_funcref,

clang/lib/AST/TypePrinter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,8 +2553,6 @@ std::string Qualifiers::getAddrSpaceAsString(LangAS AS) {
25532553
return "__funcref";
25542554
case LangAS::hlsl_groupshared:
25552555
return "groupshared";
2556-
case LangAS::hlsl_private:
2557-
return "hlsl_private";
25582556
default:
25592557
return std::to_string(toTargetAddressSpace(AS));
25602558
}

clang/lib/Basic/TargetInfo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ static const LangASMap FakeAddrSpaceMap = {
4747
11, // ptr32_uptr
4848
12, // ptr64
4949
13, // hlsl_groupshared
50-
14, // hlsl_private
5150
20, // wasm_funcref
5251
};
5352

clang/lib/Basic/Targets/AArch64.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ static const unsigned ARM64AddrSpaceMap[] = {
4444
static_cast<unsigned>(AArch64AddrSpace::ptr32_uptr),
4545
static_cast<unsigned>(AArch64AddrSpace::ptr64),
4646
0, // hlsl_groupshared
47-
0, // hlsl_private
4847
// Wasm address space values for this target are dummy values,
4948
// as it is only enabled for Wasm targets.
5049
20, // wasm_funcref

clang/lib/Basic/Targets/AMDGPU.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ const LangASMap AMDGPUTargetInfo::AMDGPUDefIsGenMap = {
5959
llvm::AMDGPUAS::FLAT_ADDRESS, // ptr32_uptr
6060
llvm::AMDGPUAS::FLAT_ADDRESS, // ptr64
6161
llvm::AMDGPUAS::FLAT_ADDRESS, // hlsl_groupshared
62-
llvm::AMDGPUAS::FLAT_ADDRESS, // hlsl_private
6362
};
6463

6564
const LangASMap AMDGPUTargetInfo::AMDGPUDefIsPrivMap = {
@@ -84,7 +83,6 @@ const LangASMap AMDGPUTargetInfo::AMDGPUDefIsPrivMap = {
8483
llvm::AMDGPUAS::FLAT_ADDRESS, // ptr32_uptr
8584
llvm::AMDGPUAS::FLAT_ADDRESS, // ptr64
8685
llvm::AMDGPUAS::FLAT_ADDRESS, // hlsl_groupshared
87-
llvm::AMDGPUAS::FLAT_ADDRESS, // hlsl_private
8886

8987
};
9088
} // namespace targets

clang/lib/Basic/Targets/DirectX.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,15 @@ static const unsigned DirectXAddrSpaceMap[] = {
3333
0, // cuda_constant
3434
0, // cuda_shared
3535
// SYCL address space values for this map are dummy
36-
0, // sycl_global
37-
0, // sycl_global_device
38-
0, // sycl_global_host
39-
0, // sycl_local
40-
0, // sycl_private
41-
0, // ptr32_sptr
42-
0, // ptr32_uptr
43-
0, // ptr64
44-
3, // hlsl_groupshared
45-
10, // hlsl_private
36+
0, // sycl_global
37+
0, // sycl_global_device
38+
0, // sycl_global_host
39+
0, // sycl_local
40+
0, // sycl_private
41+
0, // ptr32_sptr
42+
0, // ptr32_uptr
43+
0, // ptr64
44+
3, // hlsl_groupshared
4645
// Wasm address space values for this target are dummy values,
4746
// as it is only enabled for Wasm targets.
4847
20, // wasm_funcref

clang/lib/Basic/Targets/NVPTX.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ static const unsigned NVPTXAddrSpaceMap[] = {
4646
0, // ptr32_uptr
4747
0, // ptr64
4848
0, // hlsl_groupshared
49-
0, // hlsl_private
5049
// Wasm address space values for this target are dummy values,
5150
// as it is only enabled for Wasm targets.
5251
20, // wasm_funcref

clang/lib/Basic/Targets/SPIR.h

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,15 @@ static const unsigned SPIRDefIsPrivMap[] = {
3838
0, // cuda_constant
3939
0, // cuda_shared
4040
// SYCL address space values for this map are dummy
41-
0, // sycl_global
42-
0, // sycl_global_device
43-
0, // sycl_global_host
44-
0, // sycl_local
45-
0, // sycl_private
46-
0, // ptr32_sptr
47-
0, // ptr32_uptr
48-
0, // ptr64
49-
0, // hlsl_groupshared
50-
10, // hlsl_private
41+
0, // sycl_global
42+
0, // sycl_global_device
43+
0, // sycl_global_host
44+
0, // sycl_local
45+
0, // sycl_private
46+
0, // ptr32_sptr
47+
0, // ptr32_uptr
48+
0, // ptr64
49+
0, // hlsl_groupshared
5150
// Wasm address space values for this target are dummy values,
5251
// as it is only enabled for Wasm targets.
5352
20, // wasm_funcref
@@ -70,18 +69,17 @@ static const unsigned SPIRDefIsGenMap[] = {
7069
// cuda_constant pointer can be casted to default/"flat" pointer, but in
7170
// SPIR-V casts between constant and generic pointers are not allowed. For
7271
// this reason cuda_constant is mapped to SPIR-V CrossWorkgroup.
73-
1, // cuda_constant
74-
3, // cuda_shared
75-
1, // sycl_global
76-
5, // sycl_global_device
77-
6, // sycl_global_host
78-
3, // sycl_local
79-
0, // sycl_private
80-
0, // ptr32_sptr
81-
0, // ptr32_uptr
82-
0, // ptr64
83-
0, // hlsl_groupshared
84-
10, // hlsl_private
72+
1, // cuda_constant
73+
3, // cuda_shared
74+
1, // sycl_global
75+
5, // sycl_global_device
76+
6, // sycl_global_host
77+
3, // sycl_local
78+
0, // sycl_private
79+
0, // ptr32_sptr
80+
0, // ptr32_uptr
81+
0, // ptr64
82+
0, // hlsl_groupshared
8583
// Wasm address space values for this target are dummy values,
8684
// as it is only enabled for Wasm targets.
8785
20, // wasm_funcref

clang/lib/Basic/Targets/SystemZ.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ static const unsigned ZOSAddressMap[] = {
4242
1, // ptr32_uptr
4343
0, // ptr64
4444
0, // hlsl_groupshared
45-
0, // hlsl_private
4645
0 // wasm_funcref
4746
};
4847

clang/lib/Basic/Targets/TCE.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ static const unsigned TCEOpenCLAddrSpaceMap[] = {
5151
0, // ptr32_uptr
5252
0, // ptr64
5353
0, // hlsl_groupshared
54-
0, // hlsl_private
5554
// Wasm address space values for this target are dummy values,
5655
// as it is only enabled for Wasm targets.
5756
20, // wasm_funcref

0 commit comments

Comments
 (0)