1. 17 Jan, 2000 2 commits
    • Update copyrights · 9311a396
      From-SVN: r31465
      Kaveh Ghazi committed
    • ggc-common.c: PROTO -> PARAMS. · 3fe41456
              * ggc-common.c: PROTO -> PARAMS.
              * ggc-page.c: Likewise.
              * ggc-simple.c: Likewise.
              * ggc.h: Likewise.
              * global.c: Likewise.
              * graph.c: Likewise.
              * gthr-win32.h: Likewise.
              * haifa-sched.c: Likewise.
              * halfpic.h: Likewise.
              * integrate.c: Likewise.
              * integrate.h: Likewise.
              * jump.c: Likewise.
              * lcm.c: Likewise.
              * local-alloc.c: Likewise.
              * loop.c: Likewise.
              * loop.h: Likewise.
      
      From-SVN: r31458
      Kaveh R. Ghazi committed
  2. 01 Dec, 1999 1 commit
  3. 16 Nov, 1999 1 commit
  4. 29 Oct, 1999 1 commit
    • ggc.h (struct ggc_statistics): New type. · 3277221c
      	* ggc.h (struct ggc_statistics): New type.
      	(ggc_get_size): New function.
      	(ggc_print_statistics): Likewise.
      	* ggc-common.c (ggc_stats): New variable.
      	(ggc_mark_rtx_children): Keep statistics.
      	(ggc_mark_tree_children): Likewise.
      	(ggc_print_statistics): New function.
      	* ggc-page.c (struct globals): Add bytes_mapped field.
      	(alloc_anon): Update it.
      	(release_pages): Likewise.
      	(ggc_get_size): New function.
      	(ggc_page_print_statistics): New function.
      	* ggc-simple.c (ggc_get_size): New function.
      
      From-SVN: r30251
      Mark Mitchell committed
  5. 13 Oct, 1999 1 commit
  6. 11 Oct, 1999 1 commit
    • ggc.h (ggc_push_context): Fix comment. · 74c937ca
      	* ggc.h (ggc_push_context): Fix comment.
      	(ggc_pop_context): Likewise.
      	(mark_string_if_gcable): Likewise.
      	* ggc-common.c (ggc_mark_rtx_children): Use
      	ggc_mark_string_if_gcable.
      	* ggc-page.c (ggc_lookup_page_table): New function.
      	(ggc_allocated_p): Likewise.
      	(mark_obj): Fix formatting.
      	(ggc_mark_string_if_gcable): New function.
      	* ggc-simple.c (ggc_allocated_strings): New variable.
      	(ggc_strings_used): Likewise.
      	(ggc_compare_addresses): New function.
      	(ggc_pop_context): Pop the `any' memory too.
      	(ggc_mark_string_if_gcable): New function.
      	(ggc_collect): Initialize and tear down ggc_allocated_strings.
      
      From-SVN: r29897
      Mark Mitchell committed
  7. 22 Sep, 1999 1 commit
    • Various fixes for problems discovered stress-testing GC. · 21a427cc
      	* config/i386/i386.c (pic_label_name): Change to char pointer.
      	(global_offset_table): New variable.
      	(load_pic_register): Fill global_offset_table if it hasn't
      	already been done.  Allocate pic_label_name dynamically.
      	* ggc.h (empty_string): New variable.
      	* ggc-simple.c (empty_string): Likewise.
      	(init_ggc): Allocate empty_string and add as root.
      	* stmt.c (digit_strings): New variable.
      	(init_stmt): Add last_block_end_note as root.  Allocate and
      	initialize digit_strings.
      	(expand_asm_operands): Use empty_string and digit_string instead
      	of string constants.
      	* profile.c (init_arc_profiler): Allocate with ggc_alloc_string
      	instead of xmalloc.
      	(output_func_start_profiler): Likewise.
      	* c-typeck.c (digest_init): Check if init is error_mark_node.
      
      From-SVN: r29575
      Alex Samuel committed
  8. 16 Sep, 1999 2 commits
    • ggc.h (ggc_root): Move to ggc-common.c. · 96df4529
      Thu Sep 16 11:50:52 1999  Alex Samuel  <samuel@codesourcery.com>
      
              * ggc.h (ggc_root): Move to ggc-common.c.
              (roots): Remove.
              (ggc_mark_rtx, ggc_mark_tree): Change to macro.
              (ggc_mark_rtvec, ggc_mark_tree_varray): Declare extern.
              (ggc_mark_tree_hash_table, ggc_mark_string, ggc_mark): Likewise.
              (ggc_mark_roots, ggc_mark_rtx_children, ggc_mark_tree_children): New.
              * ggc-common.c (ggc_root): Move from ggc.h.
              (roots): Declare, static.
              (ggc_mark_rtx, ggc_mark_tree): Renamed to...
              (ggc_mark_rtx_children, ggc_mark_tree_children): Don't check for
              null or check/set mark bit.
              (ggc_mark_roots): New.
              * ggc-simple.c (ggc_collect): Call ggc_mark_roots.
      
      From-SVN: r29461
      Alex Samuel committed
    • emit-rtl.c (free_emit_status): Don't check DECL_DEFER_OUTPUT. · fa51b01b
              * emit-rtl.c (free_emit_status): Don't check DECL_DEFER_OUTPUT.
              Free the struct.
              (mark_emit_status): Renamed from mark_emit_state.
              * except.c (mark_eh_status): Renamed from mark_eh_state.
              Check not null before marking.
              (free_eh_status): New.
              * expr.c (mark_expr_status, free_expr_status): New.
              * function.c (free_machine_status): New.
              (free_after_parsing): New.
              (free_after_compilation): Move bits to free_after_parsing; call
              free_eh_status, free_expr_status; zero the marked members of the
              function state.
              (prepare_function_start): No can_garbage_collect.
              Call init_eh_for_function.
              (expand_dummy_function_end): Free up current_function state.
              (mark_function_status): Renamed from mark_function_state.
              (mark_function_chain): No can_garbage_collect.  Call mark_expr_status.
              * function.h (struct function): No can_garbage_collect.
              (free_machine_status, free_after_parsing): Declare.
              (free_eh_status, free_expr_status): Declare.
              * ggc.h (mark_expr_status): Declare.
              * stmt.c (free_stmt_status): Free the struct.
              (mark_stmt_status): Renamed from mark_stmt_state.
              (init_stmt): Don't call init_eh.
              (init_stmt_for_function): Don't call init_eh_for_function.
              * toplev.c (compile_file): Call init_eh.
              (rest_of_compilation): Free basic block info before ggc_collect.
              Call free_after_parsing; conditionally call free_after_compilation.
              * varasm.c (mark_varasm_status): Renamed from mark_varasm_state.
              Check not null before marking.
      
      From-SVN: r29448
      Richard Henderson committed
  9. 11 Sep, 1999 2 commits
    • Update copyright. · a611912f
      From-SVN: r29282
      Richard Henderson committed
    • Alex Samuel <samuel@codesourcery.com> · b49a6a90
              * ggc.h (rtvec_def): Forward declare.
              (tree_node): Likewise.
              (ggc_root): Define.
              (roots): Declare.
              (ggc_set_mark_rtx): Add prototype.
              (ggc_set_mark_rtvec): Likewise.
              (ggc_set_mark_tree): Likewise.
              * ggc-simple.c (ggc_root): Don't define.
              (roots): Don't declare.
              (ggc_mark_rtx): Remove.
              (ggc_mark_rtvec): Likewise.
              (ggc_mark_tree): Likewise.
              (ggc_mark_varray): Likewise.
              (ggc_mark_tree_hash_table_entry): Likewise.
              (ggc_mark_tree_hash_table): Likewise.
              (ggc_set_mart_rtx): New function.
              (ggc_set_mark_rtvec): Likewise.
              (ggc_set_mark_tree): Likewise.
              (ggc_add_root): Remove.
              (ggc_add_rtx_root): Likewise.
              (ggc_remove_tree_root): Likewise.
              (ggc_add_string_root): Likewise.
              (ggc_add_tree_varray_root): Likewise.
              (ggc_add_tree_hash_table_root): Likewise.
              (ggc_del_root): Likewise.
              (ggc_mark_rtx_ptr): Likewise.
              (ggc_mark_tree_ptr): Likewise.
              (ggc_mark_string_ptr): Likewise.
              (ggc_mark_tree_varray_ptr): Likewise.
              (ggc_mark_tree_hash_table_ptr): Likewise.
              * ggc-common.c: New file.
              * Makefile.in (OBJS): Add ggc-common.o.
              (ggc-common.o): List dependencies.
      
      From-SVN: r29281
      Alex Samuel committed
  10. 09 Sep, 1999 3 commits
    • ggc.h (lang_cleanup_tree): Remove. · 96603b4c
      	* ggc.h (lang_cleanup_tree): Remove.
      	* gcc-simple.c (ggc_free_tree): Don't call lang_cleanup_tree.
      	* ggc-callbacks.c (lang_cleanup_tree): Remove.
      
      	* c-decl.c (finish_struct): Use ggc_alloc to allocate
      	TYPE_LANG_SPECIFIC when garbage collecting.
      	(lang_cleanup_tree): Remove.
      
      From-SVN: r29242
      Mark Mitchell committed
    • combine.c (SUBST): Break out to a real function do_SUBST. · 76095e2f
              * combine.c (SUBST): Break out to a real function do_SUBST.
              (SUBST_INT): Likewise.
              * gcse.c (free_pre_mem): Free `temp_bitmap'.
              (pre_insert): Free `inserted'.
              * loop.c (basic_induction_var): Always set `location'.
      
              * function.c (expand_function_end): Add initial_trampoline as a root.
              * rtl.h (init_varasm_once): Declare.
              * toplev.c (compile_file): Call it.
              * ggc-simple.c (ggc_mark_string_ptr): New.
              (ggc_add_string_root): New.
              (ggc_collect): Disable collection avoidance temporarily.
              * ggc.h (ggc_add_string_root): Declare.
              * except.c (create_rethrow_ref): Use ggc_alloc_string.
              * optabs.c (init_libfuncs): Likewise.
              * varasm.c (named_section): Use ggc_alloc_string.
              (make_function_rtl): Likewise.
              (make_decl_rtl): Likewise.
              (assemble_static_space): Likewise.
              (assemble_trampoline_template): Likewise.
              (output_constant_def): Likewise.
              (force_const_mem): Likewise.
              (mark_const_hash_entry): New.
              (mark_pool_sym_hash_table): New.
              (mark_varasm_state): Use it.
              (init_varasm_once): New.
      
              * expr.h (init_one_libfunc): Declare.
              * optabs.c (init_one_libfunc): New.
              (init_optabs): Use it.
              * config/gofast.h: Likewise.
              * config/sparc/sol2.h (INIT_SUBTARGET_OPTABS): Likewise.
              * config/sparc/sparc.h (INIT_TARGET_OPTABS): Likewise.
      
      From-SVN: r29226
      Richard Henderson committed
    • ggc.h (ggc_alloc): New function. · 37b31aef
      	* ggc.h (ggc_alloc): New function.
      	(ggc_mark): Likewise.
      	* ggc-simple.c (ggc_any): New structure.
      	(ggc_status): Add anys.
      	(n_anys_collected): New variable.
      	(ggc_alloc): Define.
      	(ggc_mark): Likewise.
      	(ggc_collect): Collect the anys.
      
      From-SVN: r29222
      Mark Mitchell committed
  11. 07 Sep, 1999 1 commit
    • emit-rtl.c (free_emit_status): Take decl as a parameter. · 21cd906e
      	* emit-rtl.c (free_emit_status): Take decl as a parameter.
      	(init_emit_once): Add more GC roots.
      	* except.c (mark_func_eh_entry): New function.
      	(mark_eh_node): Mark false_label and rethrow_label.
      	(init_eh): Add more GC roots.
      	* function.c (free_after_compilation): Take decl as a paramter.
      	Call free_stmt_status.
      	(mark_function_state): Don't assume x_parm_reg_stack_loc is
      	non-NULL.
      	* function.h (free_after_compilation): Change prototype.
      	(free_varasm_status): Likewise.
      	(free_emit_status): Likewise.
      	(free_stmt_status): New function.
      	* ggc-simple.c (rtx, vecs, trees, strings, bytes_alloced_since_gc):
      	Remove, replacing with ...
      	(ggc_status): New structure.
      	(ggc_chain): New variable.
      	(init_gcc): Define.
      	(ggc_push_context): New function.
      	(ggc_pop_context): Likewise.
      	(ggc_alloc_rtx): Adjust for use of ggc_chain.
      	(ggc_alloc_rtvec): Likewise.
      	(ggc_alloc_tree): Likewise.
      	(ggc_alloc_string): Likewise.
      	(ggc_mark_rtx): Mark NOTE_SOURCE_FILE and NOTE_RANGE_INFO.
      	(ggc_mark_tree): Give language-dependent code a chance to mark
      	`x' nodes.
      	(ggc_mark_tree_varray): Handle empty arrays.
      	(ggc_collect): Adjust for use of ggc_chain.  Clear
      	bytes_alloced_since_last_gc.
      	* ggc.h (ggc_pop_context): New function.
      	(ggc_push_context): Likewise.
      	* print-tree.c (print_node): Don't print obstacks when GC'ing.
      	* stmt.c (free_stmt_status): New function.
      	(init_stmt_for_function): Clear last_expr_value.
      	* toplev.c (rest_of_compilation): Always call free_after_compilation.
      	Conditionalize call to ggc_collect.
      	(main): Call init_ggc.
      	* tree.c (push_obstacks): Do the push, even when GC'ing.
      	(push_obstacks_nochange): Likewise.
      	(pop_obstacks): Liekwise.
      	* varasm.c (free_varasm_status): Take decl as a parameter.
      
      From-SVN: r29170
      Mark Mitchell committed
  12. 06 Sep, 1999 1 commit
    • Makefile.in (ggc-simple.o): Depend on hash.h. · 565e3f3e
      	* Makefile.in (ggc-simple.o): Depend on hash.h.
      	* ggc.h (ggc_add_tree_hash_table_root): Declare.
      	(ggc_mark_tree_varray): Likewise.
      	(ggc_mark_tree_hash_table): Likewise.
      	* ggc-simple.c: Include hash.h.
      	(ggc_mark_tree_hash_table_ptr): New function.
      	(ggc_mark_tree_hash_table_entry): Likewise.
      	(ggc_mark_tree_hash_table): Likewise.
      	(ggc_add_tree_hash_table_root): Likewise.
      	* varray.h (const_equiv_data): Use struct rtx_def *, rather than
      
      	* profile.c (output_func_start_profiler): Remove apparently
      	nonsensical call to start_sequence.
      
      From-SVN: r29134
      Mark Mitchell committed
  13. 05 Sep, 1999 2 commits
    • Makefile.in (ggc-simple.o): Depend on varray.h. · a3770a81
      	* 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
      Richard Henderson committed
    • Makefile.in (tree.o): Depend on ggc.h. · 87ff9c8e
      	* Makefile.in (tree.o): Depend on ggc.h.
      	(varasm.o): Likewise.
      	(function.o): Likewise.
      	(stmt.o): Likewise.
      	(except.o): Likewise.
      	(optabs.o): Likewise.
      	(emit-rtl.o): Likewise.
      	* emit-rtl.c: Include ggc.h.
      	(sequence_element_free_list): Remove, and all references.
      	(mark_sequence): New functions.
      	(mark_emit_state): New function.
      	* except.c: Include ggc.h.
      	(mark_eh_node, mark_eh_stack, mark_eh_queue): New functions.
      	(mark_tree_label_node): New functions.
      	(mark_eh_state): New function.
      	* function.c: Include ggc.h.
      	(mark_temp_slot, mark_function_chain): New functions.
      	(mark_function_state): New function.
      	(init_function_once): New function.
      	* function.h (init_function_once): New function.
      	* ggc-callbacks.c (lang_mark_false_label_stack): New function.
      	* ggc.h (label_node): Declare.
      	(eh_status, emit_status, stmt_status, varasm_status): Likewise.
      	(lang_mark_false_label_stack): New function.
      	(mark_temp_slot): Remove declaration.
      	(mark_function_chain): Likewise.
      	(mark_eh_state): Adjust prototype.
      	(mark_stmt_state, mark_emit_state, mark_varasm_state, mark_optab):
      	Likewise.
      	* optabs.c: Include ggc.h.
      	(mark_optab): New function.
      	(init_optabs): Add gc roots.
      	* stmt.c: Include ggc.h.
      	(mark_cond_nesting, mark_loop_nesting): New functions.
      	(mark_block_nesting, mark_case_nesting, mark_goto_fixup): Likewise.
      	(mark_stmt_state): New function.
      	* toplev.c (compile_file): Call init_function_once.
      	* tree.c: Include ggc.h.
      	(type_hash): Move declaration earlier in file.
      	(TYPE_HASH_SIZE, type_hash_table): Likewise.
      	(init_obstacks): Add gc roots.
      	(mark_type_hash): New function.
      	* varasm.c: Include ggc.h.
      	(mark_pool_constant): New function.
      	(mark_varasm_state): New function.
      
      Co-Authored-By: Bernd Schmidt <bernds@cygnus.co.uk>
      Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
      
      From-SVN: r29119
      Richard Henderson committed
  14. 04 Sep, 1999 1 commit
    • Makefile.in (GGC, GGC_LIB): New. · 0a25f1f5
      	* Makefile.in (GGC, GGC_LIB): New.
      	(HOST_RTL): Include ggc-none.o.
      	(ggc-simple.o): New target.
      	(ggc-none.o): Likewise.
      	* tree.h (tree_common): Add gc_mark.
      	* rtl.h (struct rtx_def): Steal a bit from code to make gc_mark.
      	(struct rtvec_def): Add gc_mark.
      	* emit-rtl.c (global_rtl): Update static initializers to contain
      	enough initializers.
      	* ggc.h, ggc-none.c, ggc-simple.c: New files.
      	* toplev.c (gc_time): New variable.
      	(all_time): New variable.
      	(compile_file): Print gc time.
      	(print_time): Calculate percentage of the whole.
      
      From-SVN: r29106
      Richard Henderson committed