This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Example program takes 2000 times as long to compile underC++ as C
- To: zack at wolery dot cumb dot org
- Subject: Re: Example program takes 2000 times as long to compile underC++ as C
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Mon, 04 Sep 2000 15:26:46 -0700
- Cc: kelleycook at attglobal dot net, gcc-bugs at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <20000830162923.H13918@wolery.cumb.org><20000831105514D.mitchell@codesourcery.com><20000904120724.D295@wolery.cumb.org>
>>>>> "Zack" == Zack Weinberg <zack@wolery.cumb.org> writes:
Zack> I see no alternative at this point but to do something like
Zack> what verify_stmt_tree does in order to prevent visiting
Zack> nodes more than once (it remembers every node in a hash
Zack> table). But I thought I'd ask you if there were something
Zack> obviously wrong with the tree structure. Should we be
Zack> visiting that SAVE_EXPR so very many times?
Well, it depends what you mean. SAVE_EXPRs are supposed to appear in
tree structure several times over, and that's part of why I think they
are evil. I'm not quite sure why we'd get there *that* many times,
and I think we should understand that better.
In this particular case, it looks like we are creating a lot more
SAVE_EXPRs than we need to; there's nothing about that function that
should require any SAVE_EXPRs, really. (There's nothing about what
you showed that has any side-effects.) So, I bet that in this case,
there is an easy fix. Send me the complete source code for a pared
down test-case; I promise to look at it today.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com