[llvm] r278646 - [ScopedNoAliasAA] Only collect noalias nodes if we have alias.scope nodes
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 14 19:23:51 PDT 2016
Author: majnemer
Date: Sun Aug 14 21:23:50 2016
New Revision: 278646
URL: http://llvm.org/viewvc/llvm-project?rev=278646&view=rev
Log:
[ScopedNoAliasAA] Only collect noalias nodes if we have alias.scope nodes
No functional change is intended.
Modified:
llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp
Modified: llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp?rev=278646&r1=278645&r2=278646&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp (original)
+++ llvm/trunk/lib/Analysis/ScopedNoAliasAA.cpp Sun Aug 14 21:23:50 2016
@@ -151,12 +151,14 @@ bool ScopedNoAliasAAResult::mayAliasInSc
// 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)
More information about the llvm-commits
mailing list