Skip to content

Commit 839d45b

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents e1e3308 + 0877be6 commit 839d45b

File tree

355 files changed

+74613
-20490
lines changed

Some content is hidden

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

355 files changed

+74613
-20490
lines changed

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
* @bader
22

33
# Front-end compiler
4-
clang/ @Fznamznon @premanandrao @elizabethandrews
4+
clang/ @premanandrao @elizabethandrews
55

66
# Driver
77
clang/**/Driver @mdtoguchi @AGindinson
@@ -103,6 +103,7 @@ llvm/tools/sycl-post-link/ @kbobrovs @AlexeySachkov
103103
# Clang offload tools
104104
clang/tools/clang-offload-bundler/ @kbobrovs @sndmitriev
105105
clang/tools/clang-offload-wrapper/ @sndmitriev @kbobrovs
106+
clang/tools/clang-offload-deps/ @sndmitriev
106107

107108
# Explicit SIMD
108109
SYCLLowerIR/ @kbobrovs

.github/workflows/sync-main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: automatic sync main branch from llvm-project to llvm
22

33
on:
44
schedule:
5-
- cron: '/10 * * * *'
5+
- cron: '*/10 * * * *'
66
jobs:
77
sync:
88
runs-on: ubuntu-latest

buildbot/configure.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ def do_configure(args):
1717
sycl_dir = os.path.join(abs_src_dir, "sycl")
1818
spirv_dir = os.path.join(abs_src_dir, "llvm-spirv")
1919
xpti_dir = os.path.join(abs_src_dir, "xpti")
20-
xptifw_dir = os.path.join(abs_src_dir, "xptifw")
2120
libdevice_dir = os.path.join(abs_src_dir, "libdevice")
2221
ocl_header_dir = os.path.join(abs_obj_dir, "OpenCL-Headers")
2322
icd_loader_lib = os.path.join(abs_obj_dir, "OpenCL-ICD-Loader", "build")
2423
llvm_targets_to_build = 'X86'
25-
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti;xptifw;libdevice'
24+
llvm_enable_projects = 'clang;llvm-spirv;sycl;opencl-aot;xpti;libdevice'
2625
libclc_targets_to_build = ''
2726
sycl_build_pi_cuda = 'OFF'
2827
sycl_werror = 'ON'
@@ -64,12 +63,10 @@ def do_configure(args):
6463
"-DCMAKE_BUILD_TYPE={}".format(args.build_type),
6564
"-DLLVM_ENABLE_ASSERTIONS={}".format(llvm_enable_assertions),
6665
"-DLLVM_TARGETS_TO_BUILD={}".format(llvm_targets_to_build),
67-
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot;xpti;xptifw;libdevice",
66+
"-DLLVM_EXTERNAL_PROJECTS=sycl;llvm-spirv;opencl-aot;xpti;libdevice",
6867
"-DLLVM_EXTERNAL_SYCL_SOURCE_DIR={}".format(sycl_dir),
6968
"-DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR={}".format(spirv_dir),
7069
"-DLLVM_EXTERNAL_XPTI_SOURCE_DIR={}".format(xpti_dir),
71-
"-DXPTI_SOURCE_DIR={}".format(xpti_dir),
72-
"-DLLVM_EXTERNAL_XPTIFW_SOURCE_DIR={}".format(xptifw_dir),
7370
"-DLLVM_EXTERNAL_LIBDEVICE_SOURCE_DIR={}".format(libdevice_dir),
7471
"-DLLVM_ENABLE_PROJECTS={}".format(llvm_enable_projects),
7572
"-DLIBCLC_TARGETS_TO_BUILD={}".format(libclc_targets_to_build),

