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: RFC: cache uses_template_parms in tree node?


Richard Guenther wrote:

Hi!

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?

The right approach, as I've said before, is simply not to *use* for_each_template_parm.


It should be unncessary; the right approach should be to use type_dependent_p and its friends.

That's not a trivial change, but it's the right change.

There might be a very few places where for_each_template_parm would still be necessary -- but they will not be anything that should up on the profile.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


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