[PATCH] [InstCombine] Propagate non-null facts to call parameters

Nick Lewycky nicholas at mxc.ca
Mon Apr 20 16:04:49 PDT 2015

Pete Cooper wrote:
> This is somewhat similar to what FunctionAttrs.cpp does, although nonnull is a parameter level instead of function level attribute.
> Should this behavior be moved to FunctionAttrs.cpp instead of InstCombine, or vice-versa?

It should probably go into FunctionAttrs.cpp which also computes 
per-argument readonly/readnone/nocapture. One of the things to note is 
that you can end up with an SCC between functions A and B where they 
pass a parameter to each other which has no reason not to be nonnull 
except for their mutual use of each other. FunctionAttrs builds up an 
SCC graph of Arguments to solve this optimally and deterministically.


> http://reviews.llvm.org/D9132
>    http://reviews.llvm.org/settings/panel/emailpreferences/
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

More information about the llvm-commits mailing list