aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2004-01-14 12:34:37 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2004-01-14 11:34:37 +0000
commit7ec4deda8c738f51d932691a309a1d583a8cf854 (patch)
tree967fdd80eba25a7f59d1edc4bd60ba35317d1479
parent4d774ff8d544c14945c611d1f1bde6f8ceafb509 (diff)
downloadgcc-7ec4deda8c738f51d932691a309a1d583a8cf854.zip
gcc-7ec4deda8c738f51d932691a309a1d583a8cf854.tar.gz
gcc-7ec4deda8c738f51d932691a309a1d583a8cf854.tar.bz2
re PR c++/12850 (memory consumption for heavy template instantiations tripled since 3.3)
PR c++/12850 * pt.c (instantiate_decl): Do not increase function_depth. From-SVN: r75859
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/pt.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a538bf8..219f316 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-14 Jan Hubicka <jh@suse.cz>
+
+ PR c++/12850
+ * pt.c (instantiate_decl): Do not increase function_depth.
+
2004-01-14 Danny Smith <dannysmith@users,sourceforge.net>
PR c++/9021
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index cf73ea1..faaeaa2 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -10881,11 +10881,6 @@ instantiate_decl (tree d, int defer_ok)
/* We may be in the middle of deferred access check. Disable it now. */
push_deferring_access_checks (dk_no_deferred);
- /* Our caller does not expect collection to happen, which it might if
- we decide to compile the function to rtl now. Arrange for a new
- gc context to be created if so. */
- function_depth++;
-
/* Set TD to the template whose DECL_TEMPLATE_RESULT is the pattern
for the instantiation. */
td = template_for_substitution (d);
@@ -11129,7 +11124,6 @@ out:
input_location = saved_loc;
pop_deferring_access_checks ();
pop_tinst_level ();
- function_depth--;
timevar_pop (TV_PARSE);