[PATCH] D66135: [SimplifyLibCalls] Add noalias from known callsites

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 08:33:16 PDT 2019


jdoerfert added a comment.

Tests without a constant size are missing:
`strcpy(a, b)`



================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:527
+  CI->addParamAttr(1, Attribute::NoAlias);
+
   // Let strncpy handle the zero padding
----------------
See the missing test comment.


================
Comment at: lib/Transforms/Utils/SimplifyLibCalls.cpp:991
+    }
+  }
 
----------------
The size check is not necessary. If the size is 0 (statically or dynamicaly) there are no accesses, consequently "all" accesses adhere to the noalias definition.


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

https://reviews.llvm.org/D66135





More information about the llvm-commits mailing list