From 3563938ee46c0d3f33436ec65a870c082e855f98 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Wed, 19 Nov 2014 19:36:18 +0000 Subject: [PATCH] AliasSet: Simplify mergeSetIn No functional change intended. llvm-svn: 222376 --- llvm/lib/Analysis/AliasSetTracker.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp index 5b85f65..45442b0 100644 --- a/llvm/lib/Analysis/AliasSetTracker.cpp +++ b/llvm/lib/Analysis/AliasSetTracker.cpp @@ -55,16 +55,15 @@ void AliasSet::mergeSetIn(AliasSet &AS, AliasSetTracker &AST) { AliasTy = MayAlias; } - bool ASHadUnknownInsts = false; + bool ASHadUnknownInsts = !AS.UnknownInsts.empty(); if (UnknownInsts.empty()) { // Merge call sites... - if (!AS.UnknownInsts.empty()) { + if (ASHadUnknownInsts) { std::swap(UnknownInsts, AS.UnknownInsts); addRef(); } - } else if (!AS.UnknownInsts.empty()) { + } else if (ASHadUnknownInsts) { UnknownInsts.insert(UnknownInsts.end(), AS.UnknownInsts.begin(), AS.UnknownInsts.end()); AS.UnknownInsts.clear(); - ASHadUnknownInsts = true; } AS.Forward = this; // Forward across AS now... -- 2.7.4