Skip to content

Commit 0910ca9

Browse files
committed
Merge remote-tracking branch 'upstream/sycl' into cc1-options
2 parents 5da2fed + b1e1de0 commit 0910ca9

Some content is hidden

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

52 files changed

+1143
-450
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ llvm-spirv/ @AlexeySotkin @AlexeySachkov
1313
opencl-aot/ @dm-vodopyanov @AlexeySachkov @romanovvlad
1414

1515
# Device library
16-
libdevice/ @vzakhari
16+
libdevice/ @vzakhari @jinge90
1717

1818
# DPC++ runtime library
1919
sycl/ @intel/llvm-reviewers-runtime

buildbot/dependency.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ ocl_cpu_rt_ver_win=2021.11.3.0.02
77
# https://github.com/intel/compute-runtime/releases/tag/21.08.19096
88
ocl_gpu_rt_ver=21.08.19096
99
# Same GPU driver supports Level Zero and OpenCL
10-
# https://downloadmirror.intel.com/30148/a08/igfx_win10_100.9168.zip
11-
ocl_gpu_rt_ver_win=27.20.100.9168
10+
# https://downloadmirror.intel.com/30266/a08/igfx_win10_100.9316.zip
11+
ocl_gpu_rt_ver_win=27.20.100.9316
1212
intel_sycl_ver=build
1313

1414
# TBB binaries can be built from sources following instructions under
@@ -31,7 +31,7 @@ ocloc_ver_win=27.20.100.9168
3131
cpu_driver_lin=2021.11.3.0.02
3232
cpu_driver_win=2021.11.3.0.02
3333
gpu_driver_lin=21.08.19096
34-
gpu_driver_win=27.20.100.9168
34+
gpu_driver_win=27.20.100.9316
3535
fpga_driver_lin=2021.11.3.0.02
3636
fpga_driver_win=2021.11.3.0.02
3737
# NVidia CUDA driver

clang/include/clang/Basic/AttrDocs.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2421,8 +2421,8 @@ device kernel, the attribute is not ignored and it is propagated to the kernel.
24212421
If the`` intel::reqd_work_group_size`` or ``cl::reqd_work_group_size``
24222422
attribute is specified on a declaration along with a
24232423
intel::num_simd_work_items attribute, the work group size attribute
2424-
arguments must all be evenly divisible by the argument specified in
2425-
the ``intel::num_simd_work_items`` attribute.
2424+
argument (the first argument) must be evenly divisible by the argument specified
2425+
in the ``intel::num_simd_work_items`` attribute.
24262426

24272427
.. code-block:: c++
24282428

