Skip to content

Commit 6459009

Browse files
vladimirlazsys_bbsycl
authored andcommitted
Merge remote-tracking branch 'sycl' into private/vlazarev/llvmspirv_pulldown
2 parents 2eb4d0a + ac94b1e commit 6459009

File tree

111 files changed

+8971
-1937
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+8971
-1937
lines changed

clang/include/clang/AST/Type.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -488,15 +488,12 @@ class Qualifiers {
488488
/// Returns true if the address space in these qualifiers is equal to or
489489
/// a superset of the address space in the argument qualifiers.
490490
bool isAddressSpaceSupersetOf(Qualifiers other) const {
491-
492-
return
493-
isAddressSpaceSupersetOf(getAddressSpace(), other.getAddressSpace()) ||
494-
(!hasAddressSpace() &&
495-
(other.getAddressSpace() == LangAS::sycl_private ||
496-
other.getAddressSpace() == LangAS::sycl_local ||
497-
other.getAddressSpace() == LangAS::sycl_global ||
498-
other.getAddressSpace() == LangAS::sycl_constant ||
499-
other.getAddressSpace() == LangAS::sycl_generic));
491+
return isAddressSpaceSupersetOf(getAddressSpace(),
492+
other.getAddressSpace()) ||
493+
(!hasAddressSpace() &&
494+
(other.getAddressSpace() == LangAS::opencl_private ||
495+
other.getAddressSpace() == LangAS::opencl_local ||
496+
other.getAddressSpace() == LangAS::opencl_global));
500497
}
501498

502499
/// Determines if these qualifiers compatibly include another set.

clang/include/clang/Basic/AddressSpaces.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,6 @@ enum class LangAS : unsigned {
4242
cuda_constant,
4343
cuda_shared,
4444

45-
sycl_global,
46-
sycl_local,
47-
sycl_constant,
48-
sycl_private,
49-
// Likely never used, but useful in the future to reserve the spot in the
50-
// enum.
51-
sycl_generic,
52-
5345
// Pointer size and extension address spaces.
5446
ptr32_sptr,
5547
ptr32_uptr,

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10731,8 +10731,6 @@ def err_builtin_launder_invalid_arg : Error<
1073110731
"'__builtin_launder' is not allowed">;
1073210732

1073310733
// SYCL-specific diagnostics
10734-
def err_sycl_attribute_address_space_invalid : Error<
10735-
"address space is outside the valid range of values">;
1073610734
def err_sycl_kernel_incorrectly_named : Error<
1073710735
"kernel %select{name is missing"
1073810736
"|needs to have a globally-visible name}0">;

clang/include/clang/Driver/Driver.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,11 @@ class Driver {
540540
/// GCC goes to extra lengths here to be a bit more robust.
541541
std::string GetTemporaryPath(StringRef Prefix, StringRef Suffix) const;
542542

543+
/// GetUniquePath = Return the pathname of a unique file to use
544+
/// as part of compilation. The file will have the given base name (BaseName)
545+
/// and extension (Ext).
546+
std::string GetUniquePath(StringRef BaseName, StringRef Ext) const;
547+
543548
/// GetTemporaryDirectory - Return the pathname of a temporary directory to
544549
/// use as part of compilation; the directory will have the given prefix.
545550
std::string GetTemporaryDirectory(StringRef Prefix) const;

clang/include/clang/Sema/ParsedAttr.h

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -617,24 +617,6 @@ class ParsedAttr final
617617
}
618618
}
619619

620-
/// If this is an OpenCL addr space attribute returns its SYCL representation
621-
/// in LangAS, otherwise returns default addr space.
622-
LangAS asSYCLLangAS() const {
623-
switch (getKind()) {
624-
case ParsedAttr::AT_OpenCLConstantAddressSpace:
625-
return LangAS::sycl_constant;
626-
case ParsedAttr::AT_OpenCLGlobalAddressSpace:
627-
return LangAS::sycl_global;
628-
case ParsedAttr::AT_OpenCLLocalAddressSpace:
629-
return LangAS::sycl_local;
630-
case ParsedAttr::AT_OpenCLPrivateAddressSpace:
631-
return LangAS::sycl_private;
632-
case ParsedAttr::AT_OpenCLGenericAddressSpace:
633-
default:
634-
return LangAS::Default;
635-
}
636-
}
637-
638620
AttributeCommonInfo::Kind getKind() const {
639621
return AttributeCommonInfo::Kind(Info.AttrKind);
640622
}

clang/lib/AST/ASTContext.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -928,11 +928,6 @@ static const LangASMap *getAddressSpaceMap(const TargetInfo &T,
928928
5, // cuda_device
929929
6, // cuda_constant
930930
7, // cuda_shared
931-
1, // sycl_global
932-
3, // sycl_local
933-
2, // sycl_constant
934-
0, // sycl_private
935-
4, // sycl_generic
936931
8, // ptr32_sptr
937932
9, // ptr32_uptr
938933
10 // ptr64

clang/lib/AST/TypePrinter.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1832,19 +1832,14 @@ std::string Qualifiers::getAddrSpaceAsString(LangAS AS) {
18321832
case LangAS::Default:
18331833
return "";
18341834
case LangAS::opencl_global:
1835-
case LangAS::sycl_global:
18361835
return "__global";
18371836
case LangAS::opencl_local:
1838-
case LangAS::sycl_local:
18391837
return "__local";
18401838
case LangAS::opencl_private:
1841-
case LangAS::sycl_private:
18421839
return "__private";
18431840
case LangAS::opencl_constant:
1844-
case LangAS::sycl_constant:
18451841
return "__constant";
18461842
case LangAS::opencl_generic:
1847-
case LangAS::sycl_generic:
18481843
return "__generic";
18491844
case LangAS::cuda_device:
18501845
return "__device__";

clang/lib/Basic/Targets/AMDGPU.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,6 @@ const LangASMap AMDGPUTargetInfo::AMDGPUDefIsGenMap = {
4848
Global, // cuda_device
4949
Constant, // cuda_constant
5050
Local, // cuda_shared
51-
Global, // sycl_global
52-
Local, // sycl_local
53-
Constant, // sycl_constant
54-
Private, // sycl_private
55-
Generic, // sycl_generic
5651
Generic, // ptr32_sptr
5752
Generic, // ptr32_uptr
5853
Generic // ptr64
@@ -68,11 +63,6 @@ const LangASMap AMDGPUTargetInfo::AMDGPUDefIsPrivMap = {
6863
Global, // cuda_device
6964
Constant, // cuda_constant
7065
Local, // cuda_shared
71-
Global, // sycl_global
72-
Local, // sycl_local
73-
Constant, // sycl_constant
74-
Private, // sycl_private
75-
Generic, // sycl_generic
7666
Generic, // ptr32_sptr
7767
Generic, // ptr32_uptr
7868
Generic // ptr64

clang/lib/Basic/Targets/NVPTX.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ static const unsigned NVPTXAddrSpaceMap[] = {
3333
1, // cuda_device
3434
4, // cuda_constant
3535
3, // cuda_shared
36-
1, // sycl_global
37-
3, // sycl_local
38-
4, // sycl_constant
39-
0, // sycl_private
40-
// FIXME: generic has to be added to the target
41-
0, // sycl_generic
4236
0, // ptr32_sptr
4337
0, // ptr32_uptr
4438
0 // ptr64

clang/lib/Basic/Targets/SPIR.h

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ static const unsigned SPIRAddrSpaceMap[] = {
3333
0, // cuda_device
3434
0, // cuda_constant
3535
0, // cuda_shared
36-
1, // sycl_global
37-
3, // sycl_local
38-
2, // sycl_constant
39-
0, // sycl_private
40-
4, // sycl_generic
4136
0, // ptr32_sptr
4237
0, // ptr32_uptr
4338
0 // ptr64
@@ -53,11 +48,6 @@ static const unsigned SYCLAddrSpaceMap[] = {
5348
0, // cuda_device
5449
0, // cuda_constant
5550
0, // cuda_shared
56-
1, // sycl_global
57-
3, // sycl_local
58-
2, // sycl_constant
59-
0, // sycl_private
60-
4, // sycl_generic
6151
0, // ptr32_sptr
6252
0, // ptr32_uptr
6353
0 // ptr64
@@ -70,11 +60,9 @@ class LLVM_LIBRARY_VISIBILITY SPIRTargetInfo : public TargetInfo {
7060
TLSSupported = false;
7161
VLASupported = false;
7262
LongWidth = LongAlign = 64;
73-
if (Triple.getEnvironment() == llvm::Triple::SYCLDevice) {
74-
AddrSpaceMap = &SYCLAddrSpaceMap;
75-
} else {
76-
AddrSpaceMap = &SPIRAddrSpaceMap;
77-
}
63+
AddrSpaceMap = (Triple.getEnvironment() == llvm::Triple::SYCLDevice)
64+
? &SYCLAddrSpaceMap
65+
: &SPIRAddrSpaceMap;
7866
UseAddrSpaceMapMangling = true;
7967
HasLegalHalfType = true;
8068
HasFloat16 = true;
@@ -135,8 +123,9 @@ class LLVM_LIBRARY_VISIBILITY SPIR32TargetInfo : public SPIRTargetInfo {
135123
PointerWidth = PointerAlign = 32;
136124
SizeType = TargetInfo::UnsignedInt;
137125
PtrDiffType = IntPtrType = TargetInfo::SignedInt;
138-
resetDataLayout("e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-"
139-
"v96:128-v192:256-v256:256-v512:512-v1024:1024");
126+
resetDataLayout(
127+
"e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-"
128+
"v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64");
140129
}
141130

142131
void getTargetDefines(const LangOptions &Opts,
@@ -151,8 +140,9 @@ class LLVM_LIBRARY_VISIBILITY SPIR64TargetInfo : public SPIRTargetInfo {
151140
SizeType = TargetInfo::UnsignedLong;
152141
PtrDiffType = IntPtrType = TargetInfo::SignedLong;
153142

154-
resetDataLayout("e-i64:64-v16:16-v24:32-v32:32-v48:64-"
155-
"v96:128-v192:256-v256:256-v512:512-v1024:1024");
143+
resetDataLayout(
144+
"e-i64:64-v16:16-v24:32-v32:32-v48:64-"
145+
"v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64");
156146
}
157147

158148
void getTargetDefines(const LangOptions &Opts,

0 commit comments

Comments
 (0)