buildbot/dependency.conf

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ ocl_cpu_rt_ver=2020.11.11.0.04
44
# https://github.com/intel/llvm/releases/download/2020-WW45/win-oclcpuexp-2020.11.11.0.04_rel.zip
55
ocl_cpu_rt_ver_win=2020.11.11.0.04
66
# Same GPU driver supports Level Zero and OpenCL
7-
# https://github.com/intel/compute-runtime/releases/tag/20.46.18421
8-
ocl_gpu_rt_ver=20.46.18421
7+
# https://github.com/intel/compute-runtime/releases/tag/20.52.18783
8+
ocl_gpu_rt_ver=20.52.18783
99
# Same GPU driver supports Level Zero and OpenCL
10-
# https://downloadmirror.intel.com/29988/a08/igfx_win10_100.8935.zip
11-
ocl_gpu_rt_ver_win=27.20.100.8935
10+
# https://downloadmirror.intel.com/30066/a08/igfx_win10_100.9030.zip
11+
ocl_gpu_rt_ver_win=27.20.100.9030
1212
intel_sycl_ver=build
1313
# https://github.com/oneapi-src/oneTBB/releases/download/v2021.1-beta10/oneapi-tbb-2021.1-beta10-lin.tgz
1414
tbb_ver=2021.1.053
@@ -21,12 +21,13 @@ ocl_fpga_emu_ver=2020.11.11.0.04
2121
ocl_fpga_emu_ver_win=2020.11.11.0.04
2222
fpga_ver=20201021_000005
2323
fpga_ver_win=20201022_000005
24+
ocloc_ver_win=27.20.100.8935
2425

2526
[DRIVER VERSIONS]
2627
cpu_driver_lin=2020.11.11.0.04
2728
cpu_driver_win=2020.11.11.0.04
28-
gpu_driver_lin=20.46.18421
29-
gpu_driver_win=27.20.100.8935
29+
gpu_driver_lin=20.52.18783
30+
gpu_driver_win=27.20.100.9030
3031
fpga_driver_lin=2020.11.11.0.04
3132
fpga_driver_win=2020.11.11.0.04
3233
# NVidia CUDA driver
@@ -45,3 +46,4 @@ ocl_gpu_root_win=
4546
fpga_root_win={ARCHIVE_ROOT}/comp/oclfpga/win
4647
ocl_fpga_emu_root_win={DEPS_ROOT}/opencl/runtime/win/oclfpgaemu
4748
tbb_root_win={DEPS_ROOT}/tbb/win
49+
ocloc_root_win={DEPS_ROOT}/opencl/ocloc/win

buildbot/windows.vrd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@
2121
:eadb PATH={COMP_ROOT}/lib
2222
:eadb PATH={COMP_ROOT}/install/bin
2323
:eadb PATH={COMP_ROOT}/install/lib
24+
25+
# For OCLOC
26+
:eade PATH={OCLOCROOT}/{OCLOCVER}

clang/include/clang/Basic/Attr.td

Lines changed: 37 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,7 @@ def SYCLIntelSchedulerTargetFmaxMhz : InheritableAttr {
12831283
return 0;
12841284
}
12851285
static unsigned getMaxValue() {
1286-
return 1048576;
1286+
return 1024*1024;
12871287
}
12881288
}];
12891289

