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.
Mark,
do you think such a change is possible for 3.4 GCC? If not what would
you recommend to do for the release branch? The for_each_template_parm
seems to be really one of the major CPU cycle consumers when it come to
C++ compilation and it would be shame to leave it that way for the
release.