diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-08-15 02:23:50 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-08-15 02:23:50 +0000 |
commit | 8b8869f8efd650370bcfc3e3980b25d3f5840544 (patch) | |
tree | de16c685ef2ff3391cac079b915d3eb3e70e0b71 /llvm/lib | |
parent | ddc7ab26fc3e6005fb255e2121cd003ce442bd94 (diff) | |
download | bcm5719-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
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/ScopedNoAliasAA.cpp | 6 |
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) |