diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-05 16:08:20 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-05 16:08:20 +0000 |
commit | 1bfd55c5832c63621f3f1eac29139cd28f3d17e5 (patch) | |
tree | 53f583f3f8569b93ca268331c1f771e401b63045 /gcc/genattrtab.c | |
parent | 68e99b40dd8701fe7d675acb9cdff108e5ad630a (diff) | |
download | gcc-1bfd55c5832c63621f3f1eac29139cd28f3d17e5.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29125 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genattrtab.c')
-rw-r--r-- | gcc/genattrtab.c | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index a958025cb2b..254f78c2459 100644 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -99,6 +99,7 @@ Boston, MA 02111-1307, USA. */ #include "system.h" #include "rtl.h" #include "insn-config.h" /* For REGISTER_CONSTRAINTS */ +#include "ggc.h" #ifdef HAVE_SYS_RESOURCE_H # include <sys/resource.h> @@ -1726,7 +1727,8 @@ operate_exp (op, left, right) give the same value), optimize it away. */ if (allsame) { - obstack_free (rtl_obstack, newexp); + if (!ggc_p) + obstack_free (rtl_obstack, newexp); return operate_exp (op, left, XEXP (right, 1)); } @@ -1734,7 +1736,8 @@ operate_exp (op, left, right) just use that. */ if (rtx_equal_p (newexp, right)) { - obstack_free (rtl_obstack, newexp); + if (!ggc_p) + obstack_free (rtl_obstack, newexp); return right; } @@ -1783,7 +1786,8 @@ operate_exp (op, left, right) optimize it away. */ if (allsame) { - obstack_free (rtl_obstack, newexp); + if (!ggc_p) + obstack_free (rtl_obstack, newexp); return operate_exp (op, XEXP (left, 1), right); } @@ -1791,7 +1795,8 @@ operate_exp (op, left, right) just use that. */ if (rtx_equal_p (newexp, left)) { - obstack_free (rtl_obstack, newexp); + if (!ggc_p) + obstack_free (rtl_obstack, newexp); return left; } @@ -2609,14 +2614,16 @@ simplify_cond (exp, insn_code, insn_index) if (len == 0) { - obstack_free (rtl_obstack, first_spacer); + if (!ggc_p) + obstack_free (rtl_obstack, first_spacer); if (GET_CODE (defval) == COND) return simplify_cond (defval, insn_code, insn_index); return defval; } else if (allsame) { - obstack_free (rtl_obstack, first_spacer); + if (!ggc_p) + obstack_free (rtl_obstack, first_spacer); return exp; } else @@ -3146,14 +3153,16 @@ simplify_test_exp (exp, insn_code, insn_index) SIMPLIFY_ALTERNATIVE (left); if (left == false_rtx) { - obstack_free (rtl_obstack, spacer); + if (!ggc_p) + obstack_free (rtl_obstack, spacer); return false_rtx; } right = SIMPLIFY_TEST_EXP (XEXP (exp, 1), insn_code, insn_index); SIMPLIFY_ALTERNATIVE (right); if (left == false_rtx) { - obstack_free (rtl_obstack, spacer); + if (!ggc_p) + obstack_free (rtl_obstack, spacer); return false_rtx; } @@ -3185,7 +3194,8 @@ simplify_test_exp (exp, insn_code, insn_index) if (left == false_rtx || right == false_rtx) { - obstack_free (rtl_obstack, spacer); + if (!ggc_p) + obstack_free (rtl_obstack, spacer); return false_rtx; } else if (left == true_rtx) @@ -3244,14 +3254,16 @@ simplify_test_exp (exp, insn_code, insn_index) SIMPLIFY_ALTERNATIVE (left); if (left == true_rtx) { - obstack_free (rtl_obstack, spacer); + if (!ggc_p) + obstack_free (rtl_obstack, spacer); return true_rtx; } right = SIMPLIFY_TEST_EXP (XEXP (exp, 1), insn_code, insn_index); SIMPLIFY_ALTERNATIVE (right); if (right == true_rtx) { - obstack_free (rtl_obstack, spacer); + if (!ggc_p) + obstack_free (rtl_obstack, spacer); return true_rtx; } @@ -3261,7 +3273,8 @@ simplify_test_exp (exp, insn_code, insn_index) if (right == true_rtx || left == true_rtx) { - obstack_free (rtl_obstack, spacer); + if (!ggc_p) + obstack_free (rtl_obstack, spacer); return true_rtx; } else if (left == false_rtx) @@ -3348,12 +3361,14 @@ simplify_test_exp (exp, insn_code, insn_index) if (left == false_rtx) { - obstack_free (rtl_obstack, spacer); + if (!ggc_p) + obstack_free (rtl_obstack, spacer); return true_rtx; } else if (left == true_rtx) { - obstack_free (rtl_obstack, spacer); + if (!ggc_p) + obstack_free (rtl_obstack, spacer); return false_rtx; } @@ -3515,7 +3530,8 @@ optimize_attrs () insert_insn_ent (av, ie); something_changed = 1; } - obstack_free (temp_obstack, spacer); + if (!ggc_p) + obstack_free (temp_obstack, spacer); } } } |