[llvm-dev] [canonicalization] GEP 0, 0

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 23 13:12:32 PST 2016


GVN definitely does not detect that GEP 0,0 and bitcast are equivalent, so
it will miss later equivalences based on them.
We could teach it, of course.


On Fri, Dec 23, 2016 at 1:09 PM, Davide Italiano <davide at freebsd.org> wrote:

> On Fri, Dec 23, 2016 at 1:01 PM, Piotr Padlewski
> <piotr.padlewski at gmail.com> wrote:
> >
> >
> > On Dec 23, 2016 19:47, "Daniel Berlin" <dberlin at dberlin.org> wrote:
> >
> > Define soon?
> > My guess is 1 year or less.
> > (I've already seen patches to start converting most remaining memdep
> uses,
> > like memcpy opt, licm, etc)
> >
> >
> > That's good. Anyway I already have a patch that is doing invariant group
> > dependence across BBs, so I guess it make sense to push it upstream to
> push
> > the bar higher.
> > But I think we are getting a little bit of topic - should gep 0 be
> > canonicalized to bitcast?
> >
>
> Are memdep/memssa the only possible passes that could benefit from
> such a canonicalization or you can think of other cases when this can
> be useful?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161223/d432bbaa/attachment.html>


More information about the llvm-dev mailing list