This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Extending functionality of -frepo
- From: "Noe Aljaz ITICMN" <noe at iskratel dot si>
- To: <gcc at gcc dot gnu dot org>
- Date: Thu, 8 Sep 2005 14:47:38 +0200
- Subject: RE: Extending functionality of -frepo
> > Even when using precompiled headers, .pch files can get pretty big,
> > and they must still be loaded,
>
> They do? Odd, on my platform, we only mmap them. If one
> doesn't touch them (and nothing else near them), they aren't
> loaded for me.
>
> > which takes time.
>
> mmap is fairly quick (as compared to compilation speed).
I didn't know that. Thanks for the explanation. Otherwise I am
deliberately using cygwin for testing, so that any speed-up or slowdown
is more easily observed. Obviously cygwin doesn't implement mmap very
efficiently since big pchs actually slow things down.
> > The main question I guess is: How difficult is to implement this -
> > frepo2 functionality?
>
> Trivial enough, if you want to try it, assuming you want to
> put the #ifndef NO_TEMPLATE_INSTANTIATION into your code manually.
This was the assumption from the start. Basically I want the .h file to
tell the compiler: "This is my template and here (within #ifdef
NO_TEMPLATE_INSTANTIATION) you can find the definitions required to
instantiate it." The -frepo2 switch would then translate to: "Please
ignore all template definitions as long as you can." (i.e. until the
linking stage).
> > If it is relatively simple and a patch is made, we can test all we
> > want and then decide whether it is worth having it in the
> > compiler or not.
>
> Feel free to do this if you want. I think we should be able
> to provide enough hints and pointers to allow you to complete
> the code.
I'll start poking around the code and see what I come up with. Is there
a tutorial (or HOWTO) for new gcc compiler writer wannabes?