Skip to content

Commit 3d26c97

Browse files
committed
Fixed missing stuff
Signed-off-by: Dmitry Sidorov <dmitry.sidorov@intel.com>
1 parent c1df2e1 commit 3d26c97

File tree

4 files changed

+13
-25
lines changed

4 files changed

+13
-25
lines changed

clang/include/clang/AST/Type.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,8 @@ class Qualifiers {
482482
(A == LangAS::opencl_generic && B != LangAS::opencl_constant) ||
483483
// For USM extension we define usm_device and usm_host addres spaces,
484484
// which are a subset of __global.
485-
(A == LangAS::opencl_global && (B == LangAS::opencl_usm_device ||
486-
B == LangAS::opencl_usm_host)) ||
485+
(A == LangAS::opencl_global &&
486+
(B == LangAS::opencl_usm_device || B == LangAS::opencl_usm_host)) ||
487487
// Consider pointer size address spaces to be equivalent to default.
488488
((isPtrSizeAddressSpace(A) || A == LangAS::Default) &&
489489
(isPtrSizeAddressSpace(B) || B == LangAS::Default));

clang/include/clang/Basic/AttrDocs.td

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3556,18 +3556,6 @@ those that access host memory.
35563556
}];
35573557
}
35583558

3559-
def OpenCLAddressSpaceGlobalHostDocs : Documentation {
3560-
let Category = DocOpenCLAddressSpaces;
3561-
let Heading = "[[clang::opencl_usm_host]]";
3562-
let Content = [{
3563-
The usm_host address space attribute specifies that an object is allocated in
3564-
global memory on host. It is supposed to be used only in SYCL headers and not in
3565-
the actual OpenCL/SYCL user code. It helps distinguishing USM pointers that
3566-
access host memory from those that access device memory and from accessors that
3567-
access global memory.
3568-
}];
3569-
}
3570-
35713559
def OpenCLAddressSpaceLocalDocs : Documentation {
35723560
let Category = DocOpenCLAddressSpaces;
35733561
let Heading = "__local, local, [[clang::opencl_local]]";

clang/lib/Basic/Targets/NVPTX.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ static const unsigned NVPTXAddrSpaceMap[] = {
2929
4, // opencl_constant
3030
0, // opencl_private
3131
// FIXME: generic has to be added to the target
32-
0, // opencl_generic
33-
1, // opencl_usm_device
34-
1, // opencl_usm_host
35-
1, // cuda_device
36-
4, // cuda_constant
37-
3, // cuda_shared
38-
0, // ptr32_sptr
39-
0, // ptr32_uptr
40-
0 // ptr64
32+
0, // opencl_generic
33+
1, // opencl_usm_device
34+
1, // opencl_usm_host
35+
1, // cuda_device
36+
4, // cuda_constant
37+
3, // cuda_shared
38+
0, // ptr32_sptr
39+
0, // ptr32_uptr
40+
0 // ptr64
4141
};
4242

4343
/// The DWARF address class. Taken from

clang/test/SemaSYCL/address-space-parameter-conversions.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
void bar(int & Data) {}
44
void bar2(int & Data) {}
55
void bar(__attribute__((opencl_private)) int & Data) {}
6-
void bar3(__attribute__((opencl_global)) int & Data) {}
6+
void bar3(__attribute__((opencl_global)) int &Data) {}
77
void foo(int * Data) {}
88
void foo2(int * Data) {}
99
void foo(__attribute__((opencl_private)) int * Data) {}
10-
void foo3(__attribute__((opencl_global)) int * Data) {}
10+
void foo3(__attribute__((opencl_global)) int *Data) {}
1111

1212
template<typename T>
1313
void tmpl(T *t){}

0 commit comments

Comments
 (0)