OSDN Git Service

[FunctionAttrs] try to extend nonnull-ness of arguments from a callsite back to its...
authorSanjay Patel <spatel@rotateright.com>
Mon, 13 Feb 2017 23:10:51 +0000 (23:10 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 13 Feb 2017 23:10:51 +0000 (23:10 +0000)
commita771f08794b7d219b6bba7ddcb994c2df2d37bb0
treef3db02bdbdf6f4367511af64bed713ae723fae79
parent1cf4c6378030cace656a9bea24a5834a786a47d5
[FunctionAttrs] try to extend nonnull-ness of arguments from a callsite back to its parent function

As discussed here:
http://lists.llvm.org/pipermail/llvm-dev/2016-December/108182.html
...we should be able to propagate 'nonnull' info from a callsite back to its parent.

The original motivation for this patch is our botched optimization of "dyn_cast" (PR28430),
but this won't solve that problem.

The transform is currently disabled by default while we wait for clang to work-around
potential security problems:
http://lists.llvm.org/pipermail/cfe-dev/2017-January/052066.html

Differential Revision: https://reviews.llvm.org/D27855

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294998 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/FunctionAttrs.cpp
test/Transforms/FunctionAttrs/nonnull.ll