diff options
author | Florian Hahn <flo@fhahn.com> | 2019-08-15 12:13:02 +0000 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2019-08-15 12:13:02 +0000 |
commit | fd72bf21c958ae2fdfaa8654df55367c72575d3a (patch) | |
tree | ac93587b37c3784be4ef3f8b977517e67fc2edfd /llvm/lib/Analysis/CaptureTracking.cpp | |
parent | 5e9a16408ced992d7e2ac6f0acf2b9a1ee0dd862 (diff) | |
download | llvm-fd72bf21c958ae2fdfaa8654df55367c72575d3a.zip llvm-fd72bf21c958ae2fdfaa8654df55367c72575d3a.tar.gz llvm-fd72bf21c958ae2fdfaa8654df55367c72575d3a.tar.bz2 |
[ValueTracking] Add MustPreserveNullness arg to functions analyzing calls. (NFC)
Some uses of getArgumentAliasingToReturnedPointer and
isIntrinsicReturningPointerAliasingArgumentWithoutCapturing require the
calls/intrinsics to preserve the nullness of the argument.
For alias analysis, the nullness property does not really come into
play.
This patch explicitly sets it to true. In D61669, the alias analysis
uses will be switched to not require preserving nullness.
Reviewers: nlopes, efriedma, hfinkel, sanjoy, aqjune, jdoerfert
Reviewed By: jdoerfert
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64150
llvm-svn: 368993
Diffstat (limited to 'llvm/lib/Analysis/CaptureTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/CaptureTracking.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/CaptureTracking.cpp b/llvm/lib/Analysis/CaptureTracking.cpp index adaa83a..f12e50e 100644 --- a/llvm/lib/Analysis/CaptureTracking.cpp +++ b/llvm/lib/Analysis/CaptureTracking.cpp @@ -251,7 +251,8 @@ void llvm::PointerMayBeCaptured(const Value *V, CaptureTracker *Tracker, // marked with nocapture do not capture. This means that places like // GetUnderlyingObject in ValueTracking or DecomposeGEPExpression // in BasicAA also need to know about this property. - if (isIntrinsicReturningPointerAliasingArgumentWithoutCapturing(Call)) { + if (isIntrinsicReturningPointerAliasingArgumentWithoutCapturing(Call, + true)) { AddUses(Call); break; } |