OSDN Git Service

Introduce MaxUsesToExplore argument to capture tracking
authorArtur Pilipenko <apilipenko@azulsystems.com>
Thu, 29 Nov 2018 20:08:12 +0000 (20:08 +0000)
committerArtur Pilipenko <apilipenko@azulsystems.com>
Thu, 29 Nov 2018 20:08:12 +0000 (20:08 +0000)
commit1912c7578e19a786cc5db9cc23fa85cb92a3e189
tree9cd514602654b6a3c1cfcb16122b35fde321f094
parent50c71c5f0617731543b756e7125d92a61d820a1f
Introduce MaxUsesToExplore argument to capture tracking

Currently CaptureTracker gives up if it encounters a value with more than 20
uses. The motivation for this cap is to keep it relatively cheap for
BasicAliasAnalysis use case, where the results can't be cached. Although, other
clients of CaptureTracker might be ok with higher cost. This patch introduces an
argument for PointerMayBeCaptured functions to specify the max number of uses to
explore. The motivation for this change is a downstream user of CaptureTracker,
but I believe upstream clients of CaptureTracker might also benefit from more
fine grained cap.

Reviewed By: hfinkel

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347910 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/CaptureTracking.h
lib/Analysis/CaptureTracking.cpp