[PATCH] D81678: Introduce noundef attribute at call sites for stricter poison analysis
Gui Andrade via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 22 15:00:33 PDT 2020
guiand updated this revision to Diff 279949.
guiand added a comment.
Adds additional constraints on `noundef`: Not a `nullptr_t`, not a member pointer, and not coerced to a type of larger size. Disabled emitting in return position for non-C++ languages (or inside extern "C").
@rsmith, I just didn't address your comment about being conservative with black-holeing C++ functions returning undef. At least for msan purposes this shouldn't be a *too* much of a problem, but of course this attribute is for general use by LLVM passes. I'm just wondering what kind of tradeoff we want to make here, I suppose.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81678/new/
https://reviews.llvm.org/D81678
Files:
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/CGCall.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/indirect-noundef.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81678.279949.patch
Type: text/x-patch
Size: 7106 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200722/d7b73cc8/attachment-0001.bin>
More information about the cfe-commits
mailing list