This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Rerunning CSE after GCSE
- To: law at redhat dot com
- Subject: Re: Rerunning CSE after GCSE
- From: "Vladimir N. Makarov" <vmakarov at cygnus dot com>
- Date: Mon, 19 Feb 2001 12:35:24 -0500
- CC: Bernd Schmidt <bernds at redhat dot com>, Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc-patches at gcc dot gnu dot org, vmakarov at redhat dot com
- References: <26238.982602594@slagheap.cygnus.com>
Jeffrey A Law wrote:
> In message <Pine.LNX.4.30.0102191700130.1311-100000@host140.cambridge.redhat.
> com>you write:
> > On Sun, 18 Feb 2001, Jeffrey A Law wrote:
> >
> > > We really need to speed up local CSE before running it anymore.
> >
> > Vlad had a patch for that about a year ago.
> Yea, it worked by keeping state for each block and re-using that to speed
> up skip-blocks, follow-jumps, etc etc if I recall.
Yes, the current algorithm has at least n*2 complexity (where n is length of
if-statement sequence). The patch I wrote has complexity n. I didn't insist on
it because usage of faster machines solved testing problems and I hoped that
sometime it will be changed by more fast classical optimization like dominator
based common subexpression elimination.
>
> It made huge improvements for speed, but I don't recall having any data on
> its memory consumption.
>
> I believe I've still got a copy if someone wants to start poking at it;
> though I suspect Mark would rather us spend time dealing with issues
> directly related to GCC 3.0.
>
I don't think that it increases the memory consumption. But the patch was
complicated and I found some very big functions on which the assembler code was
different from the old cse version (although the code was valid). That was
suspicious. So it is not a good candidate for GCC 3.0.
Vlad