File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 1- // ===-- AsanKernelMetadata.h - instrument device global for sanitizer ---===//
1+ // ===-- AsanKernelMetadata.h - fix kernel medatadata for sanitizer ---===//
22//
33// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44// See https://llvm.org/LICENSE.txt for license information.
55// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66//
77// ===----------------------------------------------------------------------===//
8- // This pass adds red zone to each image scope device global and record the
9- // information like size, red zone size and beginning address. The information
10- // will be used by address sanitizer.
8+ // This pass fixes attributes and metadata of global variable
9+ // "__AsanKernelMetadata"
1110// ===----------------------------------------------------------------------===//
1211
1312#include " llvm/IR/PassManager.h"
Original file line number Diff line number Diff line change 1- // ===-- SanitizeDeviceGlobal .cpp - instrument device global for sanitizer -===//
1+ // ===-- AsanKernelMetadata .cpp - fix kernel medatadata for sanitizer -===//
22//
33// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
44// See https://llvm.org/LICENSE.txt for license information.
55// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66//
77// ===----------------------------------------------------------------------===//
8- // This pass adds red zone to each image scope device global and record the
9- // information like size, red zone size and beginning address. The information
10- // will be used by address sanitizer.
11- // TODO: Do this in AddressSanitizer pass when urProgramGetGlobalVariablePointer
12- // is implemented .
8+ // This pass fixes attributes and metadata of global variable
9+ // "__AsanKernelMetadata".
10+ // We treat "__AsanKernelMetadata" as a device global variable, so that it can
11+ // be read by runtime.
12+ // "spirv.Decorations" is removed by llvm-link, so we add it here again .
1313// ===----------------------------------------------------------------------===//
1414
1515#include " llvm/SYCLLowerIR/AsanKernelMetadata.h"
You can’t perform that action at this time.
0 commit comments