[PATCH] D112197: [msan] Don't use TLS slots of noundef args

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 21 12:54:46 PDT 2021


vitalybuka added inline comments.


================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:3712-3713
         Size = DL.getTypeAllocSize(A->getType());
-        if (ArgOffset + Size > kParamTLSSize) break;
-        Store = IRB.CreateAlignedStore(ArgShadow, ArgShadowBase,
-                                       kShadowTLSAlignment);
-        Constant *Cst = dyn_cast<Constant>(ArgShadow);
-        if (Cst && Cst->isNullValue()) ArgIsInitialized = true;
+      } else {
+        if (ByVal) {
+          // ByVal requires some special handling as it's too big for a single
----------------
kstoimenov wrote:
> Consider converting this to "else if (ByVal)" to reduce indentation level. 
Plain conversion will not work. There is IRB.CreateStore(getOrigin(A) which shared for both non EagerCheck branches


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D112197



More information about the llvm-commits mailing list