This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH] Rewrite convert_nontype_argument
- From: Roger Sayle <roger at eyesopen dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Zack Weinberg <zack at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, Giovanni Bajo <giovannibajo at libero dot it>, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 20 Jul 2004 19:36:44 -0600 (MDT)
- Subject: Re: [C++ PATCH] Rewrite convert_nontype_argument
On Tue, 20 Jul 2004, Mark Mitchell wrote:
> Could well be. I do think someone should measure first, though. There
> look to be some code paths through fold_convert that involve making
> calls back to types_compatible_p, which has been showing up in my
> profiling as not insignificant.
Interestingly, the call to types_compatible_p in fold_convert is
just a temporary work-around for a bug in the C++ front-end:
http://gcc.gnu.org/ml/gcc-patches/2004-06/msg01237.html
My hope is that once pointer member functions are given the correct
TYPE_MAIN_VARIANT, that this call can be removed. The optimizations
performed by this point in the middle-end should be independent of the
front-end's type system. Indeed this was one of the motivations of
a middle-end fold_convert that was independent of "convert".
Roger
--