This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: cache uses_template_parms in tree node?
- From: "Giovanni Bajo" <giovannibajo at libero dot it>
- To: "Richard Guenther" <rguenth at tat dot physik dot uni-tuebingen dot de>,<gcc at gcc dot gnu dot org>
- Cc: "Mark Mitchell" <mark at codesourcery dot com>,"Jan Hubicka" <jh at suse dot cz>
- Date: Thu, 22 Jan 2004 14:12:35 +0100
- Subject: Re: cache uses_template_parms in tree node?
- References: <Pine.LNX.4.53.0401221132190.14384@bellatrix.tat.physik.uni-tuebingen.de>
Richard Guenther wrote:
> To address the for_each_template_parm() performance problem, would it
> be possible to cache the outcome of uses_template_parms() in the tree
> node? Or would this caching somehow be invalidated later?
> Just before I start digging into gcc tree's and its wonders :/
To me, the right solution is to get rid of uses_template_parms() altogether. We
can check for type/value dependness instead (we already have functions for
that, and we even cache the outcome in the tree as you are suggesting), so it's
just a matter of removing the old code.
I asked Honza to provide me with some numbers about which calls to
uses_template_parms are the ones most important from a compile-time point of
view. I'm willing to look into this when I get the numbers.
Giovanni Bajo