@@ -1292,13 +1292,18 @@ def SYCLIntelSchedulerTargetFmaxMhz : InheritableAttr {
12921292
def SYCLIntelMaxWorkGroupSize : InheritableAttr {
12931293
let Spellings = [CXX11<"intelfpga","max_work_group_size">,
12941294
CXX11<"intel","max_work_group_size">];
1295-
let Args = [UnsignedArgument<"XDim">,
1296-
UnsignedArgument<"YDim">,
1297-
UnsignedArgument<"ZDim">];
1295+
let Args = [ExprArgument<"XDim">,
1296+
ExprArgument<"YDim">,
1297+
ExprArgument<"ZDim">];
12981298
let LangOpts = [SYCLIsDevice, SYCLIsHost];
12991299
let Subjects = SubjectList<[Function], ErrorDiag>;
1300-
let Documentation = [SYCLIntelMaxWorkGroupSizeAttrDocs];
13011300
let PragmaAttributeSupport = 0;
1301+
let AdditionalMembers = [{
1302+
ArrayRef<const Expr *> dimensions() const {
1303+
return {getXDim(), getYDim(), getZDim()};
1304+
}
1305+
}];
1306+
let Documentation = [SYCLIntelMaxWorkGroupSizeAttrDocs];
13021307
}
13031308

13041309
def SYCLIntelMaxGlobalWorkDim : InheritableAttr {
@@ -1321,6 +1326,25 @@ def SYCLIntelNoGlobalWorkOffset : InheritableAttr {
13211326
let PragmaAttributeSupport = 0;
13221327
}
13231328

1329+
def SYCLIntelLoopFuse : InheritableAttr {
1330+
let Spellings = [CXX11<"intel", "loop_fuse">,
1331+
CXX11<"intel", "loop_fuse_independent">];
1332+
let Args = [ExprArgument<"Value", /*optional=*/ 1>];
1333+
let LangOpts = [SYCLIsDevice, SYCLIsHost];
1334+
let Subjects = SubjectList<[Function], ErrorDiag>;
1335+
let Accessors = [Accessor<"isIndependent",
1336+
[CXX11<"intel", "loop_fuse_independent">]>];
1337+
let Documentation = [SYCLIntelLoopFuseDocs];
1338+
let AdditionalMembers = [{
1339+
static unsigned getMinValue() {
1340+
return 0;
1341+
}
1342+
static unsigned getMaxValue() {
1343+
return 1024*1024;
1344+
}
1345+
}];
1346+
}
1347+
13241348
def C11NoReturn : InheritableAttr {
13251349
let Spellings = [Keyword<"_Noreturn">];
13261350
let Subjects = SubjectList<[Function], ErrorDiag>;
@@ -2821,9 +2845,15 @@ def ReqdWorkGroupSize : InheritableAttr {
28212845
let Spellings = [GNU<"reqd_work_group_size">,
28222846
CXX11<"intel","reqd_work_group_size">,
28232847
CXX11<"cl","reqd_work_group_size">];
2824-
let Args = [UnsignedArgument<"XDim">, DefaultUnsignedArgument<"YDim", 1>,
2825-
DefaultUnsignedArgument<"ZDim", 1>];
2848+
let Args = [ExprArgument<"XDim">,
2849+
ExprArgument<"YDim", /*optional*/1>,
2850+
ExprArgument<"ZDim", /*optional*/1>];
28262851
let Subjects = SubjectList<[Function], ErrorDiag>;
2852+
let AdditionalMembers = [{
2853+
ArrayRef<const Expr *> dimensions() const {
2854+
return {getXDim(), getYDim(), getZDim()};
2855+
}
2856+
}];
28272857
let Documentation = [ReqdWorkGroupSizeAttrDocs];
28282858
}
28292859

clang/include/clang/Basic/AttrDocs.td

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2612,6 +2612,34 @@ loop should not be fused with any adjacent loop.
26122612
}];
26132613
}
26142614

2615+
def SYCLIntelLoopFuseDocs : Documentation {
2616+
let Category = DocCatFunction;
2617+
let Heading = "loop_fuse, loop_fuse_independent";
2618+
let Content = [{
2619+
``[[intel::loop_fuse(N)]]`` and ``[[intel::loop_fuse_independent(N)]]`` attributes apply
2620+
to a function/lambda function. It is a strong request, to the extent possible, to fuse
2621+
the loops within the function, that are contained in at most N-1 other loops within the
2622+
function. If the optional parameter N is omitted, it is a strong request, to the extent
2623+
possible, to fuse loops within the function that are not contained in any other loop
2624+
within the function. ``[[intel::loop_fuse_independent(N)]]`` also guarantees that fusion
2625+
safety analysis can ignore negative-distance dependences between these loops.
2626+
2627+
.. code-block:: c++
2628+
2629+
[[intel::loop_fuse(N)]]
2630+
int foo() {}
2631+
2632+
[[intel::loop_fuse_independent(N)]]
2633+
int foo() {}
2634+
2635+
2636+
``[[intel::loop_fuse(N)]]`` and ``[[intel::loop_fuse_independent(N)]]`` takes one optional
2637+
parameter that is a constant unsigned integer expression. The parameter N may be a template
2638+
parameter.
2639+
2640+
}];
2641+
}
2642+
26152643
def SYCLDeviceIndirectlyCallableDocs : Documentation {
26162644
let Category = DocCatFunction;
26172645
let Heading = "intel::device_indirectly_callable";

clang/include/clang/Basic/AttributeCommonInfo.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ class AttributeCommonInfo {
166166
ParsedAttr == AT_SYCLIntelMaxWorkGroupSize ||
167167
ParsedAttr == AT_SYCLIntelMaxGlobalWorkDim ||
168168
ParsedAttr == AT_SYCLIntelNoGlobalWorkOffset ||
169-
ParsedAttr == AT_SYCLIntelUseStallEnableClusters)
169+
ParsedAttr == AT_SYCLIntelUseStallEnableClusters ||
170+
ParsedAttr == AT_SYCLIntelLoopFuse)
170171
return true;
171172

