This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH] Add chain_next GTY markup to struct tinst_level
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 8 Jun 2011 19:33:49 +0200
- Subject: [C++ PATCH] Add chain_next GTY markup to struct tinst_level
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
We shouldn't recurse in GC to mark tinst_level chain,
it is IMHO better to iterate through the chain instead.
Bootstrapped/regtested on x86_64-linux and i686-linux,
ok for trunk?
2011-06-08 Jakub Jelinek <jakub@redhat.com>
* cp-tree.h (struct tinst_level): Add chain_next GTY
markup.
--- gcc/cp/cp-tree.h.jj 2011-05-31 08:03:00.000000000 +0200
+++ gcc/cp/cp-tree.h 2011-06-08 16:31:28.000000000 +0200
@@ -4635,7 +4635,7 @@ struct cp_declarator {
};
/* A level of template instantiation. */
-struct GTY(()) tinst_level {
+struct GTY((chain_next ("%h.next"))) tinst_level {
/* The immediately deeper level in the chain. */
struct tinst_level *next;
Jakub