[llvm] r222376 - AliasSet: Simplify mergeSetIn
David Majnemer
david.majnemer at gmail.com
Wed Nov 19 11:36:19 PST 2014
Author: majnemer
Date: Wed Nov 19 13:36:18 2014
New Revision: 222376
URL: http://llvm.org/viewvc/llvm-project?rev=222376&view=rev
Log:
AliasSet: Simplify mergeSetIn
No functional change intended.
Modified:
llvm/trunk/lib/Analysis/AliasSetTracker.cpp
Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=222376&r1=222375&r2=222376&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Wed Nov 19 13:36:18 2014
@@ -55,16 +55,15 @@ void AliasSet::mergeSetIn(AliasSet &AS,
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...
More information about the llvm-commits
mailing list