[PATCH] D158587: [sanitizer][msan] VarArgHelper for loongarch64
Limin Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 03:06:42 PDT 2023
Ami-zhang added inline comments.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:5840
+struct VarArgLoongArch64Helper : public VarArgHelper {
+ Function &F;
+ MemorySanitizer &MS;
----------------
vitalybuka wrote:
> It looks like exact clone of Mips64 helper.
> Only ` if (TargetTriple.getArch() == Triple::mips64) {` is missing
>
> Why not just use Mips64 then?
Yes, the `VarArg` convention in LoongArch's ABI is similar to that of Mips, so `VarArgLoongArch64Helper` is here based on Mips.
If use Mips64 helper, like this:
```
+ else if (TargetTriple.isMIPS64() || TargetTriple.isLoongArch64())
return new VarArgMIPS64Helper(Func, Msan, Visitor);
```
`VarArgMIPS64Helper` is a MIPS64-specific implementation. Adding `loongarch64` here, does it seem somewhat ambiguous, suggesting `LoongArch` as a variant of `MIPS `architecture? I don't know if it's good to use it directly like mentioned above. So is it okay like above or have any better suggestions?
Thanks for your time.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158587/new/
https://reviews.llvm.org/D158587
More information about the llvm-commits
mailing list