File tree Expand file tree Collapse file tree 5 files changed +10
-92
lines changed Expand file tree Collapse file tree 5 files changed +10
-92
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -69,7 +69,6 @@ add_llvm_component_library(LLVMSYCLLowerIR
6969 SYCLPropagateJointMatrixUsage.cpp
7070 SYCLVirtualFunctionsAnalysis.cpp
7171 SYCLUtils.cpp
72- AsanKernelMetadata.cpp
7372
7473 LocalAccessorToSharedMemory.cpp
7574 GlobalOffset.cpp
Original file line number Diff line number Diff line change 66//
77// ===----------------------------------------------------------------------===//
88// This pass fixes attributes and metadata of global variable
9- // "__SanitizerKernelMetadata ".
10- // We treat "__SanitizerKernelMetadata " as a device global variable, so that it
11- // can be read by runtime. "spirv.Decorations" is removed by llvm-link, so we
12- // add it here again.
9+ // "__AsanKernelMetadata" or "__MsanKernelMetadata ".
10+ // We treat "KernelMetadata " as a device global variable, so that it
11+ // can be read by runtime.
12+ // "spirv.Decorations" is removed by llvm-link, so we add it here again.
1313// ===----------------------------------------------------------------------===//
1414
1515#include " llvm/SYCLLowerIR/SanitizerKernelMetadata.h"
@@ -27,7 +27,11 @@ constexpr uint32_t SPIRV_HOST_ACCESS_DECOR = 6147;
2727
2828PreservedAnalyses SanitizerKernelMetadataPass::run (Module &M,
2929 ModuleAnalysisManager &MAM) {
30- auto *KernelMetadata = M.getNamedGlobal (" __MsanKernelMetadata" );
30+ auto *KernelMetadata = M.getNamedGlobal (" __AsanKernelMetadata" );
31+
32+ if (!KernelMetadata)
33+ KernelMetadata = M.getNamedGlobal (" __MsanKernelMetadata" );
34+
3135 if (!KernelMetadata)
3236 return PreservedAnalyses::all ();
3337
Original file line number Diff line number Diff line change @@ -795,6 +795,7 @@ processInputModule(std::unique_ptr<Module> M) {
795795 if (isModuleUsingAsan (*M) || isModuleUsingMsan (*M)) {
796796 // Fix attributes and metadata of KernelMetadata
797797 Modified |= runModulePass<SanitizerKernelMetadataPass>(*M);
798+ }
798799
799800 // Transform Joint Matrix builtin calls to align them with SPIR-V friendly
800801 // LLVM IR specification.
You can’t perform that action at this time.
0 commit comments