172173
return false;

clang/include/clang/Basic/DiagnosticGroups.td

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,10 @@ def NSReturnsMismatch : DiagGroup<"nsreturns-mismatch">;
669669
def IndependentClassAttribute : DiagGroup<"IndependentClass-attribute">;
670670
def UnknownAttributes : DiagGroup<"unknown-attributes">;
671671
def IgnoredAttributes : DiagGroup<"ignored-attributes">;
672+
def AcceptedAttributes : DiagGroup<"accepted-attributes">;
672673
def Attributes : DiagGroup<"attributes", [UnknownAttributes,
673-
IgnoredAttributes]>;
674+
IgnoredAttributes,
675+
AcceptedAttributes]>;
674676
def UnknownSanitizers : DiagGroup<"unknown-sanitizers">;
675677
def UnnamedTypeTemplateArgs : DiagGroup<"unnamed-type-template-args",
676678
[CXX98CompatUnnamedTypeTemplateArgs]>;

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,23 +130,25 @@ def err_intel_fpga_memory_arg_invalid : Error<
130130
def err_intel_fpga_merge_dir_invalid : Error<
131131
"merge direction must be 'depth' or 'width'">;
132132
def err_intel_fpga_reg_limitations : Error <
133-
"Illegal %select{argument of type %1 |field in argument}0 to __builtin_intel_fpga_reg.">;
133+
"illegal %select{argument of type %1 |field in argument}0 to "
134+
"__builtin_intel_fpga_reg">;
134135
def illegal_type_declared_here : Note<
135-
"Field with illegal type declared here">;
136+
"field with illegal type declared here">;
136137
def err_sycl_loop_attr_duplication : Error<
137138
"duplicate %select{unroll|Intel FPGA}0 loop attribute '%1'">;
138139
def err_loop_unroll_compatibility : Error<
139140
"incompatible loop unroll instructions: '%0' and '%1'">;
140141
def err_pipe_attribute_arg_not_allowed : Error<
141-
"'%0' mode for pipe attribute is not supported. Allowed modes: 'read_only', 'write_only'">;
142+
"'%0' mode for pipe attribute is not supported; allowed modes are "
143+
"'read_only' and 'write_only'">;
142144
def err_bankbits_numbanks_conflicting : Error<
143145
"the number of bank_bits must be equal to ceil(log2(numbanks))">;
144146
def err_bankbits_non_consecutive : Error<
145147
"bank_bits must be consecutive">;
146148
def err_intel_fpga_mem_limitations
147149
: Error<
148150
"illegal %select{pointer argument of type %1 |field in type pointed "
149-
"to by pointer argument}0 to __builtin_intel_fpga_mem. Only pointers "
151+
"to by pointer argument}0 to __builtin_intel_fpga_mem; only pointers "
150152
"to a first class lvalue or to an rvalue are allowed">;
151153
def err_intel_fpga_mem_arg_mismatch
152154
: Error<"builtin parameter must be %select{"
@@ -2855,12 +2857,12 @@ def err_attribute_wrong_number_arguments : Error<
28552857
def err_attribute_too_many_arguments : Error<
28562858
"%0 attribute takes no more than %1 argument%s1">;
28572859
def warn_attribute_too_many_arguments : Warning<
2858-
"%0 attribute takes no more than %1 argument%s1 - attribute ignored">,
2860+
"%0 attribute takes no more than %1 argument%s1; attribute ignored">,
28592861
InGroup<IgnoredAttributes>;
28602862
def err_attribute_too_few_arguments : Error<
28612863
"%0 attribute takes at least %1 argument%s1">;
28622864
def warn_attribute_too_few_arguments : Warning<
2863-
"%0 attribute takes at least %1 argument%s1 - attribute ignored">,
2865+
"%0 attribute takes at least %1 argument%s1; attribute ignored">,
28642866
InGroup<IgnoredAttributes>;
28652867
def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">;
28662868
def err_attribute_invalid_matrix_type : Error<"invalid matrix element type %0">;
@@ -2877,10 +2879,6 @@ def err_attribute_arm_feature_sve_bits_unsupported : Error<
28772879
def err_attribute_requires_positive_integer : Error<
28782880
"%0 attribute requires a %select{positive|non-negative}1 "
28792881
"integral compile time constant expression">;
2880-
def warn_attribute_requires_positive_integer : Warning<
2881-
"%0 attribute requires a %select{positive|non-negative}1 "
2882-
"integral compile time constant expression - attribute ignored">,
2883-
InGroup<IgnoredAttributes>;
28842882
def err_attribute_requires_opencl_version : Error<
28852883
"%0 attribute requires OpenCL version %1%select{| or above}2">;
28862884
def err_invalid_branch_protection_spec : Error<
@@ -11194,12 +11192,12 @@ def warn_sycl_restrict_recursion
1119411192
: Warning<"SYCL kernel cannot call a recursive function">,
1119511193
InGroup<SyclStrict>, DefaultError;
1119611194
def err_ivdep_duplicate_arg : Error<
11197-
"duplicate argument to 'ivdep'. attribute requires one or both of a safelen "
11195+
"duplicate argument to 'ivdep'; attribute requires one or both of a safelen "
1119811196
"and array">;
1119911197
def err_ivdep_unknown_arg : Error<
11200-
"unknown argument to 'ivdep'. Expected integer or array variable">;
11198+
"unknown argument to 'ivdep'; expected integer or array variable">;
1120111199
def err_ivdep_declrefexpr_arg : Error<
11202-
"invalid declaration reference argument to 'ivdep'. Expected integer or array"
11200+
"invalid declaration reference argument to 'ivdep'; expected integer or array"
1120311201
" variable">;
1120411202
def warn_ivdep_redundant : Warning <"ignoring redundant Intel FPGA loop "
1120511203
"attribute 'ivdep': safelen %select{INF|%1}0 >= safelen %select{INF|%3}2">,
@@ -11209,6 +11207,8 @@ def warn_attribute_spelling_deprecated : Warning<
1120911207
InGroup<DeprecatedAttributes>;
1121011208
def note_spelling_suggestion : Note<
1121111209
"did you mean to use %0 instead?">;
11210+
def warn_attribute_requires_non_negative_integer_argument :
11211+
Warning<warn_impcast_integer_sign.Text>, InGroup<AcceptedAttributes>;
1121211212

