diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-16 18:33:23 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-16 18:33:23 +0000 |
commit | c849df63447c7b03c27d991e60a26e9b98b57013 (patch) | |
tree | c61dabe0ee2f12a433921e41d3b1799e3b26b2f5 /gcc/ggc-common.c | |
parent | 7d89a8eb42b1ab1ce5a769e32eec2e0a4eefc081 (diff) | |
download | gcc-c849df63447c7b03c27d991e60a26e9b98b57013.tar.gz |
Index: gcc/ChangeLog
2002-09-12 Geoffrey Keating <geoffk@apple.com>
* ggc-common.c (ggc_mark_rtx_children_1): Update for changed name
mangling.
The following changes are merged from pch-branch:
* doc/gty.texi (GTY Options): Document %a.
* gengtype.c (do_scalar_typedef): New function.
(process_gc_options): Handle `length' option.
(set_gc_used_type): A pointer to an array of structures doesn't
qualify as a pointer to a structure.
(output_escaped_param): Add `%a' escape.
(write_gc_structure_fields): Allow 'desc' on array of unions.
(main): Define `uint8', `jword' and `JCF_u2' as scalars; use
do_scalar_typedef.
* gengtype.c (enum rtx_code): Make global.
(rtx_format): Make global.
(rtx_next): New.
(gen_rtx_next): New.
(write_rtx_next): New.
(adjust_field_rtx_def): Skip fields marked by chain_next.
(open_base_files): Delete redundant prototype.
(write_enum_defn): New.
(output_mangled_typename): Correct abort call.
(write_gc_marker_routine_for_structure): Handle chain_next and
chain_prev options.
(finish_root_table): Don't output redundant \n.
(main): Call gen_rtx_next, write_rtx_next, write_enum_defn.
* c-tree.h (union lang_tree_node): Add chain_next option.
* gengtype.h (NUM_PARAM): New definition.
(struct type): For TYPE_PARAM_STRUCT, allow multiple parameters.
* gengtype.c (find_param_structure): New.
(adjust_field_type): Handle param<n>_is option.
(process_gc_options): Detect use_params option. Update callers.
(set_gc_used_type): Add 'param' parameter, update callers. Handle
'use_params' option.
(open_base_files): Add splay-tree.h to list of files included.
(output_mangled_typename): New.
(write_gc_structure_fields): Update 'param' parameter to support
multiple parameters. Change name mangling. Allow parameterized
fields to have an apparent scalar type. Handle param<n>_is options,
use_param option.
(write_gc_marker_routine_for_structure): Update for change to name
mangling. Better guess the output file for parameterized types.
(write_gc_types): Update for change to name mangling.
(write_gc_root): Update for change to name mangling. Handle (ignore)
param<n>_is options.
* doc/gty.texi (GTY Options): Add description of param<n>_is
options, use_params option.
* ggc.h (ggc_mark_rtx): Update for changed name mangling.
* gengtype-lex.l: Produce token for param<n>_is.
* gengtype-yacc.y: Parse param<n>_is.
* gengtype.c (adjust_field_tree_exp): Don't name a variable 'rindex'.
* rtl.c: Update comment describing rtx_format.
* rtl.h (union rtunion): Separate definition and typedef.
(struct rtx_def): Use gengtype to mark.
* Makefile.in (gengtype.o): Also depend on rtl.def.
* ggc.h (ggc_mark_rtx_children): Delete prototype.
(ggc_mark_rtx): Change to alias of gengtype-generated routine.
* ggc-common.c (ggc_mark_rtx_children): Delete.
(ggc_mark_rtx_children_1): Delete.
(gt_ggc_m_rtx_def): Delete.
* gengtype.c (adjust_field_rtx_def): New.
(adjust_field_type): Call adjust_field_rtx_def.
(write_gc_structure_fields): Add 'default' case to switch if none
is specified; remove unused code.
* tree.h (struct tree_exp): Update for change to meaning
of special.
* gengtype.c (adjust_field_tree_exp): New function.
(adjust_field_type): Handle `tree_exp' special here.
(write_gc_structure_fields): Don't handle `tree_exp' special here.
Handle new `dot' option.
* gengtype.h: Make `info' a pointer-to-const.
* gengtype-yacc.y (yacc_ids): Use xasprintf.
* gengtype.c (write_gc_structure_fields): Remove implementation
of `always' option, add `default' option.
* doc/gty.texi (GTY Options): Remove documentation of `always',
add `default'.
Index: gcc/cp/ChangeLog
2002-09-12 Geoffrey Keating <geoffk@apple.com>
* cp-tree.h (union lang_tree_node): Add chain_next option.
Index: gcc/f/ChangeLog
2002-09-12 Geoffrey Keating <geoffk@apple.com>
* com.c (union lang_tree_node): Add chain_next option.
Index: gcc/java/ChangeLog
2002-09-12 Geoffrey Keating <geoffk@apple.com>
* java-tree.h (union lang_tree_node): Add chain_next option.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57206 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ggc-common.c')
-rw-r--r-- | gcc/ggc-common.c | 135 |
1 files changed, 0 insertions, 135 deletions
diff --git a/gcc/ggc-common.c b/gcc/ggc-common.c index dcff4614001..2674cec52a1 100644 --- a/gcc/ggc-common.c +++ b/gcc/ggc-common.c @@ -34,7 +34,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA /* Statistics about the allocation. */ static ggc_statistics *ggc_stats; -static void ggc_mark_rtx_children_1 PARAMS ((rtx)); static int ggc_htab_delete PARAMS ((void **, void *)); /* Maintain global roots that are preserved during GC. */ @@ -132,140 +131,6 @@ ggc_mark_roots () htab_traverse (*cti->base, ggc_htab_delete, (PTR) cti); } -/* R had not been previously marked, but has now been marked via - ggc_set_mark. Now recurse and process the children. */ - -void -ggc_mark_rtx_children (r) - rtx r; -{ - rtx i, last; - - /* Special case the instruction chain. This is a data structure whose - chain length is potentially unbounded, and which contain references - within the chain (e.g. label_ref and insn_list). If do nothing here, - we risk blowing the stack recursing through a long chain of insns. - - Combat this by marking all of the instructions in the chain before - marking the contents of those instructions. */ - - switch (GET_CODE (r)) - { - case INSN: - case JUMP_INSN: - case CALL_INSN: - case NOTE: - case CODE_LABEL: - case BARRIER: - for (i = NEXT_INSN (r); ; i = NEXT_INSN (i)) - if (! ggc_test_and_set_mark (i)) - break; - last = i; - - for (i = NEXT_INSN (r); i != last; i = NEXT_INSN (i)) - ggc_mark_rtx_children_1 (i); - - default: - break; - } - - ggc_mark_rtx_children_1 (r); -} - -static void -ggc_mark_rtx_children_1 (r) - rtx r; -{ - const char *fmt; - int i; - rtx next_rtx; - - do - { - enum rtx_code code = GET_CODE (r); - /* This gets set to a child rtx to eliminate tail recursion. */ - next_rtx = NULL; - - /* Collect statistics, if appropriate. */ - if (ggc_stats) - { - ++ggc_stats->num_rtxs[(int) code]; - ggc_stats->size_rtxs[(int) code] += ggc_get_size (r); - } - - /* ??? If (some of) these are really pass-dependent info, do we - have any right poking our noses in? */ - switch (code) - { - case MEM: - gt_ggc_m_mem_attrs (MEM_ATTRS (r)); - break; - case JUMP_INSN: - ggc_mark_rtx (JUMP_LABEL (r)); - break; - case CODE_LABEL: - ggc_mark_rtx (LABEL_REFS (r)); - break; - case LABEL_REF: - ggc_mark_rtx (LABEL_NEXTREF (r)); - ggc_mark_rtx (CONTAINING_INSN (r)); - break; - case ADDRESSOF: - ggc_mark_tree (ADDRESSOF_DECL (r)); - break; - case NOTE: - switch (NOTE_LINE_NUMBER (r)) - { - case NOTE_INSN_EXPECTED_VALUE: - ggc_mark_rtx (NOTE_EXPECTED_VALUE (r)); - break; - - case NOTE_INSN_BLOCK_BEG: - case NOTE_INSN_BLOCK_END: - ggc_mark_tree (NOTE_BLOCK (r)); - break; - - default: - break; - } - break; - - default: - break; - } - - for (fmt = GET_RTX_FORMAT (GET_CODE (r)), i = 0; *fmt ; ++fmt, ++i) - { - rtx exp; - switch (*fmt) - { - case 'e': case 'u': - exp = XEXP (r, i); - if (ggc_test_and_set_mark (exp)) - { - if (next_rtx == NULL) - next_rtx = exp; - else - ggc_mark_rtx_children (exp); - } - break; - case 'V': case 'E': - gt_ggc_m_rtvec_def (XVEC (r, i)); - break; - } - } - } - while ((r = next_rtx) != NULL); -} - -/* Various adaptor functions. */ -void -gt_ggc_mx_rtx_def (x) - void *x; -{ - ggc_mark_rtx((rtx)x); -} - /* Allocate a block of memory, then clear it. */ void * ggc_alloc_cleared (size) |