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: Take 3: RFA: re-instate struct_equiv code


Richard Guenther wrote:
On 2/18/06, Bernd Schmidt <bernds_cb1@t-online.de> wrote:
Here's a set of patches to reenable the struct_equiv crossjumping while
keeping compile times under control.  Crossjumping is now done in a
batch over all basic blocks when no other cfg optimizations have been found.

I was slightly surprised that changing the order of things done in
try_optimize_cfg sometimes has an effect on generated code.  It seems we
don't always cross jump if we can, and we don't always merge blocks
either when doing so would be beneficial.  That probably ought to be
investigated.

Despite these problems, the set of four patches when applied together is
a convincing win in the code size department, as evidenced by these
numbers for a bootstrapped cc1:

Before:
  12 .text         0051b65c  08049c20  08049c20  00001c20  2**4

After:
  12 .text         0051767c  08049c20  08049c20  00001c20  2**4

Compile time still increases, but nowhere near as much as it used to
when the struct-equiv patch was backed out.  These are the times from an
unpatched cc1 compiling a large number of files from .i to .s:

  real    10m26.179s
  user    10m16.683s
  sys     0m7.644s

and these are from a patched compiler:

real    10m28.403s
user    10m20.159s
sys     0m7.740s

which I think is acceptable given the code size gains - a full compile
from .c to .o is going to show even less of an effect.  Does anyone
disagree strongly with this?

Is this enabled by default for -O1 or -O2? I think the compile time regression is ok for -Os and -O3, though rather than testing cc1 size and compile time could you compare CSiBE before and after the patch?

Ok. How do I generate something user-friendly, like a graph, out of two separate .csv files for comparison purposes?



Bernd



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