This is the mail archive of the gcc-bugs@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]

[Bug c++/70847] [6/7 Regression] exponential time in cp_fold for chained virtual function calls


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70847

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, the patch has been successfully bootstrapped/regtested on x86_64-linux
and i686-linux.

I don't think such shared trees should be occurring significantly that it would
matter.
But, if you want to handle those, your change makes no sense, because if
cp_fold returns something other than its argument unmodified, then the
subsequent subtree walking happens on the new tree, not the old one, but you
stop the walking of the subtrees the second time.

Another option would be to only special case SAVE_EXPR and TARGET_EXPR, use
*walk_subtrees = 0; for it if it is already in the cache.

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