Move the CapturesBefore tracker from AA into CaptureTracking
authorHal Finkel <hfinkel@anl.gov>
Mon, 21 Jul 2014 13:15:48 +0000 (13:15 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 21 Jul 2014 13:15:48 +0000 (13:15 +0000)
commit8db585afaac3b5e1a4222d33b9abadac5c96f5f6
tree4dc0933b0f94fe2588c414d6ac24ca1ffb0b5221
parent6dbe7b1e317860d73f72939cc2fbe8b6372a30fd
Move the CapturesBefore tracker from AA into CaptureTracking

There were two generally-useful CaptureTracker classes defined in LLVM: the
simple tracker defined in CaptureTracking (and made available via the
PointerMayBeCaptured utility function), and the CapturesBefore tracker
available only inside of AA. This change moves the CapturesBefore tracker into
CaptureTracking, generalizes it slightly (by adding a ReturnCaptures
parameter), and makes it generally available via a PointerMayBeCapturedBefore
utility function.

This logic will be needed, for example, to perform noalias function parameter
attribute inference.

No functionality change intended.

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