This is the mail archive of the gcc@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: C compile time


> > 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 :(((

Honza


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