diff options
author | Hal Finkel <hfinkel@anl.gov> | 2014-07-21 21:30:22 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2014-07-21 21:30:22 +0000 |
commit | d32803b669a91641fd1845caa164d3167ded7444 (patch) | |
tree | a1238cadd9c62eb27c401f2f50c59c0f942402c9 /llvm/lib/Analysis/AliasAnalysis.cpp | |
parent | 26f2268cc52069c170ff6b2583e6f2f376fa5d74 (diff) | |
download | bcm5719-llvm-d32803b669a91641fd1845caa164d3167ded7444.tar.gz bcm5719-llvm-d32803b669a91641fd1845caa164d3167ded7444.zip |
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
Diffstat (limited to 'llvm/lib/Analysis/AliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/AliasAnalysis.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp index 3f1cf6aa3f8..8b8106b950a 100644 --- a/llvm/lib/Analysis/AliasAnalysis.cpp +++ b/llvm/lib/Analysis/AliasAnalysis.cpp @@ -408,7 +408,8 @@ AliasAnalysis::callCapturesBefore(const Instruction *I, return AliasAnalysis::ModRef; if (llvm::PointerMayBeCapturedBefore(Object, /* ReturnCaptures */ true, - /* StoreCaptures */ true, I, DT)) + /* StoreCaptures */ true, I, DT, + /* include Object */ true)) return AliasAnalysis::ModRef; unsigned ArgNo = 0; |