This is the mail archive of the 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: [patch] passes.c: Run CSE only once after GCSE instead of twice or more.

On Fri, 11 Feb 2005 11:04:23 -0500 (EST), Kazu Hirata <> wrote:
> Hi Giovanni,
> > Is it possible to test such performance patches also with
> > preprocessed C++ files? It is undoubtful that C++ excerices the
> > optimizers much more than C, so I think it makes sense to make sure
> > that disabling these optimizations doesn't make use lose in
> > performance there.
> I took MICO as compile time benchmark.
> Here is a timing in seconds for five runs of ./cc1plus -quiet -O2
> -fno-random-seed -o /dev/null.
>           original patched   diff%
> ----------------------------------
> except2.ii  15.395  15.212 -1.188%
> iop.ii      31.844  31.310 -1.676%
> pi_impl.ii  33.453  33.007 -1.333%
> static.ii   31.122  30.781 -1.095%
> mico-ii    371.200 368.957 -0.604%
> mico-ii files were compiled only once.
> There was no difference in the generated code with or without my patch
> except 3 out of 87 preprocessed C++ source files.  One of them had
> minor register allocation differences.  The other two had some real
> differences.  I haven't what kind of differences they are.
> I haven't done any run-time performance measurement.  Any suggestion
> for C++?

I always use my tramp3d-v3 testcase to beat compilers into ground :)
It's fetchable from

Runtime comparisons are only meaningful if inlining decisions do not
change or your local compiler honours the leafify attribute.  Good
options include -funroll-loops, where complete loop peeling enables further

Start with "-n 10" to specify the number of iterations.  For correctness,
sum(rh,vx,vy,vz) should be neary zero, the sum(T) diverges.


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