This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Apple's implementation of precompiled headers
- To: dewar at gnat dot com
- Subject: Re: Apple's implementation of precompiled headers
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: Sat, 29 Sep 2001 14:02:10 -0400
- Cc: dan at cgsoftware dot com, degger at fhm dot edu, gcc at gcc dot gnu dot org,shebs at apple dot com
- References: <20010929161032.663A3F2BA0@nile.gnat.com>
dewar@gnat.com writes:
> <<In actuality, it's not.
> This is because expansion to rtl gets counted in the parse cost, and
> it's expensive.
> With precomp'd headers as serialized trees, you don't need to
> re-expand (assuming you serialize DECL_RTL as well).
> >>
>
> Of course you do not need to convert declarations to rtl unless they are
> used, i.e. you can do it on demand, that's what we do with Ada specs, the
> declarations are converted to rtl on demand (at least that's my understanding
> of what we do, it is not the area of GNAT I know well, and if we are not
> doing it we should be doing it :-)
Right, it's done on demand, but still done.
You can expand them and save it in the precomp, and then not have to
reexpand them at compile time, on demand.
You can acually even save the asm output, and just reoutput it.
This is what redhat's precomp'd headers did, IIRC.
--Dan
--
"I went to the bank and asked to borrow a cup of money. They
said, "What for?" I said, "I'm going to buy some sugar."
"-Steven Wright