[PATCH] [MSan][MIPS] VarArgHelper for MIPS64

Evgeniy Stepanov eugenis at google.com
Fri Jan 30 14:42:47 PST 2015


LGTM w/ inline comments


REPOSITORY
  rL LLVM

================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:437
@@ -432,3 +436,3 @@
     GlobalVariable::InitialExecTLSModel);
-  VAArgOverflowSizeTLS = new GlobalVariable(
+  VAArgOverflowSizeTLS = VAArgSizeTLS = new GlobalVariable(
     M, IRB.getInt64Ty(), false, GlobalVariable::ExternalLinkage, nullptr,
----------------
Please reuse VAArgSizeTLS instead of creating a new member variable, with a comment somewhere in VarArgHelper that it is used to pass the full argument size (effectively, all arguments on MIPS64 go to the overflow area in terms of X86_64).

It's confusing, unless you want to rename __msan_va_arg_overflow_size_tls as well.



================
Comment at: lib/Transforms/Instrumentation/MemorySanitizer.cpp:2979
@@ -2882,1 +2978,3 @@
     return new VarArgAMD64Helper(Func, Msan, Visitor);
+  else if (TargetTriple.getArch() == llvm::Triple::mips64el)
+    return new VarArgMIPS64Helper(Func, Msan, Visitor);
----------------
Above, we use the following to check for MIPS64:
        case Triple::mips64:
        case Triple::mips64el:

Do you need  to check for Triple::mips64 here as well?

http://reviews.llvm.org/D7182

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list