1121311213
// errors of expect.with.probability
1121411214
def err_probability_not_constant_float : Error<

clang/include/clang/Basic/LangOptions.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ LANGOPT(SYCLIsHost , 1, 0, "SYCL host compilation")
250250
LANGOPT(SYCLAllowFuncPtr , 1, 0, "Allow function pointers in SYCL device code")
251251
LANGOPT(SYCLStdLayoutKernelParams, 1, 0, "Enable standard layout requirement for SYCL kernel parameters")
252252
LANGOPT(SYCLUnnamedLambda , 1, 0, "Allow unnamed lambda SYCL kernels")
253-
ENUM_LANGOPT(SYCLVersion , SYCLMajorVersion, 1, SYCL_None, "Version of the SYCL standard used")
253+
ENUM_LANGOPT(SYCLVersion , SYCLMajorVersion, 2, SYCL_None, "Version of the SYCL standard used")
254254
LANGOPT(DeclareSPIRVBuiltins, 1, 0, "Declare SPIR-V builtin functions")
255255
LANGOPT(SYCLExplicitSIMD , 1, 0, "SYCL compilation with explicit SIMD extension")
256256
LANGOPT(EnableDAEInSpirKernels , 1, 0, "Enable Dead Argument Elimination in SPIR kernels")

0 commit comments

Comments
 (0)