summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/BasicAliasAnalysis.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <flo@fhahn.com>2019-08-15 12:13:02 +0000
committerFlorian Hahn <flo@fhahn.com>2019-08-15 12:13:02 +0000
commitfd72bf21c958ae2fdfaa8654df55367c72575d3a (patch)
treeac93587b37c3784be4ef3f8b977517e67fc2edfd /llvm/lib/Analysis/BasicAliasAnalysis.cpp
parent5e9a16408ced992d7e2ac6f0acf2b9a1ee0dd862 (diff)
downloadbcm5719-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/BasicAliasAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/BasicAliasAnalysis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index 3721c99883b..ef57173d468 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -481,7 +481,7 @@ bool BasicAAResult::DecomposeGEPExpression(const Value *V,
// because it should be in sync with CaptureTracking. Not using it may
// cause weird miscompilations where 2 aliasing pointers are assumed to
// noalias.
- if (auto *RP = getArgumentAliasingToReturnedPointer(Call)) {
+ if (auto *RP = getArgumentAliasingToReturnedPointer(Call, true)) {
V = RP;
continue;
}
OpenPOWER on IntegriCloud