This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fdump-translation-unit considered harmful
- From: <peter dot kourzanov at xs4all dot nl>
- To: Stefan Strasser <sstrasser at systemhaus-gruppe dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 22 Dec 2004 16:55:04 +0100
- Subject: Re: -fdump-translation-unit considered harmful
- References: <41C5E5FA.1020708@aaronwl.com> <20041220093503.B1657@synopsys.com> <41C75433.2040404@xs4all.nl> <41C76E28.2060302@systemhaus-gruppe.de> <41C7EC6E.1090306@xs4all.nl> <41C82441.8040505@systemhaus-gruppe.de> <41C8256B.3010407@xs4all.nl> <41C82C94.3090304@systemhaus-gruppe.de> <41C83465.6060103@xs4all.nl> <41C9249B.3060503@systemhaus-gruppe.de>
Stefan,
OK, great. Would you release the code itself when its stable?
I've just tried optimising my AWK script a bit. Here are the
results on tcp_input.c from Linux 2.4.26 (a rather complex piece of
networking code of 120806 bytes):
gcc-3.3 -fdump-translation-unit -c tcp_input.c -D__KERNEL__ -I/usr/src/linux-2.4.26/include
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
-fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2
-march=i686 -nostdinc -iwithprefix include
(options required by Linux kernel)
generated a .tu file of 8504511 bytes which took about 23 seconds
(real-time) to re-parse (a C representation is re-generated).
I am really curious what mileage will be for a binary gcc tree
interface (e.g., c++ model) for this code.
Pjotr Kourzanov
On Wed, Dec 22, 2004 at 08:39:07AM +0100, Stefan Strasser wrote:
> I've just parsed the model.h I sent you itself into the Model defined in
> model.h. now THAT'S cool ;-)
>
> worked. including its headers. (still ignoring templates).
> the .tu file(you know, the output of -fdump-translation-unit), for this
> is 6 MB. memory consumption isn't really noticeable. might be different
> for large function bodies but we'll see.
>
> I'm downloading libxml :)
>