summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/AliasSetTracker.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-07-01 13:22:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-07-01 13:22:02 +0000
commit9df3605dea17e84f8183581f6103bd0c79e2a606 (patch)
tree70a2f36ce9eb9bb213603cd7f2f120af53fc176f /include/llvm/Analysis/AliasSetTracker.h
parent08bbd35a80bf7765fe0d3043f9eb5a2f2786b649 (diff)
Diffstat (limited to 'include/llvm/Analysis/AliasSetTracker.h')
-rw-r--r--include/llvm/Analysis/AliasSetTracker.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h
index eac97501c759c..daafd2fabe781 100644
--- a/include/llvm/Analysis/AliasSetTracker.h
+++ b/include/llvm/Analysis/AliasSetTracker.h
@@ -69,10 +69,15 @@ class AliasSet : public ilist_node<AliasSet> {
if (AAInfo == DenseMapInfo<AAMDNodes>::getEmptyKey())
// We don't have a AAInfo yet. Set it to NewAAInfo.
AAInfo = NewAAInfo;
- else if (AAInfo != NewAAInfo)
- // NewAAInfo conflicts with AAInfo.
- AAInfo = DenseMapInfo<AAMDNodes>::getTombstoneKey();
-
+ else {
+ AAMDNodes Intersection(AAInfo.intersect(NewAAInfo));
+ if (!Intersection) {
+ // NewAAInfo conflicts with AAInfo.
+ AAInfo = DenseMapInfo<AAMDNodes>::getTombstoneKey();
+ return SizeChanged;
+ }
+ AAInfo = Intersection;
+ }
return SizeChanged;
}