This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: dom requires PROP_loops
- From: Paulo Matos <pmatos at broadcom dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Fri, 14 Mar 2014 08:50:39 +0000
- Subject: RE: dom requires PROP_loops
- Authentication-results: sourceware.org; auth=none
- References: <19EB96622A777C4AB91610E763265F4642D9F1 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <CAFiYyc0=pg8=017-gmiXeXFWvexrt7mhruuVrD5N-kJGP9ez4g at mail dot gmail dot com> <19EB96622A777C4AB91610E763265F4642F387 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <19EB96622A777C4AB91610E763265F4642F4E4 at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <CAFiYyc2X4r3GTr4uX_=05JH4v_9AXRciyBm9QzBS6=jfNAEfhw at mail dot gmail dot com> <19EB96622A777C4AB91610E763265F4642F82A at SJEXCHMB14 dot corp dot ad dot broadcom dot com> <0c9309ca-7a84-41de-93de-dd398a5bbab1 at email dot android dot com>
> -----Original Message-----
> From: Richard Biener [mailto:richard.guenther@gmail.com]
> Sent: 13 March 2014 18:46
> To: Paulo Matos
> Cc: gcc@gcc.gnu.org
> Subject: RE: dom requires PROP_loops
>
> On March 13, 2014 5:00:53 PM CET, Paulo Matos <pmatos@broadcom.com> wrote:
> >> -----Original Message-----
> >> From: Richard Biener [mailto:richard.guenther@gmail.com]
> >> Sent: 13 March 2014 13:24
> >> To: Paulo Matos
> >> Cc: gcc@gcc.gnu.org
> >> Subject: Re: dom requires PROP_loops
> >>
> >>
> >> Probably RTL cfgcleaup needs the same treatment as GIMPLE cfgcleanup
> >> then - allow removal if loop properties allows it.
> >>
> >
> >In both cfgcleanup.c and tree-cfgcleanup.c I can see code that protects
> >loop latches, but I see no code that allows removal of latch if
> >property allows it.
> >From what you say I would expect this would already be implemented in
> >tree-cfgcleanup.c, however what actually happens is that since
> >current_loops is non-null (PROP_loops is not destroyed in tree
> >loopdone), tree-cfgcleanup call chain ends up calling
> >cleanup_tree_cfg_bb on the bb loop latch and tree_forwarder_block_p
> >returns false for bb because of the following code thereby not removing
> >the latch:
> > if (current_loops)
> > {
> > basic_block dest;
> > /* Protect loop latches, headers and preheaders. */
> > if (bb->loop_father->header == bb)
> > return false;
> > dest = EDGE_SUCC (bb, 0)->dest;
> >
> > if (dest->loop_father->header == dest)
> > return false;
> > }
> >
> >Why do we need to protect the latch?
>
> You are looking at old sources.
>
That's correct. I was looking at 4.8. Let me take a look at what trunk is doing... :)
> Richard.
>
> >Paulo Matos
> >
> >> Richard.
> >>
>