This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Factoring algorithms on rtl ?
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Jim Wilson <wilson at specifixinc dot com>
- Cc: Gábor Lóki <loki at inf dot u-szeged dot hu>,gcc at gcc dot gnu dot org
- Date: Tue, 17 Feb 2004 23:00:42 +0100
- Subject: Re: Factoring algorithms on rtl ?
- References: <403205E4.8080007@inf.u-szeged.hu> <4032851A.7000706@specifixinc.com>
> Gábor Lóki wrote:
> >The attached patch finds those basic blocks of which the first insns
> >are indentical, and factor out them into the end of parent basic blocks.
> >This is done only if it has no side effects and the count of original
> >insns - marked for factoring - is greater than the count of parent basic
> >blocks.
>
> This seems to be the same optmization as cross-jumping, except that
> cross-jumping only handles the suffix case, and you are trying to handle
> both prefix and suffix cases.
>
> See try_crossjump_bb in cfgcleanup.c.
There is also code unification pass in gcse that is supposed to be able
to do precisely this transformation as special case, but it don't as it
is not able to deal with cascaded instructions very well.
I am not sure how to fix it effectively, but it would be nice to try
doing so...
Honza
> --
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com