clang/include/clang/Driver/Options.td

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4295,7 +4295,10 @@ def sycl_std_EQ : Joined<["-"], "sycl-std=">, Group<sycl_Group>, Flags<[CC1Optio
42954295
HelpText<"SYCL language standard to compile for.">, Values<"2020,2017,121,1.2.1,sycl-1.2.1">,
42964296
NormalizedValues<["SYCL_2020", "SYCL_2017", "SYCL_2017", "SYCL_2017", "SYCL_2017"]>, NormalizedValuesScope<"LangOptions">,
42974297
MarshallingInfoString<LangOpts<"SYCLVersion">, "SYCL_None">, AutoNormalizeEnum;
4298-
defm sycl_esimd: OptInFFlag<"sycl-explicit-simd", "Enable", "Disable", " SYCL explicit SIMD extension.", [CC1Option,CoreOption], LangOpts<"SYCLExplicitSIMD">>;
4298+
defm sycl_esimd: BoolFOption<"sycl-explicit-simd",
4299+
LangOpts<"SYCLExplicitSIMD">, DefaultFalse,
4300+
PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
4301+
BothFlags<[NoArgumentUnused, CoreOption], "SYCL explicit SIMD extension.">>;
42994302
defm sycl_early_optimizations : OptOutFFlag<"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler", [CoreOption]>;
43004303
def fsycl_dead_args_optimization : Flag<["-"], "fsycl-dead-args-optimization">,
43014304
Group<sycl_Group>, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enables "

clang/include/clang/Sema/Sema.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,8 +3471,6 @@ class Sema final {
34713471
EnforceTCBLeafAttr *mergeEnforceTCBLeafAttr(Decl *D,
34723472
const EnforceTCBLeafAttr &AL);
34733473

3474-
SYCLIntelLoopFuseAttr *
3475-
mergeSYCLIntelLoopFuseAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E);
34763474
void mergeDeclAttributes(NamedDecl *New, Decl *Old,
34773475
AvailabilityMergeKind AMK = AMK_Redeclaration);
34783476
void MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New,
@@ -10232,6 +10230,10 @@ class Sema final {
1023210230
Expr *E);
1023310231
SYCLIntelNoGlobalWorkOffsetAttr *MergeSYCLIntelNoGlobalWorkOffsetAttr(
1023410232
Decl *D, const SYCLIntelNoGlobalWorkOffsetAttr &A);
10233+
void AddSYCLIntelLoopFuseAttr(Decl *D, const AttributeCommonInfo &CI,
10234+
Expr *E);
10235+
SYCLIntelLoopFuseAttr *
10236+
MergeSYCLIntelLoopFuseAttr(Decl *D, const SYCLIntelLoopFuseAttr &A);
1023510237

1023610238
/// AddAlignedAttr - Adds an aligned attribute to a particular declaration.
1023710239
void AddAlignedAttr(Decl *D, const AttributeCommonInfo &CI, Expr *E,
@@ -10286,8 +10288,6 @@ class Sema final {
1028610288
/// addSYCLIntelPipeIOAttr - Adds a pipe I/O attribute to a particular
1028710289
/// declaration.
1028810290
void addSYCLIntelPipeIOAttr(Decl *D, const AttributeCommonInfo &CI, Expr *ID);
10289-
void addSYCLIntelLoopFuseAttr(Decl *D, const AttributeCommonInfo &CI,
10290-
Expr *E);
1029110291

1029210292
bool checkNSReturnsRetainedReturnType(SourceLocation loc, QualType type);
1029310293
bool checkAllowedSYCLInitializer(VarDecl *VD,

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -943,12 +943,9 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
943943
std::unique_ptr<llvm::ToolOutputFile> ThinLinkOS, DwoOS;
944944

945945
// Eliminate dead arguments from SPIR kernels in SYCL environment.
946-
// 1. Run DAE when LLVM optimizations are applied as well.
947-
// 2. We cannot run DAE for ESIMD since the pointers to SPIR kernel
948-
// functions are saved in !genx.kernels metadata.
949-
// 3. DAE pass temporary guarded under option.
946+
// Run DAE when LLVM optimizations are applied as well.
950947
if (LangOpts.SYCLIsDevice && !CodeGenOpts.DisableLLVMPasses &&
951-
!LangOpts.SYCLExplicitSIMD && LangOpts.EnableDAEInSpirKernels)
948+
LangOpts.EnableDAEInSpirKernels)
952949
PerModulePasses.add(createDeadArgEliminationSYCLPass());
953950

954951
switch (Action) {

clang/lib/CodeGen/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,6 @@ add_clang_library(clangCodeGen
9898
clangBasic
9999
clangFrontend
100100
clangLex
101+
clangSema
101102
clangSerialization
102103
)

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -983,10 +983,11 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
983983

984984
if (getLangOpts().SYCLIsDevice && D) {
985985
if (const auto *A = D->getAttr<SYCLIntelLoopFuseAttr>()) {
986-
Expr *E = A->getValue();
986+
const auto *CE = cast<ConstantExpr>(A->getValue());
987+
Optional<llvm::APSInt> ArgVal = CE->getResultAsAPSInt();
987988
llvm::Metadata *AttrMDArgs[] = {
988-
llvm::ConstantAsMetadata::get(Builder.getInt32(
989-
E->getIntegerConstantExpr(D->getASTContext())->getZExtValue())),
989+
llvm::ConstantAsMetadata::get(
990+
Builder.getInt32(ArgVal->getZExtValue())),
990991
llvm::ConstantAsMetadata::get(
991992
A->isIndependent() ? Builder.getInt32(1) : Builder.getInt32(0))};
992993
Fn->setMetadata("loop_fuse",

clang/lib/Frontend/Rewrite/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ add_clang_library(clangRewriteFrontend
1919
clangFrontend
2020
clangLex
2121
clangRewrite
22+
clangSema
2223
clangSerialization
2324

2425
DEPENDS

clang/lib/Index/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ add_clang_library(clangIndex
2424
clangFrontend
2525
clangLex
2626
clangRewrite
27+
clangSema
2728
clangSerialization
2829
clangToolingCore
2930

0 commit comments

Comments
 (0)