[PATCH] D99071: [ASAN][AMDGPU] Add support for accesses to global and constant addrspaces
Reshabh Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 22:49:38 PDT 2021
rksharma added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:176-177
+const char kAMDGPUAddressSharedName[] = "llvm.amdgcn.is.shared";
+const char kAMDGPUAddressPrivateName[] = "llvm.amdgcn.is.private";
+
----------------
Is it fine that I've created variables for them or shall I directly use function names as string inside getOrInsertFunction?
================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:1380
Type *PtrTy = cast<PointerType>(Ptr->getType()->getScalarType());
- if (PtrTy->getPointerAddressSpace() != 0)
+ if (PtrTy->getPointerAddressSpace() != 0 && !TargetTriple.isAMDGPU())
return true;
----------------
vitalybuka wrote:
> Why can we use isUnsupportedAMDGPUAddrspacehere(PtrTy)?
We can use isUnsupported but we can not get rid of line:1395 because asan needs to check if the address is in a non-zero addrspace for non-amdgpu targets.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99071/new/
https://reviews.llvm.org/D99071
More information about the llvm-commits
mailing list