diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2016-05-31 19:55:05 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2016-05-31 19:55:05 +0000 |
commit | a8801469253ebdd678e64c82bf8729e4f4dd2946 (patch) | |
tree | ebcfd5efe4c18611dc123500d03a3d1e0faff7ab /llvm/lib/Analysis/CFLAliasAnalysis.cpp | |
parent | 74ccbd61af2241303a25187a28377cdae201eebf (diff) | |
download | bcm5719-llvm-a8801469253ebdd678e64c82bf8729e4f4dd2946.tar.gz bcm5719-llvm-a8801469253ebdd678e64c82bf8729e4f4dd2946.zip |
[CFLAA] Don't link GEP pointers to GEP indices.
Code like the following is considered broken, and doesn't need to be
supported by our AA magicks:
void getFoo(int *P) {
int *PAlias = (int *)((char *)NULL + (uintptr_t)P);
}
This patch makes CFLAA drop support for code like this.
Patch by Jia Chen.
Differential Revision: http://reviews.llvm.org/D20775
llvm-svn: 271322
Diffstat (limited to 'llvm/lib/Analysis/CFLAliasAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/CFLAliasAnalysis.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/CFLAliasAnalysis.cpp b/llvm/lib/Analysis/CFLAliasAnalysis.cpp index 1a6d87138d4..57c3f317c11 100644 --- a/llvm/lib/Analysis/CFLAliasAnalysis.cpp +++ b/llvm/lib/Analysis/CFLAliasAnalysis.cpp @@ -209,8 +209,6 @@ public: void visitGetElementPtrInst(GetElementPtrInst &Inst) { auto *Op = Inst.getPointerOperand(); Output.push_back(Edge(&Inst, Op, EdgeType::Assign, AttrNone)); - for (auto I = Inst.idx_begin(), E = Inst.idx_end(); I != E; ++I) - Output.push_back(Edge(&Inst, *I, EdgeType::Assign, AttrNone)); } void visitSelectInst(SelectInst &Inst) { |