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/Loads.cpp | |
parent | 5e9a16408ced992d7e2ac6f0acf2b9a1ee0dd862 (diff) | |
download | bcm5719-llvm-fd72bf21c958ae2fdfaa8654df55367c72575d3a.tar.gz bcm5719-llvm-fd72bf21c958ae2fdfaa8654df55367c72575d3a.zip |
[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/Loads.cpp')
-rw-r--r-- | llvm/lib/Analysis/Loads.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp index 31da4e9ec78..33db7fbe665 100644 --- a/llvm/lib/Analysis/Loads.cpp +++ b/llvm/lib/Analysis/Loads.cpp @@ -107,7 +107,7 @@ static bool isDereferenceableAndAlignedPointer( DL, CtxI, DT, Visited); if (const auto *Call = dyn_cast<CallBase>(V)) - if (auto *RP = getArgumentAliasingToReturnedPointer(Call)) + if (auto *RP = getArgumentAliasingToReturnedPointer(Call, true)) return isDereferenceableAndAlignedPointer(RP, Align, Size, DL, CtxI, DT, Visited); |