[llvm] r227098 - Fix delegation
Daniel Berlin
dberlin at dberlin.org
Mon Jan 26 09:30:39 PST 2015
Author: dannyb
Date: Mon Jan 26 11:30:39 2015
New Revision: 227098
URL: http://llvm.org/viewvc/llvm-project?rev=227098&view=rev
Log:
Fix delegation
Modified:
llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp?rev=227098&r1=227097&r2=227098&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/CFLAliasAnalysis.cpp Mon Jan 26 11:30:39 2015
@@ -227,10 +227,13 @@ public:
// Comparisons between global variables and other constants should be
// handled by BasicAA.
if (isa<Constant>(LocA.Ptr) && isa<Constant>(LocB.Ptr)) {
- return MayAlias;
+ return AliasAnalysis::alias(LocA, LocB);
}
+ AliasResult QueryResult = query(LocA, LocB);
+ if (QueryResult == MayAlias)
+ return AliasAnalysis::alias(LocA, LocB);
- return query(LocA, LocB);
+ return QueryResult;
}
void initializePass() override { InitializeAliasAnalysis(this); }
More information about the llvm-commits
mailing list