Skip to content

Commit 6e9ddb6

Browse files
[ESIMD] Deprecate -fsycl-explicit-simd option (#3476)
ESIMD no longer requires -fsycl-explicit-simd flag. Co-authored-by: Aaron Ballman <[email protected]>
1 parent 7d17aa7 commit 6e9ddb6

27 files changed

+39
-52
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4377,10 +4377,11 @@ def fsycl : Flag<["-"], "fsycl">, Flags<[NoXarchOption, CoreOption]>, Group<sycl
43774377
HelpText<"Enables SYCL kernels compilation for device">;
43784378
def fno_sycl : Flag<["-"], "fno-sycl">, Flags<[NoXarchOption, CoreOption]>, Group<sycl_Group>,
43794379
HelpText<"Disables SYCL kernels compilation for device">;
4380-
defm sycl_esimd: BoolFOption<"sycl-explicit-simd",
4381-
LangOpts<"SYCLExplicitSIMD">, DefaultFalse,
4382-
PosFlag<SetTrue, [CC1Option], "Enable">, NegFlag<SetFalse, [], "Disable">,
4383-
BothFlags<[NoArgumentUnused, CoreOption], "SYCL explicit SIMD extension.">>;
4380+
// FIXME: -fsycl-explicit-simd is deprecated. remove it when support is dropped.
4381+
def : Flag<["-"], "fsycl-explicit-simd">, Flags<[CoreOption]>, Group<clang_ignored_legacy_options_Group>,
4382+
HelpText<"Enable SYCL explicit SIMD extension. (deprecated)">;
4383+
def : Flag<["-"], "fno-sycl-explicit-simd">, Flags<[CoreOption]>, Group<clang_ignored_legacy_options_Group>,
4384+
HelpText<"Disable SYCL explicit SIMD extension. (deprecated)">;
43844385
defm sycl_early_optimizations : OptOutFFlag<"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler", [CoreOption]>;
43854386
def fsycl_dead_args_optimization : Flag<["-"], "fsycl-dead-args-optimization">,
43864387
Group<sycl_Group>, Flags<[NoArgumentUnused, CoreOption]>, HelpText<"Enables "

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4354,10 +4354,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
43544354
CmdArgs.push_back("-fsycl-is-device");
43554355
CmdArgs.push_back("-fdeclare-spirv-builtins");
43564356

4357-
if (Args.hasFlag(options::OPT_fsycl_esimd, options::OPT_fno_sycl_esimd,
4358-
false))
4359-
CmdArgs.push_back("-fsycl-explicit-simd");
4360-
43614357
// Default value for FPGA is false, for all other targets is true.
43624358
if (!Args.hasFlag(options::OPT_fsycl_early_optimizations,
43634359
options::OPT_fno_sycl_early_optimizations,
@@ -6663,10 +6659,6 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
66636659
// doing the host pass.
66646660
CmdArgs.push_back("-fsycl-is-host");
66656661

6666-
if (Args.hasFlag(options::OPT_fsycl_esimd, options::OPT_fno_sycl_esimd,
6667-
false))
6668-
CmdArgs.push_back("-fsycl-explicit-simd");
6669-
66706662
if (!D.IsCLMode()) {
66716663
// SYCL library is guaranteed to work correctly only with dynamic
66726664
// MSVC runtime.

clang/test/Driver/sycl-esimd.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
/// Check that explicit SIMD extension is disabled by default:
2-
// RUN: %clang -### %s 2>&1 \
3-
// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s
4-
// CHECK-DEFAULT-NOT: "-fsycl-explicit-simd"
5-
6-
/// Check "-fsycl-explicit-simd" is passed when compiling for device and host:
7-
// RUN: %clang -### -fsycl -fsycl-explicit-simd %s 2>&1 \
8-
// RUN: | FileCheck -check-prefix=CHECK-SYCL-ESIMD %s
9-
// CHECK-SYCL-ESIMD: "-cc1"{{.*}} "-fsycl-explicit-simd"{{.*}}
10-
// CHECK-SYCL-ESIMD: "-cc1"{{.*}} "-fsycl-explicit-simd"{{.*}}
1+
/// Check that the warning is emmited for using "-fsycl-explicit-simd"
2+
// RUN: %clang -### -fsycl-explicit-simd %s 2>&1 | FileCheck %s
3+
// RUN: %clang -### -fno-sycl-explicit-simd %s 2>&1 | FileCheck %s
4+
// CHECK: the flag '-f{{.*}}sycl-explicit-simd' has been deprecated and will be ignored

clang/test/Driver/sycl-offload.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,6 @@
589589

590590
/// Check "-spirv-allow-unknown-intrinsics=llvm.genx." option is emitted for llvm-spirv tool
591591
// RUN: %clangxx %s -fsycl -### 2>&1 | FileCheck %s --check-prefix=CHK-ALLOW-INTRIN
592-
// RUN: %clangxx %s -fsycl -fsycl-explicit-simd -### 2>&1 | FileCheck %s --check-prefix=CHK-ALLOW-INTRIN
593592
// CHK-ALLOW-INTRIN: llvm-spirv{{.*}}-spirv-allow-unknown-intrinsics=llvm.genx.
594593

595594
/// ###########################################################################

clang/test/SemaSYCL/esimd-globals-in-sycl-context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clang_cc1 -fsycl-is-device -fsycl-explicit-simd -fsyntax-only -verify %s
1+
// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
22

33
// This test checks usage of an ESIMD global in ESIMD(positive) and SYCL(negative) contexts.
44

sycl/doc/UsersManual.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ and not recommended to use in production environment.
5353
Enables/Disables unnamed SYCL lambda kernels support.
5454
Disabled by default.
5555

56+
**`-f[no-]sycl-explicit-simd`** [DEPRECATED]
57+
58+
The option was used to enable/disable SYCL explicit SIMD extension.
59+
Not used anymore.
60+
5661
## Optimization options
5762

5863
**`-f[no-]sycl-early-optimizations`**

sycl/test/esimd/block_load_store.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-explicit-simd -fsycl-device-only -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify %s
22
// expected-no-diagnostics
33

44
#include <CL/sycl.hpp>

sycl/test/esimd/esimd-util-compiler-eval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-explicit-simd -fsycl-device-only -c %s
1+
// RUN: %clangxx -fsycl -fsycl-device-only -c %s
22
// This test checks compile-time evaluation of functions from esimd_util.hpp
33

44
#include "CL/sycl.hpp"

sycl/test/esimd/esimd_math.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-explicit-simd -fsycl-device-only -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify %s
22
// expected-no-diagnostics
33

44
#include <CL/sycl/INTEL/esimd.hpp>

sycl/test/esimd/flat_atomic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %clangxx -fsycl -fsycl-explicit-simd -fsycl-device-only -fsyntax-only -Xclang -verify %s
1+
// RUN: %clangxx -fsycl -fsycl-device-only -fsyntax-only -Xclang -verify %s
22
// expected-no-diagnostics
33

44
#include <CL/sycl.hpp>

0 commit comments

Comments
 (0)