Match semantics of PointerMayBeCapturedBefore to its name by default
authorHal Finkel <hfinkel@anl.gov>
Mon, 21 Jul 2014 21:30:22 +0000 (21:30 +0000)
committerHal Finkel <hfinkel@anl.gov>
Mon, 21 Jul 2014 21:30:22 +0000 (21:30 +0000)
commitd32803b669a91641fd1845caa164d3167ded7444
treea1238cadd9c62eb27c401f2f50c59c0f942402c9
parent26f2268cc52069c170ff6b2583e6f2f376fa5d74
Match semantics of PointerMayBeCapturedBefore to its name by default

As it turns out, the capture tracker named CaptureBefore used by AA, and now
available via the PointerMayBeCapturedBefore function, would have been
more-aptly named CapturedBeforeOrAt, because it considers captures at the
instruction provided. This is not always what one wants, and it is difficult to
get the strictly-before behavior given only the current interface. This adds an
additional parameter which controls whether or not you want to include
captures at the provided instruction. The default is not to include the
instruction provided, so that 'Before' matches its name.

No functionality change intended.

llvm-svn: 213582
llvm/include/llvm/Analysis/CaptureTracking.h
llvm/lib/Analysis/AliasAnalysis.cpp
llvm/lib/Analysis/CaptureTracking.cpp