Skip to content

Commit 2bd8689

Browse files
authored
[SYCL][NewPM] Register LowerWGLocalMemory properly (#5291)
Fixed registration of the pass with the new pass manager, so it can be launched through `opt`. Signed-off-by: Mikhail Lychkov <[email protected]>
1 parent a9485b7 commit 2bd8689

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
#include "llvm/IR/Verifier.h"
8080
#include "llvm/SYCLLowerIR/ESIMD/ESIMDVerifier.h"
8181
#include "llvm/SYCLLowerIR/ESIMD/LowerESIMD.h"
82+
#include "llvm/SYCLLowerIR/LowerWGLocalMemory.h"
8283
#include "llvm/SYCLLowerIR/LowerWGScope.h"
8384
#include "llvm/SYCLLowerIR/MutatePrintfAddrspace.h"
8485
#include "llvm/Support/CommandLine.h"

llvm/lib/Passes/PassRegistry.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ MODULE_PASS("esimd-verifier", ESIMDVerifierPass())
122122
MODULE_PASS("SYCLMutatePrintfAddrspace", SYCLMutatePrintfAddrspacePass())
123123
MODULE_PASS("SPIRITTAnnotations", SPIRITTAnnotationsPass())
124124
MODULE_PASS("deadargelim-sycl", DeadArgumentEliminationSYCLPass())
125+
MODULE_PASS("sycllowerwglocalmemory", SYCLLowerWGLocalMemoryPass())
125126
#undef MODULE_PASS
126127

127128
#ifndef MODULE_PASS_WITH_PARAMS

llvm/test/SYCLLowerIR/group_local_memory.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
; RUN: opt -S -sycllowerwglocalmemory < %s | FileCheck %s
1+
; RUN: opt -S -sycllowerwglocalmemory -enable-new-pm=0 < %s | FileCheck %s
2+
; RUN: opt -S -passes=sycllowerwglocalmemory < %s | FileCheck %s
23

34
; CHECK-DAG: [[WGLOCALMEM_1:@WGLocalMem.*]] = internal addrspace(3) global [128 x i8] undef, align 4
45
; CHECK-DAG: [[WGLOCALMEM_2:@WGLocalMem.*]] = internal addrspace(3) global [4 x i8] undef, align 4

0 commit comments

Comments
 (0)