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: [Bug middle-end/15855] [3.4/4.0 Regression] g++ crash with -O2and -O3 on input file


Here's a nice little 15% compile time improvement when checking is
enabled for this testcase./

I'm always amazed how how expensive certain primitive operations get in
our checking code.  And this is no exception.

The testcode for pr15855 is spending insane amounts of time doing alias
verification.  I suspect a large part of the underlying problem is that
we're creating way too many SSA_NAMEs for a couple routines (we're
creating roughly 2-3 million then deleting about half of them -- which
is somehow related to the may-alias code).

Regardless, creating all those SSA_NAMEs is useful in that it's exposing
some lameness elsewhere.

For example in verify_ssa_flow_sensitive_aliases we burn an _amazing_
amount of time getting variable annotations.  That's right, getting
(*&@#$ variable annotations.

Worse yet, the vast majority of the time we never even look at the
annotations we retrieved because the variables aren't pointers or
for some other reason.

How much time?  Try nearly 20 out of 140 seconds of compilation time.
(yes, that's with an optimized, non-profiled compiler).  Yes, nearly
15% of or compilation time spent getting variable annotations for 
variables we don't care about.

Delaying retrieval of the pointer information, swapping two of the
tests for continuing the loop early shave another second or so off
the compilation time.  

Bootstrapped and regression tested on i686-pc-linux-gnu.

Attachment: PPP
Description: Text document


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