This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cache uses_template_parms in tree node?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]