C compile time
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Wed Jun 18 13:08:00 GMT 2003
>> > Yes -- you recently mentioned that Mark had some ideas about C++
>> > unit-at-a-time. Could you tell a bit more about that?
>>
>> Mark does not like my current approach. C++ frontend currently contain
>> loop that does iterate over all known functions, virtual tables and
>> static data and outputs one only when it has been already assembled
>> reference to. (the templates instantiations and virtual tables are
>> created lazilly when needed)
>>
>> I modified it to walk the function bodies to discover what static
>> initializers and templates are needed so I don't need to actually
>> assemble to see what is needed, but Mark would preffer approach that
>> expands everything available and then removes dead objects.
>>
>> That means that I need to extend unit-at-a-time first to deal with data
>> structures as well (so one can cancel data structure from being output
>> when it is already expanded) and doing so also brings memory
explission.
>> Mark thinks we should reduce memory overhead of the frontend first this
>> is bit more involved change that I feel I am able to do in C++ frontend
>> in 3.4 horizont.
>
>Note that we also discussed an "in the middle" sollution that actually
>expands all functions but delay expansion of the virtual tables and
>examines what are needed. I am trying to implement it but at the moment
>it looks even uglyer than the original and it slows libstdc++
>compilation down noticeably (12%) apparently due to extra expansion and
>memory overhead, I will try to cut this down somewhat.
>
>The expansion loop in C++ as currently written is really twisted and all
>my approaches to get unit-at-a-time in makes it even worse :(((
Note that I consider not having unit-at-a-time for C++ for 3.4 as a
showstopper as it is possibly the only way to get sane inlining and
such sane performance out of scientific C++ codes like POOMA.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
More information about the Gcc
mailing list