[Attributor][MemBehavior] Fallback to the function state for arguments
authorJohannes Doerfert <jdoerfert@anl.gov>
Sun, 13 Oct 2019 20:47:16 +0000 (20:47 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Sun, 13 Oct 2019 20:47:16 +0000 (20:47 +0000)
commit8ee410c75ec416ea02dabeddd03fb062ab5dc92e
tree4402cd576b41e4e5be8b0a4d9c3604d768e4243d
parentdb6efb017f246e2492ccd00613d079de96d8f705
[Attributor][MemBehavior] Fallback to the function state for arguments

Even if an argument is captured, we cannot have an effect the function
does not have. This is fine except for the special case of `inalloca` as
it does not behave by the rules.

TODO: Maybe the special rule for `inalloca` is wrong after all.
llvm-svn: 374736
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/FunctionAttrs/nocapture.ll
llvm/test/Transforms/FunctionAttrs/nonnull.ll
llvm/test/Transforms/FunctionAttrs/readattrs.ll