Skip to content

Commit

Permalink
[SYCL][NewPM] Register LowerWGLocalMemory properly (#5291)
Browse files Browse the repository at this point in the history
Fixed registration of the pass with the new pass manager, so it can be
launched through `opt`.

Signed-off-by: Mikhail Lychkov <mikhail.lychkov@intel.com>
  • Loading branch information
mlychkov committed Jan 19, 2022
1 parent a9485b7 commit 2bd8689
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions llvm/lib/Passes/PassBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
#include "llvm/IR/Verifier.h"
#include "llvm/SYCLLowerIR/ESIMD/ESIMDVerifier.h"
#include "llvm/SYCLLowerIR/ESIMD/LowerESIMD.h"
#include "llvm/SYCLLowerIR/LowerWGLocalMemory.h"
#include "llvm/SYCLLowerIR/LowerWGScope.h"
#include "llvm/SYCLLowerIR/MutatePrintfAddrspace.h"
#include "llvm/Support/CommandLine.h"
Expand Down
1 change: 1 addition & 0 deletions llvm/lib/Passes/PassRegistry.def
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ MODULE_PASS("esimd-verifier", ESIMDVerifierPass())
MODULE_PASS("SYCLMutatePrintfAddrspace", SYCLMutatePrintfAddrspacePass())
MODULE_PASS("SPIRITTAnnotations", SPIRITTAnnotationsPass())
MODULE_PASS("deadargelim-sycl", DeadArgumentEliminationSYCLPass())
MODULE_PASS("sycllowerwglocalmemory", SYCLLowerWGLocalMemoryPass())
#undef MODULE_PASS

#ifndef MODULE_PASS_WITH_PARAMS
Expand Down
3 changes: 2 additions & 1 deletion llvm/test/SYCLLowerIR/group_local_memory.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
; RUN: opt -S -sycllowerwglocalmemory < %s | FileCheck %s
; RUN: opt -S -sycllowerwglocalmemory -enable-new-pm=0 < %s | FileCheck %s
; RUN: opt -S -passes=sycllowerwglocalmemory < %s | FileCheck %s

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

0 comments on commit 2bd8689

Please sign in to comment.