From a8801469253ebdd678e64c82bf8729e4f4dd2946 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Tue, 31 May 2016 19:55:05 +0000 Subject: [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 --- llvm/lib/Analysis/CFLAliasAnalysis.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'llvm/lib/Analysis/CFLAliasAnalysis.cpp') 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) { -- cgit v1.2.3