[Attributor] Deduce "dereferenceable" attribute
authorHideto Ueno <uenoku.tokotoko@gmail.com>
Tue, 23 Jul 2019 08:16:17 +0000 (08:16 +0000)
committerHideto Ueno <uenoku.tokotoko@gmail.com>
Tue, 23 Jul 2019 08:16:17 +0000 (08:16 +0000)
commit19c07afe17fcacd8fd7d1196df16150be69e0dc9
tree69879ce5227ce765687cca18394378c6533791c5
parentc7e6d14c6c30c6798b14faf2a28e5be642b78ad8
[Attributor] Deduce "dereferenceable" attribute

Summary:
Deduce dereferenceable attribute in Attributor.

These will be added in a later patch.
* dereferenceable(_or_null)_globally (D61652)
* Deduction based on load instruction (similar to D64258)

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

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

llvm-svn: 366788
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/FunctionAttrs/arg_nocapture.ll
llvm/test/Transforms/FunctionAttrs/dereferenceable.ll [new file with mode: 0644]
llvm/test/Transforms/FunctionAttrs/noalias_returned.ll
llvm/test/Transforms/FunctionAttrs/nonnull.ll