[llvm-commits] [llvm] r89954 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Chris Lattner
sabre at nondot.org
Thu Nov 26 08:52:32 PST 2009
Author: lattner
Date: Thu Nov 26 10:52:32 2009
New Revision: 89954
URL: http://llvm.org/viewvc/llvm-project?rev=89954&view=rev
Log:
resolve a fixme. I haven't figured out how to write a testcase
to exercise this though.
Modified:
llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=89954&r1=89953&r2=89954&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Thu Nov 26 10:52:32 2009
@@ -400,7 +400,7 @@
V = GetLinearExpression(BOp->getOperand(0), Scale, Offset, TD);
Offset += RHSC->getValue();
return V;
- // TODO: SHL, MUL, OR.
+ // TODO: SHL, MUL.
}
}
}
@@ -610,10 +610,9 @@
// Check to see if these two pointers are related by the getelementptr
// instruction. If one pointer is a GEP with a non-zero index of the other
// pointer, we know they cannot alias.
- //
- // FIXME: The check below only looks at the size of one of the pointers, not
- // both, this may cause us to miss things.
- if (V1Size == ~0U || V2Size == ~0U)
+
+ // If both accesses are unknown size, we can't do anything useful here.
+ if (V1Size == ~0U && V2Size == ~0U)
return MayAlias;
AliasResult R = aliasCheck(UnderlyingV1, ~0U, V2, V2Size);
More information about the llvm-commits
mailing list