Skip to content

Commit e1e3658

Browse files
authored
[Driver][SYCL] Expand -fsycl-early-optimizations to Windows (#2346)
Initial implementation was for Linux only, this is needed on the Windows side too.
1 parent 9c370b1 commit e1e3658

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3550,7 +3550,7 @@ def fsycl_esimd : Flag<["-"], "fsycl-explicit-simd">, Group<sycl_Group>, Flags<[
35503550
HelpText<"Enable SYCL explicit SIMD extension">;
35513551
def fno_sycl_esimd : Flag<["-"], "fno-sycl-explicit-simd">, Group<sycl_Group>,
35523552
HelpText<"Disable SYCL explicit SIMD extension">, Flags<[NoArgumentUnused, CoreOption]>;
3553-
defm sycl_early_optimizations : OptOutFFlag<"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler">;
3553+
defm sycl_early_optimizations : OptOutFFlag<"sycl-early-optimizations", "Enable", "Disable", " standard optimization pipeline for SYCL device compiler", [CoreOption]>;
35543554

35553555
//===----------------------------------------------------------------------===//
35563556
// CC1 Options
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
11
/// Check that optimizations for sycl device are enabled by default:
22
// RUN: %clang -### -fsycl %s 2>&1 \
33
// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s
4+
// RUN: %clang_cl -### -fsycl %s 2>&1 \
5+
// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s
46
// RUN: %clang -### -fsycl -fsycl-device-only %s 2>&1 \
57
// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s
8+
// RUN: %clang_cl -### -fsycl -fsycl-device-only %s 2>&1 \
9+
// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s
610
// RUN: %clang -### -fsycl -fintelfpga -fsycl-early-optimizations %s 2>&1 \
711
// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s
12+
// RUN: %clang_cl -### -fsycl -fintelfpga -fsycl-early-optimizations %s 2>&1 \
13+
// RUN: | FileCheck -check-prefix=CHECK-DEFAULT %s
814
// CHECK-DEFAULT-NOT: "-fno-sycl-early-optimizations"
915
// CHECK-DEFAULT-NOT: "-disable-llvm-passes"
1016

1117
/// Check "-fno-sycl-early-optimizations" is passed to the front-end:
1218
// RUN: %clang -### -fsycl -fno-sycl-early-optimizations %s 2>&1 \
1319
// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-EARLY-OPTS %s
20+
// RUN: %clang_cl -### -fsycl -fno-sycl-early-optimizations %s 2>&1 \
21+
// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-EARLY-OPTS %s
1422
// RUN: %clang -### -fsycl -fsycl-device-only -fno-sycl-early-optimizations %s 2>&1 \
1523
// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-EARLY-OPTS %s
24+
// RUN: %clang_cl -### -fsycl -fsycl-device-only -fno-sycl-early-optimizations %s 2>&1 \
25+
// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-EARLY-OPTS %s
1626
// RUN: %clang -### -fsycl -fintelfpga %s 2>&1 \
1727
// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-EARLY-OPTS %s
28+
// RUN: %clang_cl -### -fsycl -fintelfpga %s 2>&1 \
29+
// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-EARLY-OPTS %s
1830
// CHECK-NO-SYCL-EARLY-OPTS: "-fno-sycl-early-optimizations"

0 commit comments

Comments
 (0)