This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Repost: RFA [4.1]: improvement to if-conversion and cross-jumping (PR20070)


> On Wednesday 30 November 2005 16:15, Bernd Schmidt wrote:
> > >> > +       /* The following code helps take care of G++ cleanups.  */
> > >>
> > >> Comment not helpful.  How does it help?  What's special about G++
> > >> cleanups?
> > >
> > > I'm afraid that I have no idea.  That stuff comes from the old
> > > cross-jumping code too,
> > > added by Jan Hubicka on the 11th July 2001 to flow.c , moved on the 10th
> > > September 2001
> > > to cfgcleanup.c, later broken out into its own function, and reformatted
> > > a number of times.
> >
> > Ah, I see, it occurs somewhere else too.  Common parts should move into
> > a separate function - unless the corresponding bits in insns_match_p
> > aren't actually needed anymore (gcov shows no coverage, but that may not
> > mean anything)?
> >
> > Oh dear, this comment is even older than Jan's change - it was present
> > in the old jump.c cross jumper.
> 
> In fact it was already there in the initial check-in of jump.c in
> the former old-gcc repository, back in January of 1992.  See here: 
> http://gcc.gnu.org/viewcvs/trunk/gcc/jump.c?rev=236&view=markup
> 
> But that code never triggers for me.  I bootstrapped and tested
> all languages except Ada with this patch on x86_64-linux:
> 
> ---------------------------------------
> Index: cfgcleanup.c
> ===================================================================
> --- cfgcleanup.c        (revision 107822)
> +++ cfgcleanup.c        (working copy)
> @@ -1073,7 +1073,7 @@ insns_match_p (int mode ATTRIBUTE_UNUSED
>               if (! rtx_renumbered_equal_p (p1, p2))
>                 cancel_changes (0);
>               else if (apply_change_group ())
> -               return true;
> +               gcc_unreachable ();
>             }
>         }
>      }
> ---------------------------------------
> 
> I didn't get any new failures.  Maybe we should just remove this
> code.

I would suggest so.  The code was originally intended (I think, it is
really arcane) to help pre-reload crossjumping we never ended up doing
crossjumping on equivalent code sequences with different temporaries.

I experimented with enabling crossjuping before reload in the past and
it didn't work well enought to pay back (ie usually didn't get across
the different pseudos problem anyway) and there are better algorithms to
do that.

Honza
> 
> Gr.
> Steven
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]