Skip to content

Commit eadc69e

Browse files
committed
Merge remote-tracking branch 'intel/sycl' into private/asachkov/mock-all-pi-entry-points
2 parents 79dcc38 + b4efcdb commit eadc69e

File tree

74 files changed

+1254
-1613
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1254
-1613
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
//===---- SYCLPropagateAspectsUsage.cpp - SYCLPropagateAspectsUsage Pass --===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
//
9+
// Pass propagates optional kernel features metadata through a module call graph
10+
//
11+
//===----------------------------------------------------------------------===//
12+
//
13+
#ifndef LLVM_SYCL_PROPAGATE_ASPECTS_USAGE_H
14+
#define LLVM_SYCL_PROPAGATE_ASPECTS_USAGE_H
15+
16+
#include "llvm/IR/PassManager.h"
17+
18+
namespace llvm {
19+
20+
class SYCLPropagateAspectsUsagePass
21+
: public PassInfoMixin<SYCLPropagateAspectsUsagePass> {
22+
public:
23+
PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
24+
};
25+
26+
} // namespace llvm
27+
28+
#endif // LLVM_SYCL_PROPAGATE_ASPECTS_USAGE_H

llvm/lib/Passes/PassBuilder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
#include "llvm/SYCLLowerIR/LowerWGLocalMemory.h"
8585
#include "llvm/SYCLLowerIR/LowerWGScope.h"
8686
#include "llvm/SYCLLowerIR/MutatePrintfAddrspace.h"
87+
#include "llvm/SYCLLowerIR/SYCLPropagateAspectsUsage.h"
8788
#include "llvm/Support/CommandLine.h"
8889
#include "llvm/Support/Debug.h"
8990
#include "llvm/Support/ErrorHandling.h"

llvm/lib/Passes/PassRegistry.def

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ MODULE_PASS("SPIRITTAnnotations", SPIRITTAnnotationsPass())
136136
MODULE_PASS("deadargelim-sycl", DeadArgumentEliminationSYCLPass())
137137
MODULE_PASS("sycllowerwglocalmemory", SYCLLowerWGLocalMemoryPass())
138138
MODULE_PASS("lower-esimd-kernel-attrs", SYCLFixupESIMDKernelWrapperMDPass())
139+
MODULE_PASS("sycl-propagate-aspects-usage", SYCLPropagateAspectsUsagePass())
139140
#undef MODULE_PASS
140141

141142
#ifndef MODULE_PASS_WITH_PARAMS

llvm/lib/SYCLLowerIR/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ add_llvm_component_library(LLVMSYCLLowerIR
5858
LowerWGScope.cpp
5959
LowerWGLocalMemory.cpp
6060
MutatePrintfAddrspace.cpp
61+
SYCLPropagateAspectsUsage.cpp
6162

6263
LocalAccessorToSharedMemory.cpp
6364
GlobalOffset.cpp

llvm/lib/SYCLLowerIR/LowerInvokeSimd.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,15 @@ bool collectUsesLookTrhoughMemAndCasts(Value *V,
250250
for (const Use *U : TmpVUses) {
251251
User *UU = U->getUser();
252252
assert(!isCast(UU));
253+
253254
auto *St = dyn_cast<StoreInst>(UU);
254255

255256
if (!St) {
256257
Uses.insert(U);
257258
continue;
258259
}
259260
// Current user is a store (of V) instruction, see if...
260-
assert((V = St->getValueOperand()) &&
261+
assert((V == St->getValueOperand()) &&
261262
"bad V param in collectUsesLookTrhoughMemAndCasts");
262263
Value *Addr = stripCasts(St->getPointerOperand());
263264

0 commit comments

Comments
 (0)