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? Piotr On Fri, Dec 23, 2016 at 8:27 AM, Piotr Padlewski via llvm-dev < llvm-dev at lists.llvm.org> wrote:> > > 2016-12-23 17:22 GMT+01:00 Davide Italiano <davide at freebsd.org>: > >> On Fri, Dec 23, 2016 at 8:12 AM, Piotr Padlewski via llvm-dev >> <llvm-dev at lists.llvm.org> wrote: >> > Hi everyone, >> > >> > I started digging into MemDep to enhance devirtualization and I found >> out >> > that it doesn't handle invariant.group if it will find GEP 0, 0. >> > If I understand it correctly getelementptr with zeros is just bitcast. >> Is >> > there any good reason why it is not canonicalized into bitcast? >> > >> >> Hi, >> is there any particular reason why you're trying to fix this in MemDep >> (and not in MemSSA?) >> >> GVN uses MemDep and MemSSA doesn't handle invariant.group. I was told > that MemDep won't go out soon and it is easier for me right now to fix my > stuff there than in MemSSA. I have plans to write support for MemSSA, but > probably not in near future. > > >> -- >> Davide >> >> "There are no solved problems; there are only problems that are more >> or less solved" -- Henri Poincare >> > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161223/4bbc0c97/attachment.html>
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?
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>
On Fri, Dec 23, 2016 at 1:09 PM, Davide Italiano via llvm-dev < llvm-dev at lists.llvm.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? >We already canonicalize. We canonicalize in the other direction: https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/InstCombine/InstCombineCasts.cpp#L2024> _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161223/0f80b913/attachment.html>