File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -1046,7 +1046,7 @@ void EmitAssemblyHelper::EmitAssemblyWithLegacyPassManager(
1046
1046
// used only with spir triple.
1047
1047
if (CodeGenOpts.SPIRITTAnnotations ) {
1048
1048
assert (llvm::Triple (TheModule->getTargetTriple ()).isSPIR () &&
1049
- " ITT annotations can only by added to a module with spir target" );
1049
+ " ITT annotations can only be added to a module with spir target" );
1050
1050
PerModulePasses.add (createSPIRITTAnnotationsLegacyPass ());
1051
1051
}
1052
1052
@@ -1480,6 +1480,15 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
1480
1480
MPM.addPass (SYCLMutatePrintfAddrspacePass ());
1481
1481
}
1482
1482
1483
+ // Add SPIRITTAnnotations pass to the pass manager if
1484
+ // -fsycl-instrument-device-code option was passed. This option can be used
1485
+ // only with spir triple.
1486
+ if (CodeGenOpts.SPIRITTAnnotations ) {
1487
+ assert (llvm::Triple (TheModule->getTargetTriple ()).isSPIR () &&
1488
+ " ITT annotations can only be added to a module with spir target" );
1489
+ MPM.addPass (SPIRITTAnnotationsPass ());
1490
+ }
1491
+
1483
1492
// Allocate static local memory in SYCL kernel scope for each allocation
1484
1493
// call. It should be called after inlining pass.
1485
1494
if (LangOpts.SYCLIsDevice ) {
Original file line number Diff line number Diff line change 1
1
// / Check if start/finish ITT annotations are being added during compilation of
2
2
// / SYCL device code
3
3
4
- // RUN: %clang_cc1 -fsycl-is-device -fsycl-instrument-device-code -triple spir64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
4
+ // RUN: %clang_cc1 -fsycl-is-device -flegacy-pass-manager -fsycl-instrument-device-code -triple spir64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
5
+ // RUN: %clang_cc1 -fsycl-is-device -fno-legacy-pass-manager -fsycl-instrument-device-code -triple spir64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
5
6
6
7
// CHECK: kernel_function
7
8
// CHECK-NEXT: entry:
You can’t perform that action at this time.
0 commit comments