diff options
author | Richard Henderson <rth@cygnus.com> | 1999-09-05 09:08:20 -0700 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-09-05 16:08:20 +0000 |
commit | a3770a813002ceaedfe097ea46c8ddc09b9c289c (patch) | |
tree | 53f583f3f8569b93ca268331c1f771e401b63045 /gcc/toplev.c | |
parent | 616aeddaa175d5e70417df682d41ce8370bdeab2 (diff) | |
download | gcc-a3770a813002ceaedfe097ea46c8ddc09b9c289c.zip gcc-a3770a813002ceaedfe097ea46c8ddc09b9c289c.tar.gz gcc-a3770a813002ceaedfe097ea46c8ddc09b9c289c.tar.bz2 |
Makefile.in (ggc-simple.o): Depend on varray.h.
* Makefile.in (ggc-simple.o): Depend on varray.h.
(rtl.o): Depend on ggc.h.
(genattrtab.o): Depend on ggc.h.
(print-tree.o): Likewise.
(fold-const.o): Likewise.
* emit-rtl.c (sequence_element_free_list): Remove, and all references.
(make_insn_raw): Don't cache insns when GC'ing.
(emit_insn_before): Likewise.
(emit_insn_after): Likewise.
(emit_insn): Likewise.
(start_sequence): Use xmalloc to allocate the sequence_stack.
(end_sequence): Add free to free it.
(gen_sequence): Don't cache insns when GC'ing.
(clear_emit_caches): Don't use sequence_element_free_list.
(init_emit): Use xcalloc, not xmalloc+bzero.
* fold-const.c (size_int_wide): Kill the cache, when GC'ing.
* function.c (pop_function_context_from): Use free to free the
fixup_var_refs_queue.
(put_reg_into_stack): Allocate it with xmalloc.
* genattrtab.c: Include ggc.h.
(operate_exp): Don't use obstack_free when GC'ing.
(simplify_cond): Likewise.
(simplify_text_exp): Likewise.
(optimize_attrs): Likewise.
* gengentrtl.c (gendef): Use ggc_alloc_rtx to allocate RTL, when
GC'ing.
(gencode): Generate a #include for ggc.h.
* ggc-callbacks.c (ggc_p): Define it to zero.
* ggc-none.c (ggc_p): Likewise.
* ggc-simple.c: Include varray.h.
(ggc_mark_tree_varray): New function.
(ggc_add_tree_varray_root): Likewise.
(ggc_mark_tree_varray_ptr): Likewise.
* ggc.h (ggc_p): Declare.
(varray_head_tag): Likewise.
(ggc_add_tree_varray_root): Declare.
* print-tree.c (print_node): Don't check for TREE_PERMANENT
inconsistencies when GC'ing.
* rtl.c: Include ggc.h.
(rtvec_alloc): Use ggc_alloc_rtvec when GC'ing.
(rtx_alloc): Use ggc_alloc_rtx when GC'ing.
(rtx_free): Don't call obstack_free when GC'ing.
* toplev.c (rest_of_compilation): Call ggc_collect after every
pass, if GC'ing.
* tree.c (push_obstacks): Do nothing, if GC'ing.
(pop_obstacks_nochange): Likewise.
(pop_obstacks): Likewise.
(make_node): Use ggc_alloc_tree when GC'ing.
(copy_node): Likewise.
(get_identifier): Use ggc_alloc_string when GC'ing.
(build_string): Likewise.
(make_tree_vec): Use ggc_alloc_tree when GC'ing.
(tree_cons): Likewise.
(build1): Likewise.
(type_hash_canon): Don't call obstack_free when GC'ing.
Co-Authored-By: Bernd Schmidt <bernds@cygnus.co.uk>
Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r29125
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index becdfe0..ca95121 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -3801,6 +3801,9 @@ rest_of_compilation (decl) if (jump_opt_dump) dump_rtl (".jump", decl, print_rtl, insns); + if (ggc_p) + ggc_collect (); + /* Perform common subexpression elimination. Nonzero value from `cse_main' means that jumps were simplified and some code may now be unreachable, so do @@ -3846,6 +3849,9 @@ rest_of_compilation (decl) print_rtl_graph_with_bb (dump_base_name, ".addressof", insns); } + if (ggc_p) + ggc_collect (); + /* Perform global cse. */ if (optimize > 0 && flag_gcse) @@ -3870,6 +3876,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".gcse", insns); } + + if (ggc_p) + ggc_collect (); } /* Move constant computations out of loops. */ @@ -3909,6 +3918,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".loop", insns); } + + if (ggc_p) + ggc_collect (); } if (optimize > 0) @@ -3953,6 +3965,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".cse2", insns); } + + if (ggc_p) + ggc_collect (); } if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities) @@ -3972,6 +3987,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".bp", insns); } + + if (ggc_p) + ggc_collect (); } /* We are no longer anticipating cse in this function, at least. */ @@ -4030,6 +4048,9 @@ rest_of_compilation (decl) print_rtl_graph_with_bb (dump_base_name, ".flow", insns); } + if (ggc_p) + ggc_collect (); + /* The first life analysis pass has finished. From now on we can not generate any new pseudos. */ no_new_pseudos = 1; @@ -4048,6 +4069,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".combine", insns); } + + if (ggc_p) + ggc_collect (); } /* Register allocation pre-pass, to reduce number of moves @@ -4066,6 +4090,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".regmove", insns); } + + if (ggc_p) + ggc_collect (); } /* Print function header into sched dump now @@ -4089,6 +4116,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".sched", insns); } + + if (ggc_p) + ggc_collect (); } /* Determine if the current function is a leaf before running reload @@ -4126,6 +4156,9 @@ rest_of_compilation (decl) print_rtl_graph_with_bb (dump_base_name, ".lreg", insns); } + if (ggc_p) + ggc_collect (); + if (global_reg_dump) open_dump_file (".greg", decl_printable_name (decl, 2)); @@ -4145,6 +4178,9 @@ rest_of_compilation (decl) if (failure) goto exit_rest_of_compilation; + if (ggc_p) + ggc_collect (); + /* Do a very simple CSE pass over just the hard registers. */ if (optimize > 0) reload_cse_regs (insns); @@ -4203,6 +4239,9 @@ rest_of_compilation (decl) find_basic_blocks (insns, max_reg_num (), rtl_dump_file, 1); life_analysis (insns, max_reg_num (), rtl_dump_file, 1); }); + + if (ggc_p) + ggc_collect (); } flow2_completed = 1; @@ -4256,6 +4295,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".sched2", insns); } + + if (ggc_p) + ggc_collect (); } #ifdef LEAF_REGISTERS @@ -4297,6 +4339,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".mach", insns); } + + if (ggc_p) + ggc_collect (); #endif /* If a scheduling pass for delayed branches is to be done, @@ -4317,6 +4362,9 @@ rest_of_compilation (decl) print_rtl_graph_with_bb (dump_base_name, ".dbr", insns); } } + + if (ggc_p) + ggc_collect (); #endif /* Shorten branches. */ @@ -4337,6 +4385,9 @@ rest_of_compilation (decl) if (graph_dump_format != no_graph) print_rtl_graph_with_bb (dump_base_name, ".stack", insns); } + + if (ggc_p) + ggc_collect (); #endif /* Now turn the rtl into assembler code. */ @@ -4373,6 +4424,9 @@ rest_of_compilation (decl) regset_release_memory (); }); + if (ggc_p) + ggc_collect (); + /* Write DBX symbols if requested */ /* Note that for those inline functions where we don't initially @@ -4458,6 +4512,10 @@ rest_of_compilation (decl) if (! DECL_DEFER_OUTPUT (decl)) free_after_compilation (current_function); + current_function = 0; + + ggc_collect (); + /* The parsing time is all the time spent in yyparse *except* what is spent in this function. */ |