[PATCH] D137013: [LoongArch][ASAN] Instrumentation pass now uses proper shadow offset

Youling Tang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 30 18:05:54 PDT 2022


tangyouling added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:580
   // OR-ing shadow offset if more efficient (at least on x86) if the offset
   // is a power of two, but on ppc64 we have to use add since the shadow
   // offset is not necessary 1/8-th of the address space.  On SystemZ,
----------------
xry111 wrote:
> "ppc64" -> "ppc64 and loongarch64"
> "ppc64" -> "ppc64 and loongarch64"

OK.


================
Comment at: llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp:585
   Mapping.OrShadowOffset = !IsAArch64 && !IsPPC64 && !IsSystemZ && !IsPS &&
-                           !IsRISCV64 &&
+                           !IsRISCV64 && !IsLoongArch64 &&
                            !(Mapping.Offset & (Mapping.Offset - 1)) &&
----------------
xry111 wrote:
> Hmm, why is "!IsRISCV64" ever here?  Shouldn't it be already excluded by `!(Mapping.Offset & (Mapping.Offset - 1))`?
> 
> But this is not related to our change anyway.
> Hmm, why is "!IsRISCV64" ever here?  Shouldn't it be already excluded by `!(Mapping.Offset & (Mapping.Offset - 1))`?
> 
> But this is not related to our change anyway.
Feel unnecessary, Mapping.Offset is 0xd55550000 for RISCV64.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137013/new/

https://reviews.llvm.org/D137013



More information about the llvm-commits mailing list