[PATCH] D90425: hwasan: Move fixed shadow behind opaque no-op cast as well.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 30 13:05:23 PDT 2020
pcc added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:593
Value *HWAddressSanitizer::getDynamicShadowNonTls(IRBuilder<> &IRB) {
if (Mapping.Offset != kDynamicShadowSentinel)
----------------
hctim wrote:
> should this be `getShadowNonTls` now (and `getShadowIfunc()` above)?
I'll rename this one. It's still dynamic in the case where there is an ifunc so I left the other one as is.
================
Comment at: llvm/test/Instrumentation/HWAddressSanitizer/basic.ll:60
-; ABORT-DYNAMIC-SHADOW: call void @llvm.hwasan.check.memaccess.shortgranules(i8* %.hwasan.shadow, i8* %a, i32 0)
-; ABORT-ZERO-BASED-SHADOW: call void @llvm.hwasan.check.memaccess.shortgranules(i8* null, i8* %a, i32 0)
----------------
eugenis wrote:
> This seems suboptimal in the zero shadow case. But is it even used anywhere?
>
I don't believe that it is. But I think that even with zero shadow we would want a single `mov x20, xzr` at the top of the function rather than repeating it for every memory access.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90425/new/
https://reviews.llvm.org/D90425
More information about the llvm-commits
mailing list