[Attributor] Deal with shrinking dereferenceability in a loop
authorJohannes Doerfert <jdoerfert@anl.gov>
Fri, 23 Aug 2019 17:29:23 +0000 (17:29 +0000)
committerJohannes Doerfert <jdoerfert@anl.gov>
Fri, 23 Aug 2019 17:29:23 +0000 (17:29 +0000)
commit785fad32025ac29b3169a3c9e25b01b2835869d4
tree7ebb5c7dcf88862e9cf5a529152b0248bcf56f87
parentccc272cd32c9872842cf0e65e3af71ce96e6793a
[Attributor] Deal with shrinking dereferenceability in a loop

Summary:
If we have a loop in which the dereferenceability of a pointer decreases
we did slowly decrease it iteration by iteration, leading to a timeout.
With this patch we detect such circular reasoning and indicate a
fixpoint early.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

llvm-svn: 369784
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/FunctionAttrs/dereferenceable.ll