gcc-patches@gcc.gnu.org
[Top] [All Lists]

Re: Speedup CSE by 5%

Subject: Re: Speedup CSE by 5%
From: Kazu Hirata
Date: Tue, 25 Jan 2005 18:12:06 -0500 EST
Hi Arend,

>       * cse.c (find_best_addr): Don't call copy_rtx before calling
>       fold_rtx. Save cost recomputation if fold_rtx did nothing.

This is a great patch!

Here is the timing in seconds for five runs of ./cc1 -quiet -O2".

             original patched    diff
combine.i      18.186  18.043 -0.786%
fold-const.i   40.025  39.379 -1.613%
reload.i       14.524  14.374 -1.032%
cc1-i files   218.025 216.066 -0.898%  <- wow!

The cc1-i files test was run only once for the unpatched and patched
versions of cc1.

Although you have already tested that your patch has no effect except
on the compile time, you may want to do a regression check just to be
sure and convince whoever is approving this patch.

Kazu Hirata

<Prev in Thread] Current Thread [Next in Thread>