File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -332,9 +332,19 @@ namespace clang {
332
332
// happens.
333
333
if (LangOpts.SYCLIsDevice ) {
334
334
PrettyStackTraceString CrashInfo (" Pre-linking SYCL passes" );
335
- legacy::PassManager PreLinkingSyclPasses;
336
- PreLinkingSyclPasses.add (llvm::createSYCLLowerWGScopePass ());
337
- PreLinkingSyclPasses.run (*getModule ());
335
+
336
+ FunctionAnalysisManager FAM;
337
+ ModuleAnalysisManager MAM;
338
+ MAM.registerPass ([&] { return PassInstrumentationAnalysis (); });
339
+ MAM.registerPass (
340
+ [&] { return FunctionAnalysisManagerModuleProxy (FAM); });
341
+ FAM.registerPass (
342
+ [&] { return ModuleAnalysisManagerFunctionProxy (MAM); });
343
+
344
+ ModulePassManager PreLinkingSyclPasses;
345
+ PreLinkingSyclPasses.addPass (
346
+ createModuleToFunctionPassAdaptor (SYCLLowerWGScopePass ()));
347
+ PreLinkingSyclPasses.run (*getModule (), MAM);
338
348
}
339
349
340
350
// Link each LinkModule into our module.
Original file line number Diff line number Diff line change 2
2
// SYCL device target, and can be disabled with -fno-sycl-early-optimizations.
3
3
//
4
4
// RUN: %clang_cc1 -O2 -fsycl-is-device -triple spir64-unknown-unknown %s -flegacy-pass-manager -mllvm -debug-pass=Structure -emit-llvm -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-EARLYOPT
5
- // CHECK-EARLYOPT: Lower Work Group Scope Code
6
5
// CHECK-EARLYOPT: Combine redundant instructions
6
+ // CHECK-EARLYOPT: Move SYCL printf literal arguments to constant address space
7
7
//
8
8
// RUN: %clang_cc1 -O2 -fsycl-is-device -triple spir64-unknown-unknown %s -flegacy-pass-manager -mllvm -debug-pass=Structure -emit-llvm -fno-sycl-early-optimizations -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-NOEARLYOPT
9
- // CHECK-NOEARLYOPT: Lower Work Group Scope Code
10
9
// CHECK-NOEARLYOPT-NOT: Combine redundant instructions
10
+ // CHECK-NOEARLYOPT: Move SYCL printf literal arguments to constant address space
11
11
//
12
12
//
13
13
// New pass manager doesn't print all passes tree, only module level.
You can’t perform that action at this time.
0 commit comments