This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs 1.1.1 extremely slow
>>>>> "Martin" == Martin v Loewis <martin@mira.isdn.cs.tu-berlin.de> writes:
Martin> * tree.c (ovl_identity_member): New function. *
Martin> cp-tree.h: Declare it. * decl2.c (add_function): Call it.
In my opinion, this is the wrong fix. Please just add:
if (newdecl == olddecl)
return 1;
at the top of decls_match. That avoids obscuring the purpose of the
code and introducing new functions, while still avoiding the needless
calls to `compparms', and will make all other callers of decls_match
go faster as well.
If you're worried about function call overhead, don't be. But, if
profiling shows that we should be later, we can always rename
decls_match to decls_match_f and #define decls_match to check identity
before calling the function.
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com