[PATCH] D20775: [CFLAA] Remove redundant aliasing relation between GEP indices and GEP result

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Sun May 29 10:04:08 PDT 2016


Hey Jia,
You need to add testcases for this :)


On Sat, May 28, 2016 at 1:20 PM, Jia Chen via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> grievejia created this revision.
> grievejia added reviewers: hfinkel, george.burgess.iv.
> grievejia added a subscriber: llvm-commits.
>
> As shown in the diff, if cfl-aa encounters a GEP instructions y = gep x,
> z, we used to treat y and z as potential aliases. However, according to the
> "Pointer Aliasing Rule" section of LLVM Language Reference, this decision
> turns out to be overly defensive.
>
> http://reviews.llvm.org/D20775
>
> Files:
>   lib/Analysis/CFLAliasAnalysis.cpp
>
> Index: lib/Analysis/CFLAliasAnalysis.cpp
> ===================================================================
> --- lib/Analysis/CFLAliasAnalysis.cpp
> +++ lib/Analysis/CFLAliasAnalysis.cpp
> @@ -209,8 +209,6 @@
>    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) {
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160529/e12cb495/attachment.html>


More information about the llvm-commits mailing list