Skip to content

Commit 400c802

Browse files
committed
Revert "Disable ITT annotations under preview-breaking flag"
This reverts commit 91d1483.
1 parent 91d1483 commit 400c802

File tree

4 files changed

+5
-30
lines changed

4 files changed

+5
-30
lines changed

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5588,15 +5588,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
55885588

55895589
// Forward -fsycl-instrument-device-code option to cc1. This option will
55905590
// only be used for SPIR/SPIR-V based targets.
5591-
// Disabled ITT annotations in device code, under
5592-
// -fpreview-breaking-changes.
5593-
if (Triple.isSPIROrSPIRV()) {
5594-
bool IsPreviewBreak = Args.hasArg(options::OPT_fpreview_breaking_changes);
5591+
if (Triple.isSPIROrSPIRV())
55955592
if (Args.hasFlag(options::OPT_fsycl_instrument_device_code,
5596-
options::OPT_fno_sycl_instrument_device_code,
5597-
!IsPreviewBreak))
5593+
options::OPT_fno_sycl_instrument_device_code, false))
55985594
CmdArgs.push_back("-fsycl-instrument-device-code");
5599-
}
56005595

56015596
if (!SYCLStdArg) {
56025597
// The user had not pass SYCL version, thus we'll employ no-sycl-strict

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -507,11 +507,8 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple,
507507
addLibraries(SYCLDeviceBfloat16FallbackLib);
508508
}
509509

510-
// Disabled ITT annotations in device code, under -fpreview-breaking-changes.
511-
bool IsPreviewBreak = Args.hasArg(options::OPT_fpreview_breaking_changes);
512510
if (Args.hasFlag(options::OPT_fsycl_instrument_device_code,
513-
options::OPT_fno_sycl_instrument_device_code,
514-
!IsPreviewBreak))
511+
options::OPT_fno_sycl_instrument_device_code, false))
515512
addLibraries(SYCLDeviceAnnotationLibs);
516513

517514
#if !defined(_WIN32)

clang/test/Driver/sycl-instrumentation-old-model.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,10 @@
77
// FIXME: Force linux targets to allow for the libraries to be found. Dummy
88
// inputs for --sysroot should be updated to work better for Windows.
99

10-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64 -### %s 2>&1 \
10+
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64 -### %s 2>&1 \
1111
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV,CHECK-HOST %s
12-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fpreview-breaking-changes -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64 -### %s 2>&1 \
13-
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV,CHECK-HOST %s
14-
1512
// -fno-sycl-device-lib mustn't affect the linkage of ITT libraries
16-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver --sysroot=%S/Inputs/SYCL -fno-sycl-device-lib=all -fsycl-targets=spir64 -### %s 2>&1 \
17-
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV %s
18-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fpreview-breaking-changes -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL -fno-sycl-device-lib=all -fsycl-targets=spir64 -### %s 2>&1 \
13+
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fsycl-instrument-device-code --sysroot=%S/Inputs/SYCL -fno-sycl-device-lib=all -fsycl-targets=spir64 -### %s 2>&1 \
1914
// RUN: | FileCheck -check-prefixes=CHECK-SPIRV %s
2015

2116
// CHECK-SPIRV: "-cc1"{{.*}} "-fsycl-is-device"{{.*}} "-fsycl-instrument-device-code"
@@ -30,11 +25,5 @@
3025
// RUN: %clangxx -fsycl --no-offload-new-driver -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code -nocudalib -### %s 2>&1 \
3126
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
3227

33-
// ITT annotations are disabled by default under -fpreview-breaking-changes.
34-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fpreview-breaking-changes --sysroot=%S/Inputs/SYCL -fno-sycl-device-lib=all -fsycl-targets=spir64 -### %s 2>&1 \
35-
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
36-
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl --no-offload-new-driver -fpreview-breaking-changes --sysroot=%S/Inputs/SYCL -fsycl-targets=spir64 -### %s 2>&1 \
37-
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
38-
3928
// CHECK-NONPASSED-NOT: "-fsycl-instrument-device-code"
4029
// CHECK-NONPASSED-NOT: llvm-link{{.*}} {{.*}}libsycl-itt-{{.*}}.bc"

clang/test/Driver/sycl-instrumentation.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,5 @@
2424
// RUN: %clangxx -fsycl --offload-new-driver -fsycl-targets=nvptx64-nvidia-cuda -fno-sycl-instrument-device-code -nocudalib -### %s 2>&1 \
2525
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
2626

27-
// ITT annotations are disabled by default under -fpreview-breaking-changes.
28-
// RUN: %clangxx -fsycl --offload-new-driver -fpreview-breaking-changes -fsycl-targets=spir64 -### %s 2>&1 \
29-
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
30-
// RUN: %clangxx -fsycl --offload-new-driver -fsycl-targets=nvptx64-nvidia-cuda -fpreview-breaking-changes -nocudalib -### %s 2>&1 \
31-
// RUN: | FileCheck -check-prefixes=CHECK-NONPASSED %s
32-
3327
// CHECK-NONPASSED-NOT: "-fsycl-instrument-device-code"
3428
// CHECK-NONPASSED-NOT: clang-linker-wrapper{{.*}} {{.*}}libsycl-itt-{{.*}}

0 commit comments

Comments
 (0)