diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-11-26 16:52:32 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-11-26 16:52:32 +0000 |
| commit | 7d6d362e41018fa2a787a3fe04d1596bfd8610e7 (patch) | |
| tree | 0fdeb90a43da535273c84330c72586f01d479be8 /lib/Analysis/BasicAliasAnalysis.cpp | |
| parent | c29d0d5eb1077c274b2c7186c0096201c8bac87c (diff) | |
| download | external_llvm-7d6d362e41018fa2a787a3fe04d1596bfd8610e7.zip external_llvm-7d6d362e41018fa2a787a3fe04d1596bfd8610e7.tar.gz external_llvm-7d6d362e41018fa2a787a3fe04d1596bfd8610e7.tar.bz2 | |
resolve a fixme. I haven't figured out how to write a testcase
to exercise this though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89954 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicAliasAnalysis.cpp')
| -rw-r--r-- | lib/Analysis/BasicAliasAnalysis.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index f8d8873..c038b20 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -400,7 +400,7 @@ static Value *GetLinearExpression(Value *V, APInt &Scale, APInt &Offset, V = GetLinearExpression(BOp->getOperand(0), Scale, Offset, TD); Offset += RHSC->getValue(); return V; - // TODO: SHL, MUL, OR. + // TODO: SHL, MUL. } } } @@ -610,10 +610,9 @@ BasicAliasAnalysis::aliasGEP(const GEPOperator *GEP1, unsigned V1Size, // 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); |
