Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#include "llvm/IR/Use.h"
#include "llvm/IR/Value.h"
#include "llvm/MC/MCSectionMachO.h"
#include "llvm/SYCLLowerIR/DeviceGlobals.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
Expand Down Expand Up @@ -1566,7 +1565,11 @@ static bool isUnsupportedDeviceGlobal(GlobalVariable *G) {
// Non image scope device globals are implemented by device USM, and the
// out-of-bounds check for them will be done by sanitizer USM part. So we
// exclude them here.
return (!isDeviceGlobalVariable(*G) || !hasDeviceImageScopeProperty(*G));
if (!G->hasAttribute("sycl-device-image-scope"))
return true;

Attribute Attr = G->getAttribute("sycl-device-image-scope");
return (!Attr.isStringAttribute() || Attr.getValueAsString() == "false");
}

static bool isUnsupportedSPIRAccess(Value *Addr, Instruction *Inst) {
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Transforms/Instrumentation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ add_llvm_component_library(LLVMInstrumentation
Core
Demangle
MC
SYCLLowerIR
Support
TargetParser
TransformUtils
Expand Down
Loading