100x -O0 Compile Time Regression {3.2,3.3} -> {3.4,3.5}

Gabriel Dos Reis gdr@integrable-solutions.net
Fri Feb 13 20:17:00 GMT 2004


Jan Hubicka <hubicka@ucw.cz> writes:

| > This looks like you get a lot of swapping.  I have patch to get some
| > statistics about who is allocating the memory, so please just forward
| > preprocessed file to my address and i will try it out, perhaps I will be
| > lucky :)
| OK, 50% of memory seems to be consumed here:
| 
| cp/name-lookup.c:2800 (push_class_level_binding)                7273413 145468260          0:47.911%      21740:0.064%

I have some ideas here:  Each time we enter a class-scope (which we do
often, more often than you might think), we calculate the class-scope
bindings and forget about it when we leave it (we only cache the most
recent, "toplevel" clas-scope).  That computation goes through
cp/search.c which in turns calls push_class_level_binding() as
frequently as possible.  

Ideally, we should -permanently- store that class-scope binding matrix
and not recompute it over and over.  Similarly, we should unify the
various name lookup codes and minimize (if not get rid of)
push-to-toplevel.  Those are quite frequent when you do lots of
instantiations.

-- Gaby



More information about the Gcc mailing list