summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2016-08-15 02:23:50 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2016-08-15 02:23:50 +0000
commit8b8869f8efd650370bcfc3e3980b25d3f5840544 (patch)
treede16c685ef2ff3391cac079b915d3eb3e70e0b71
parentddc7ab26fc3e6005fb255e2121cd003ce442bd94 (diff)
downloadbcm5719-llvm-8b8869f8efd650370bcfc3e3980b25d3f5840544.tar.gz
bcm5719-llvm-8b8869f8efd650370bcfc3e3980b25d3f5840544.zip
[ScopedNoAliasAA] Only collect noalias nodes if we have alias.scope nodes
No functional change is intended. llvm-svn: 278646
-rw-r--r--llvm/lib/Analysis/ScopedNoAliasAA.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/ScopedNoAliasAA.cpp b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
index e34a221e9f0..1fc6e027a95 100644
--- a/llvm/lib/Analysis/ScopedNoAliasAA.cpp
+++ b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
@@ -151,12 +151,14 @@ bool ScopedNoAliasAAResult::mayAliasInScopes(const MDNode *Scopes,
// We alias unless, for some domain, the set of noalias scopes in that domain
// is a superset of the set of alias scopes in that domain.
for (const MDNode *Domain : Domains) {
- SmallPtrSet<const MDNode *, 16> NANodes, ScopeNodes;
- collectMDInDomain(NoAlias, Domain, NANodes);
+ SmallPtrSet<const MDNode *, 16> ScopeNodes;
collectMDInDomain(Scopes, Domain, ScopeNodes);
if (ScopeNodes.empty())
continue;
+ SmallPtrSet<const MDNode *, 16> NANodes;
+ collectMDInDomain(NoAlias, Domain, NANodes);
+
// To not alias, all of the nodes in ScopeNodes must be in NANodes.
bool FoundAll = true;
for (const MDNode *SMD : ScopeNodes)
OpenPOWER on IntegriCloud