Commit Graph

84 Commits

Author SHA1 Message Date
Laurynas Biveinis a9429e29f5 utils.c (init_gnat_to_gnu): Use typed GC allocation.
gcc/ada:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC
	allocation.
	(init_dummy_type): Likewise.
	(gnat_pushlevel): Likewise.

	* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
	(Subprogram_Body_to_gnu): Likewise.
	(Compilation_Unit_to_gnu): Likewise.
	(start_stmt_group): Likewise.
	(extract_encoding): Likewise.
	(decode_name): Likewise.

	* gcc-interface/misc.c (gnat_printable_name): Likewise.

	* gcc-interface/decl.c (annotate_value): Likewise.

	* gcc-interface/ada-tree.h (struct lang_type): Add variable_size
	GTY option.
	(struct lang_decl): Likewise.
	(SET_TYPE_LANG_SPECIFIC): Use typed GC allocation.
	(SET_DECL_LANG_SPECIFIC): Likewise.

gcc/c-family:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* c-pragma.c (push_alignment): Use typed GC allocation.
	(handle_pragma_push_options): Likewise.

	* c-common.c (parse_optimize_options): Likewise.

	* c-common.h (struct sorted_fields_type): Add variable_size GTY
	option.

gcc/cp:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* typeck2.c (abstract_virtuals_error): Likewise.

	* pt.c (maybe_process_partial_specialization): Likewise.
	(register_specialization): Likewise.
	(add_pending_template): Likewise.
	(lookup_template_class): Likewise.
	(push_tinst_level): Likewise.

	* parser.c (cp_lexer_new_main): Likewise.
	(cp_lexer_new_from_tokens): Likewise.
	(cp_token_cache_new): Likewise.
	(cp_parser_context_new): Likewise.
	(cp_parser_new): Likewise.
	(cp_parser_nested_name_specifier_opt): Likewise.
	(cp_parser_template_id): Likewise.

	* name-lookup.c (binding_entry_make): Likewise.
	(binding_table_construct): Likewise.
	(binding_table_new): Likewise.
	(cxx_binding_make): Likewise.
	(pushdecl_maybe_friend): Likewise.
	(begin_scope): Likewise.
	(push_to_top_level): Likewise.

	* lex.c (init_reswords): Likewise.
	(retrofit_lang_decl): Likewise.
	(cxx_dup_lang_specific_decl): Likewise.
	(copy_lang_type): Likewise.
	(cxx_make_type): Likewise.

	* decl.c (make_label_decl): Likewise.
	(check_goto): Likewise.
	(start_preparsed_function): Likewise.
	(save_function_data): Likewise.

	* cp-tree.h (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.

	* cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.

	* class.c (finish_struct_1): Likewise.

	* cp-tree.h (struct lang_type): Add variable_size GTY option.
	(struct lang_decl): Likewise.

	* parser.c (cp_parser_new): Update comment to not reference
	ggc_alloc.

gcc/fortran:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* trans-types.c (gfc_get_nodesc_array_type): Use typed GC
	allocation.
	(gfc_get_array_type_bounds): Likewise.

	* trans-decl.c (gfc_allocate_lang_decl): Likewise.
	(gfc_find_module): Likewise.

	* f95-lang.c (pushlevel): Likewise.

	* trans.h (struct lang_type): Add variable_size GTY option.
	(struct lang_decl): Likewise.

gcc/java:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* jcf-reader.c (jcf_parse_constant_pool): Use typed GC allocation.

	* jcf-parse.c (java_parse_file): Likewise.
	(process_zip_dir): Likewise.

	* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
	(MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Likewise.

	* expr.c (add_type_assertion): Likewise.

	* decl.c (make_binding_level): Likewise.
	(java_dup_lang_specific_decl): Likewise.

	* constants.c (set_constant_entry): Likewise.
	(cpool_for_class): Likewise.

	* class.c (add_method_1): Likewise.
	(java_treetreehash_new): Likewise.

	* java-tree.h (struct lang_type): Add variable_size GTY option.
	(struct lang_decl): Likewise.

	* jch.h (struct cpool_entry): Likewise.

	* java-tree.h (java_treetreehash_create): Remove parameter ggc.

	* except.c (prepare_eh_table_type): Update
	java_treetreehash_create call.

	* class.c (add_method_1): Update java_treetreehash_create call.
	(java_treetreehash_create): Remove parameter gc.  Use
	htab_create_ggc.

gcc/lto:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* lto.c (lto_read_in_decl_state): Use typed GC allocation.
	(lto_file_read): Likewise.
	(new_partition): Likewise.
	(read_cgraph_and_symbols): Likewise.

gcc/objc:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
	allocation.

	* objc-act.c (objc_volatilize_decl): Likewise.
	(objc_build_string_object): Likewise.
	(hash_init): Likewise.
	(hash_enter): Likewise.
	(hash_add_attr): Likewise.
	(add_class): Likewise.
	(start_class): Likewise.

gcc/objcp:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* objcp-decl.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Use typed GC
	allocation.

gcc:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* doc/tm.texi (Per-Function Data): Do not reference ggc_alloc.

	* doc/gty.texi (GTY Options): Document typed GC allocation and
	variable_size GTY option.

	* ggc-internal.h: New.

	* ggc.h: Update copyright year.
	(digit_string): Move to stringpool.c.
	(ggc_mark_stringpool, ggc_purge_stringpool, ggc_mark_roots)
	(gt_pch_save_stringpool, gt_pch_fixup_stringpool)
	(gt_pach_restore_stringpool, gt_pch_p_S, gt_pch_note_object)
	(init_ggc_pch, ggc_pch_count_object, ggc_pch_total_size)
	(ggc_pch_this_base, ggc_pch_alloc_object, ggc_pch_prepare_write)
	(ggc_pch_write_object, ggc_pch_finish, ggc_pch_read)
	(ggc_force_collect, ggc_get_size, ggc_statistics)
	(ggc_print_common_statistics): Move to ggc-internal.h.
	(digit_vector, new_ggc_zone, destroy_ggc_zone, ggc_alloc_stat)
	(ggc_alloc, ggc_alloc_cleared, ggc_realloc, ggc_calloc, GGC_NEW)
	(GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR, ggc_alloc_rtvec)
	(ggc_alloc_tree, gt_pch_save, ggc_min_expand_heuristic)
	(ggc_min_heapsize_heuristic, ggc_alloc_zone)
	(ggc_alloc_zone_pass_stat): Remove.
	(ggc_internal_alloc_stat, ggc_internal_alloc)
	(ggc_internal_cleared_alloc_stat): New.
	(GGC_RESIZEVEC, GGC_RESIZEVAR): Redefine.
	(ggc_internal_vec_alloc_stat)
	(ggc_internal_cleared_vec_alloc_stat)
	(ggc_internal_vec_alloc_stat, ggc_internal_cleared_vec_alloc)
	(ggc_alloc_atomic_stat, ggc_alloc_atomic)
	(ggc_alloc_cleared_atomic, ggc_cleared_alloc_htab_ignore_args)
	(ggc_cleared_alloc_ptr_array_two_args): New.
	(htab_create_ggc, splay_tree_new_ggc): Redefine.
	(ggc_splay_alloc): Change the type of the first argument to
	enum gt_types_enum.
	(ggc_alloc_string): Make macro.
	(ggc_alloc_string_stat): New.
	(ggc_strdup): Redefine.
	(rtl_zone, tree_zone, tree_id_zone): Declare unconditionally.
	(ggc_alloc_rtvec_sized): New.
	(ggc_alloc_zone_stat): Rename to ggc_internal_alloc_zone_stat.
	(ggc_internal_alloc_zone_pass_stat, ggc_internal_alloc_zone_stat)
	(ggc_internal_cleared_alloc_zone_stat)
	(ggc_internal_zone_alloc_stat)
	(ggc_internal_zone_cleared_alloc_stat)
	(ggc_internal_zone_vec_alloc_stat)
	(ggc_alloc_zone_rtx_def_stat)
	(ggc_alloc_zone_tree_node_stat)
	(ggc_alloc_zone_cleared_tree_node_stat)
	(ggc_alloc_cleared_gimple_statement_d_stat): New.

	* ggc-common.c: Include ggc-internal.h.
	(ggc_internal_cleared_alloc_stat): Rename from
	ggc_alloc_cleared_stat.
	(ggc_realloc_stat): Use ggc_internal_alloc_stat.
	(ggc_calloc): Remove.
	(ggc_cleared_alloc_htab_ignore_args): New.
	(ggc_cleared_alloc_ptr_array_two_args): New.
	(ggc_splay_alloc): Add obj_type parameter.
	(init_ggc_heuristics): Formatting fixes.

	* ggc-none.c: Update copyright year.
	(ggc_alloc_stat): Rename to ggc_alloc_stat.
	(ggc_alloc_cleared_stat): Rename to
	ggc_internal_cleared_alloc_stat.
	(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.

	* ggc-page.c: Update copyright year.  Include ggc-internal.h.
	Remove references to ggc_alloc in comments.
	(ggc_alloc_typed_stat): Call ggc_internal_alloc_stat.
	(ggc_alloc_stat): Rename to ggc_internal_alloc_stat.
	(new_ggc_zone, destroy_ggc_zone): Remove.
	(struct alloc_zone, rtl_zone, tree_zone, tree_id_zone): New.

	* ggc-zone.c: Include ggc-internal.h.  Remove references to
	ggc_alloc in comments.
	(ggc_alloc_zone_stat): ggc_internal_alloc_zone_stat.
	(ggc_internal_alloc_zone_pass_stat): New.
	(ggc_internal_cleared_alloc_zone_stat): New.
	(ggc_alloc_typed_stat): Use ggc_internal_alloc_zone_pass_stat.
	(ggc_alloc_stat): Rename ggc_internal_alloc_stat.
	(new_ggc_zone, destroy_ggc_zone): Remove.

	* stringpool.c: Update copyright year.  Include ggc-internal.h
	(digit_vector): Make static.
	(digit_string): Moved from ggc.h.
	(stringpool_ggc_alloc): Use ggc_alloc_atomic.
	(ggc_alloc_string): Rename to ggc_alloc_string_stat.

	* Makefile.in (GGC_INTERNAL_H): New.
	(ggc_common.o, ggc-page.o, ggc-zone.o, stringpool.o): Add
	$(GGC_INTERNAL_H) to dependencies.

	* gentype.c: Update copyright year.
	(walk_type): Accept variable_size GTY option.
	(USED_BY_TYPED_GC_P): New macro.
	(write_enum_defn): Use USED_BY_TYPED_GC_P.  Do not output
	whitespace at the end of strings.
	(get_type_specifier, variable_size_p): New functions.
	(alloc_quantity, alloc_zone): New enums.
	(write_typed_alloc_def): New function.
	(write_typed_struct_alloc_def): Likewise.
	(write_typed_typed_typedef_alloc_def): Likewise.
	(write_typed_alloc_defns): Likewise.
	(output_typename, write_splay_tree_allocator_def): Likewise.
	(write_splay_tree_allocators): Likewise.
	(main): Call write_typed_alloc_defns and
	write_splay_tree_allocators.

	* lto-streamer.h (lto_file_decl_data_ptr): New.

	* passes.c (order): Define using cgraph_node_ptr.

	* strinpool.c (struct string_pool_data): Declare nested_ptr using
	ht_identifier_ptr.

	* gimple.h (union gimple_statement_d): Likewise.

	* rtl.h (struct rtx_def): Likewise.
	(struct rtvec_def): Likewise.

	* tree.h (union tree_node): Likewise.

	* tree-ssa-operands.h (struct ssa_operand_memory_d): Likewise.

	* cfgloop.c (record_loop_exits): Use htab_create_ggc.

	* tree-scalar-evolution.c (scev_initialize): Likewise.

	* alias.c (record_alias_subset): Update splay_tree_new_ggc call.

	* dwarf2asm.c (dw2_force_const_mem): Likewise.

	* omp-low.c (lower_omp_critical): Likewise.

	* bitmap.h (struct bitmap_head_def): Update comment to not
	reference ggc_alloc.

	* config/pa/pa.c (get_deferred_label): Use GGC_RESIZEVEC.

	* ira.c (fix_reg_equiv_init): Use GGC_RESIZEVEC.

	* ipa-prop.c (duplicate_ggc_array): Rename to
	duplicate_ipa_jump_func_array.  Use typed GC allocation.
	(ipa_edge_duplication_hook): Call duplicate_ipa_jump_func_array.

	* gimple.c (gimple_alloc_stat): Use
	ggc_alloc_cleared_gimple_statement_d_stat.

	* varasm.c (create_block_symbol): Use ggc_alloc_zone_rtx_def.

	* tree.c (make_node_stat): Use
	ggc_alloc_zone_cleared_tree_node_stat.
	(make_tree_vec_stat): Likewise.
	(build_vl_exp_stat): Likewise.
	(copy_node_stat): Use ggc_alloc_zone_tree_node_stat.
	(make_tree_binfo_stat): Likewise.
	(tree_cons_stat): Likewise.

	* rtl.c (rtx_alloc_stat): Use ggc_alloc_zone_rtx_def_stat.
	(shallow_copy_rtx_stat): Likewise.
	(make_node_stat): Likewise.

	* lto-symtab.c: Fix comment.

	* tree-cfg.c (create_bb): Update comment to not reference
	ggc_alloc_cleared.
	* tree-ssa-structalias.c (struct heapvar_for_stmt): Fix param_is
	value.

	* varpool.c (varpool_node): Use typed GC allocation.
	(varpool_extra_name_alias): Likewise.

	* varasm.c (emutls_decl): Likewise.
	(get_unnamed_section): Likewise.
	(get_noswitch_section): Likewise.
	(get_section): Likewise.
	(get_block_for_section): Likewise.
	(build_constant_desc): Likewise.
	(create_constant_pool): Likewise.
	(force_const_mem): Likewise.

	* tree.c (build_vl_exp_stat): Likewise.
	(build_real): Likewise.
	(build_string): Likewise.
	(decl_debug_expr_insert): Likewise.
	(decl_value_expr_insert): Likewise.
	(type_hash_add): Likewise.
	(build_omp_clause): Likewise.

	* tree-ssanames.c (duplicate_ssa_name_ptr_info): Likewise.

	* tree-ssa.c (init_tree_ssa): Likewise.

	* tree-ssa-structalias.c (heapvar_insert): Likewise.

	* tree-ssa-operands.c (ssa_operand_alloc): Likewise.

	* tree-ssa-loop-niter.c (record_estimate): Likewise.

	* tree-ssa-alias.c (get_ptr_info): Likewise.

	* tree-scalar-evolution.c (new_scev_info_str): Likewise.

	* tree-phinodes.c (allocate_phi_node): Likewise.

	* tree-iterator.c (tsi_link_before): Likewise.
	(tsi_link_after): Likewise.

	* tree-eh.c (add_stmt_to_eh_lp_fn): Likewise.

	* tree-dfa.c (create_var_ann): Likewise.

	* tree-cfg.c (create_bb): Likewise.

	* toplev.c (alloc_for_identifier_to_locale): Likewise.
	(general_init): Likewise.

	* stringpool.c (stringpool_ggc_alloc): Likewise.
	(gt_pch_save_stringpool): Likewise.

	* sese.c (if_region_set_false_region): Likewise.

	* passes.c (do_per_function_toporder): Likewise.

	* optabs.c (set_optab_libfunc): Likewise.
	(set_conv_libfunc): Likewise.

	* lto-symtab.c (lto_symtab_register_decl): Likewise.

	* lto-streamer-in.c (lto_input_eh_catch_list): Likewise.
	(input_eh_region): Likewise.
	(input_eh_lp): Likewise.
	(make_new_block): Likewise.
	(unpack_ts_real_cst_value_fields): Likewise.

	* lto-section-in.c (lto_new_in_decl_state): Likewise.

	* lto-cgraph.c (input_node_opt_summary): Likewise.

	* loop-init.c (loop_optimizer_init): Likewise.

	* lambda.h (lambda_vector_new): Likewise.

	* lambda-code.c (replace_uses_equiv_to_x_with_y): Likewise.

	* ira.c (update_equiv_regs): Likewise.

	* ipa.c (cgraph_node_set_new): Likewise.
	(cgraph_node_set_add): Likewise.
	(varpool_node_set_new): Likewise.
	(varpool_node_set_add): Likewise.

	* ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
	(duplicate_ipa_jump_func_array): Likewise.
	(ipa_read_node_info): Likewise.

	* ipa-cp.c (ipcp_create_replace_map): Likewise.

	* integrate.c (get_hard_reg_initial_val): Likewise.

	* gimple.c (gimple_alloc_stat): Likewise.
	(gimple_build_omp_for): Likewise.
	(gimple_seq_alloc): Likewise.
	(gimple_copy): Likewise.

	* gimple-iterator.c (gsi_insert_before_without_update): Likewise.
	(gsi_insert_after_without_update): Likewise.

	* function.c (add_frame_space): Likewise.
	(insert_temp_slot_address): Likewise.
	(assign_stack_temp_for_type): Likewise.
	(allocate_struct_function): Likewise.
	(types_used_by_var_decl_insert): Likewise.

	* except.c (init_eh_for_function): Likewise.
	(gen_eh_region): Likewise.
	(gen_eh_region_catch): Likewise.
	(gen_eh_landing_pad): Likewise.
	(add_call_site): Likewise.

	* emit-rtl.c (get_mem_attrs): Likewise.
	(get_reg_attrs): Likewise.
	(start_sequence): Likewise.
	(init_emit): Likewise.

	* dwarf2out.c (new_cfi): Likewise.
	(queue_reg_save): Likewise.
	(dwarf2out_frame_init): Likewise.
	(new_loc_descr): Likewise.
	(find_AT_string): Likewise.
	(new_die): Likewise.
	(add_var_loc_to_decl): Likewise.
	(clone_die): Likewise.
	(clone_as_declaration): Likewise.
	(break_out_comdat_types): Likewise.
	(new_loc_list): Likewise.
	(loc_descriptor): Likewise.
	(add_loc_descr_to_each): Likewise.
	(add_const_value_attribute): Likewise.
	(tree_add_const_value_attribute): Likewise.
	(add_comp_dir_attribute): Likewise.
	(add_name_and_src_coords_attributes): Likewise.
	(lookup_filename): Likewise.
	(store_vcall_insn): Likewise.
	(dwarf2out_init): Likewise.

	* dbxout.c (dbxout_init): Likewise.

	* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.

	* config/sparc/sparc.c (sparc_init_machine_status): Likewise.

	* config/score/score7.c (score7_output_external): Likewise.

	* config/score/score3.c (score3_output_external): Likewise.

	* config/s390/s390.c (s390_init_machine_status): Likewise.

	* config/rs6000/rs6000.c (builtin_function_type): Likewise.
	(rs6000_init_machine_status): Likewise.
	(output_toc): Likewise.

	* config/pa/pa.c (pa_init_machine_status): Likewise.
	(get_deferred_plabel): Likewise.

	* config/moxie/moxie.c (moxie_init_machine_status): Likewise.

	* config/mmix/mmix.c (mmix_init_machine_status): Likewise.

	* config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise.

	* config/mep/mep.c (mep_init_machine_status): Likewise.
	(mep_note_pragma_flag): Likewise.

	* config/m32c/m32c.c (m32c_init_machine_status): Likewise.

	* config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise.

	* config/ia64/ia64.c (ia64_init_machine_status): Likewise.

	* config/i386/winnt.c (i386_pe_record_external_function): Likewise.
	(i386_pe_maybe_record_exported_symbol): Likewise.

	* config/i386/i386.c (get_dllimport_decl): Likewise.
	(ix86_init_machine_status): Likewise.
	(assign_386_stack_local): Likewise.

	* config/frv/frv.c (frv_init_machine_status): Likewise.

	* config/darwin.c (machopic_indirection_name): Likewise.

	* config/cris/cris.c (cris_init_machine_status): Likewise.

	* config/bfin/bfin.c (bfin_init_machine_status): Likewise.

	* config/avr/avr.c (avr_init_machine_status): Likewise.

	* config/arm/arm.c (arm_init_machine_status): Likewise.

	* config/alpha/alpha.c (alpha_init_machine_status): Likewise.
	(alpha_need_linkage): Likewise.
	(alpha_use_linkage): Likewise.

	* cgraph.c (cgraph_allocate_node): Likewise.
	(cgraph_create_edge_1): Likewise.
	(cgraph_create_indirect_edge): Likewise.
	(cgraph_add_asm_node): Likewise.

	* cfgrtl.c (init_rtl_bb_info): Likewise.

	* cfgloop.c (alloc_loop): Likewise.
	(rescan_loop_exit): Likewise.

	* cfg.c (init_flow): Likewise.
	(alloc_block): Likewise.
	(unchecked_make_edge): Likewise.

	* c-parser.c (c_parse_init): Likewise.
	(c_parse_file): Likewise.

	* c-decl.c (bind): Likewise.
	(record_inline_static): Likewise.
	(push_scope): Likewise.
	(make_label): Likewise.
	(lookup_label_for_goto): Likewise.
	(finish_struct): Likewise.
	(finish_enum): Likewise.
	(c_push_function_context): Likewise.

	* bitmap.c (bitmap_element_allocate): Likewise.
	(bitmap_gc_alloc_stat): Likewise.

	* alias.c (record_alias_subset): Likewise.
	(init_alias_analysis): Likewise.

include:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* splay-tree.h: Update copyright years.
	(splay_tree_s): Document fields.
	(splay_tree_new_typed_alloc): New.

	* hashtab.h: Update copyright years.
	(htab_create_typed_alloc): New.

libcpp:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* include/symtab.h (ht_identifier_ptr): New.

libiberty:

2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* splay-tree.c: Update copyright years.
	(splay_tree_new_typed_alloc): New.
	(splay_tree_new_with_allocator): Use it.

	* hashtab.c: Update copyright years.
	(htab_create_typed_alloc): New.
	(htab_create_alloc): Use it.

	* functions.texi: Regenerate.

From-SVN: r160425
2010-06-08 07:25:24 +00:00
Laurynas Biveinis 58cd630367 ggc.h (ggc_min_expand_heuristic, [...]): Remove.
2010-05-26  Laurynas Biveinis  <laurynas.biveinis@gmail.com>

	* ggc.h (ggc_min_expand_heuristic, ggc_min_heapsize_heuristic):
	Remove.

From-SVN: r159874
2010-05-26 15:08:28 +00:00
H.J. Lu b8698a0f37 Remove trailing white spaces.
2009-11-25  H.J. Lu  <hongjiu.lu@intel.com>

	* alias.c: Remove trailing white spaces.
	* alloc-pool.c: Likewise.
	* alloc-pool.h: Likewise.
	* attribs.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* builtins.def: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-decl.c: Likewise.
	* c-format.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c-opts.c: Likewise.
	* c-parser.c: Likewise.
	* c-pretty-print.c: Likewise.
	* c-tree.h: Likewise.
	* c-typeck.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h: Likewise.
	* cfglayout.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphunit.c: Likewise.
	* cif-code.def: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* coverage.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* dbgcnt.c: Likewise.
	* dbgcnt.def: Likewise.
	* dbgcnt.h: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* ddg.c: Likewise.
	* ddg.h: Likewise.
	* defaults.h: Likewise.
	* df-byte-scan.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* df.h: Likewise.
	* dfp.c: Likewise.
	* diagnostic.c: Likewise.
	* diagnostic.h: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* double-int.c: Likewise.
	* double-int.h: Likewise.
	* dse.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2asm.h: Likewise.
	* dwarf2out.c: Likewise.
	* ebitmap.c: Likewise.
	* ebitmap.h: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* flags.h: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* fwprop.c: Likewise.
	* gcc.c: Likewise.
	* gcov-dump.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* genchecksum.c: Likewise.
	* genconfig.c: Likewise.
	* genflags.c: Likewise.
	* gengtype-parse.c: Likewise.
	* gengtype.c: Likewise.
	* gengtype.h: Likewise.
	* genmddeps.c: Likewise.
	* genmodes.c: Likewise.
	* genopinit.c: Likewise.
	* genpreds.c: Likewise.
	* gensupport.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc-zone.c: Likewise.
	* ggc.h: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple.c: Likewise.
	* gimple.def: Likewise.
	* gimple.h: Likewise.
	* gimplify.c: Likewise.
	* graphds.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* gthr-nks.h: Likewise.
	* gthr-posix.c: Likewise.
	* gthr-posix.h: Likewise.
	* gthr-posix95.h: Likewise.
	* gthr-single.h: Likewise.
	* gthr-tpf.h: Likewise.
	* gthr-vxworks.h: Likewise.
	* gthr.h: Likewise.
	* haifa-sched.c: Likewise.
	* hard-reg-set.h: Likewise.
	* hooks.c: Likewise.
	* hooks.h: Likewise.
	* hosthooks.h: Likewise.
	* hwint.h: Likewise.
	* ifcvt.c: Likewise.
	* incpath.c: Likewise.
	* init-regs.c: Likewise.
	* integrate.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa-type-escape.h: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-utils.h: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-int.h: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* lambda-code.c: Likewise.
	* lambda-mat.c: Likewise.
	* lambda-trans.c: Likewise.
	* lambda.h: Likewise.
	* langhooks.c: Likewise.
	* lcm.c: Likewise.
	* libgcov.c: Likewise.
	* lists.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-init.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-iv.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* lto-streamer.h: Likewise.
	* lto-symtab.c: Likewise.
	* lto-wpa-fixup.c: Likewise.
	* matrix-reorg.c: Likewise.
	* mcf.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omega.c: Likewise.
	* omega.h: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* opts-common.c: Likewise.
	* opts.c: Likewise.
	* params.def: Likewise.
	* params.h: Likewise.
	* passes.c: Likewise.
	* plugin.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* predict.def: Likewise.
	* pretty-print.c: Likewise.
	* pretty-print.h: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* read-rtl.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regmove.c: Likewise.
	* regrename.c: Likewise.
	* regs.h: Likewise.
	* regstat.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* resource.c: Likewise.
	* rtl.c: Likewise.
	* rtl.def: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.
	* sbitmap.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-int.h: Likewise.
	* sched-rgn.c: Likewise.
	* sched-vis.c: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-dump.h: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* sel-sched.h: Likewise.
	* sese.c: Likewise.
	* sese.h: Likewise.
	* simplify-rtx.c: Likewise.
	* stack-ptr-mod.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* stringpool.c: Likewise.
	* stub-objc.c: Likewise.
	* sync-builtins.def: Likewise.
	* target-def.h: Likewise.
	* target.h: Likewise.
	* targhooks.c: Likewise.
	* targhooks.h: Likewise.
	* timevar.c: Likewise.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* toplev.h: Likewise.
	* tracer.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-affine.h: Likewise.
	* tree-browser.def: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-dump.h: Likewise.
	* tree-eh.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-flow.h: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-loop-linear.c: Likewise.
	* tree-mudflap.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-operands.h: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vectorizer.h: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* treestruct.def: Likewise.
	* unwind-compat.c: Likewise.
	* unwind-dw2-fde-glibc.c: Likewise.
	* unwind-dw2.c: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vec.c: Likewise.
	* vec.h: Likewise.
	* vmsdbgout.c: Likewise.
	* web.c: Likewise.
	* xcoffout.c: Likewise.

From-SVN: r154645
2009-11-25 02:55:54 -08:00
Duncan Sands 32c9b4e924 Add support for using ggc cache tables from plugins.
Approved by Ian Lance Taylor.

From-SVN: r152232
2009-09-28 08:50:39 +00:00
Basile Starynkevitch ae2392a94b plugins.texi (Loading plugins): typo.
2009-05-26  Basile Starynkevitch  <basile@starynkevitch.net>

	* gcc/doc/plugins.texi
	(Loading plugins): typo.
	(Plugin callbacks): Documented PLUGIN_INFO, PLUGIN_GGC_START,
	PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS.
	(Interacting with the GCC Garbage Collector): Added new section.
	(Giving information about a plugin): Added new section for
	PLUGIN_INFO.
	* gcc/testsuite/gcc.dg/plugin/plugin.exp: Added ggcplug.c test plugin
	with ggcplug-test-1.c for testing PLUGIN_GGC_MARKING etc...
	* gcc/testsuite/gcc.dg/plugin/ggcplug-test-1.c: Added new file.
	* gcc/testsuite/gcc.dg/plugin/ggcplug.c: Added new file.
	* gcc/ggc.h (ggc_register_root_tab): Added declaration.
	* gcc/gcc-plugin.h (PLUGIN_GGC_START, PLUGIN_GGC_MARKING)
	(PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS): Added new events.
	(register_callback): Improved comment in declaration.
	* gcc/ggc-common.c (const_ggc_root_tab_t) Added new typedef for
	vectors.
	(extra_root_vec) Added static variable for dynamic roots
	registration.
	(ggc_register_root_tab) Added new routine.
	(ggc_mark_roots) Added iteration inside extra_root_vec, and invoke
	PLUGIN_GGC_MARKING event.
	* gcc/ggc-zone.c: Include plugin.h.
	(ggc_collect): Invoke PLUGIN_GGC_START & PLUGIN_GGC_END events.
	* gcc/ggc-page.c: Include plugin.h.
	(ggc_collect): Invoke PLUGIN_GGC_START & PLUGIN_GGC_END events.
	* gcc/plugin.c (plugin_event_name): added names of PLUGIN_GGC_START,
	PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS
	(register_callback): check lack of callbacks for
	pseudo-events. Added handling of PLUGIN_REGISTER_GGC_ROOTS,
	PLUGIN_GGC_START, PLUGIN_GGC_MARKING, PLUGIN_GGC_END.
	(invoke_plugin_callbacks): Handle PLUGIN_GGC_START,
	PLUGIN_GGC_MARKING, PLUGIN_GGC_END, PLUGIN_REGISTER_GGC_ROOTS.
	* gcc/Makefile.in (ggc-common.o, ggc-zone.o, ggc-page.o): Added
	dependency on plugin.h.
	(plugin.o): Added dependency on ggc.h...

From-SVN: r147878
2009-05-26 17:33:33 +00:00
Jan Hubicka 9283b51332 re PR c/12245 (Uses lots of memory when compiling large initialized arrays)
PR c/12245
	* ggc.h (htab_create_ggc): Use ggc_free to free hashtable when resizing.

From-SVN: r144384
2009-02-23 16:46:32 +00:00
Kaveh R. Ghazi 3d9a9f947f ggc.h (GGC_RESIZEVAR): New, reorder macros.
* ggc.h (GGC_RESIZEVAR): New, reorder macros.
	* tracer.c (tail_duplicate): Fix for -Wc++-compat.
	* tree-affine.c (aff_combination_expand, free_name_expansion):
	Likewise.
	* tree-cfg.c (replace_by_duplicate_decl, replace_ssa_name,
	move_stmt_r, new_label_mapper): Likewise.
	* tree-complex.c (cvc_lookup): Likewise.
	* tree-dfa.c (create_function_ann): Likewise.
	* tree-dump.c (dump_register): Likewise.
	* tree-if-conv.c (tree_if_conversion, add_to_predicate_list,
	find_phi_replacement_condition): Likewise.
	* tree-inline.c (copy_phis_for_bb, estimate_num_insns_1,
	tree_function_versioning): Likewise.
	* tree-into-ssa.c (cmp_dfsnum): Likewise.
	* tree-iterator.c (tsi_link_before, tsi_link_after): Likewise.
	* tree-nested.c (lookup_field_for_decl, lookup_tramp_for_decl,
	get_nonlocal_debug_decl, convert_nonlocal_reference,
	convert_nonlocal_omp_clauses, get_local_debug_decl,
	convert_local_reference, convert_local_omp_clauses,
	convert_nl_goto_reference, convert_nl_goto_receiver,
	convert_tramp_reference, convert_call_expr): Likewise.
	* tree-outof-ssa.c (contains_tree_r): Likewise.
	* tree-parloops.c (reduction_phi, initialize_reductions,
	eliminate_local_variables_1, add_field_for_reduction,
	add_field_for_name, create_phi_for_local_result,
	create_call_for_reduction_1, create_loads_for_reductions,
	create_stores_for_reduction, create_loads_and_stores_for_name):
	Likewise.
	* tree-phinodes.c (allocate_phi_node): Likewise.
	* tree-predcom.c (order_drefs, execute_pred_commoning_cbck):
	Likewise.
	* tree-sra.c (sra_elt_hash, sra_elt_eq, lookup_element):
	Likewise.
	* tree-ssa-alias.c (get_mem_sym_stats_for): Likewise.
	* tree-ssa-coalesce.c (compare_pairs): Likewise.
	* tree-ssa-loop-im.c (mem_ref_in_stmt, memref_hash, memref_eq,
	memref_free, gather_mem_refs_stmt, vtoe_hash, vtoe_eq, vtoe_free,
	record_vop_access, get_vop_accesses, get_vop_stores): Likewise.
	* tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise. 
	* tree-ssa-sccvn.c (VN_INFO_GET, free_phi, free_reference,
	vn_nary_op_insert): Likewise.
	* tree-ssa.c (redirect_edge_var_map_add,
	redirect_edge_var_map_clear, redirect_edge_var_map_dup): Likewise.
	* tree-vectorizer.c (vectorize_loops): Likewise.
	* tree.c (make_node_stat, copy_node_stat, build_int_cst_wide,
	build_fixed, build_real, make_tree_binfo_stat, make_tree_vec_stat,
	tree_cons_stat, build1_stat, build_variant_type_copy,
	decl_init_priority_lookup, decl_fini_priority_lookup,
	decl_priority_info, decl_restrict_base_lookup,
	decl_restrict_base_insert, decl_debug_expr_lookup,
	decl_debug_expr_insert, decl_value_expr_lookup,
	decl_value_expr_insert, type_hash_eq, type_hash_lookup,
	type_hash_add, get_file_function_name, tree_check_failed,
	tree_not_check_failed, tree_range_check_failed,
	omp_clause_range_check_failed, build_omp_clause,
	build_vl_exp_stat): Likewise.
	* value-prof.c (gimple_histogram_value,
	gimple_duplicate_stmt_histograms): Likewise.
	* var-tracking.c (attrs_list_insert, attrs_list_copy,
	unshare_variable, variable_union_info_cmp_pos, variable_union,
	dataflow_set_different_1, dataflow_set_different_2,
	vt_find_locations, variable_was_changed, set_variable_part,
	emit_notes_for_differences_1, emit_notes_for_differences_2):
	Likewise.
	* varasm.c (prefix_name, emutls_decl, section_entry_eq,
	section_entry_hash, object_block_entry_eq,
	object_block_entry_hash, create_block_symbol,
	initialize_cold_section_name, default_function_rodata_section,
	strip_reg_name, set_user_assembler_name, const_desc_eq,
	build_constant_desc, output_constant_def, lookup_constant_def,
	const_desc_rtx_hash, const_desc_rtx_eq, const_rtx_hash_1,
	create_constant_pool, force_const_mem, compute_reloc_for_rtx_1,
	default_internal_label): Likewise.
	* varray.c (varray_init, varray_grow): Likewise.
	* vec.c (vec_gc_o_reserve_1, vec_heap_o_reserve_1): Likewise.

From-SVN: r136992
2008-06-20 18:34:07 +00:00
Tom Tromey dae4174e53 symtab.h (HT_ALLOCED): Remove.
libcpp
	* include/symtab.h (HT_ALLOCED): Remove.
	(ht_purge): Declare.
	* symtab.c (DELETED): New define.
	(ht_lookup): Update comment.
	(ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
	code.  Use subobject allocator for strings, if it exists.
	(ht_expand): Handle deleted entries.
	(ht_forall): Likewise.
	(ht_purge): New function.
	(ht_dump_statistics): Print deletion statistics.
gcc
	* ggc-zone.c (lookup_page_table_if_allocated): New function.
	(zone_find_object_offset): Likewise.
	(gt_ggc_m_S): Likewise.
	(highest_bit): Likewise.
	* ggc-page.c (gt_ggc_m_S): New function.
	* stringpool.c (string_stack): Remove.
	(init_stringpool): Update.
	(ggc_alloc_string): Use ggc_alloc.
	(maybe_delete_ident): New function.
	(ggc_purge_stringpool): Likewise.
	(gt_ggc_m_S): Remove.
	* ggc-common.c (ggc_protect_identifiers): New global.
	(ggc_mark_roots): Call ggc_purge_stringpool.  Use
	ggc_protect_identifiers.
	* ggc.h (ggc_protect_identifiers): Declare.
	(gt_ggc_m_S): Update.
	(ggc_purge_stringpool): Declare.
	* toplev.c (compile_file): Set and reset ggc_protect_identifiers.
	* gengtype.c (write_types_process_field) <TYPE_STRING>: Remove
	special case.
	(write_root): Cast gt_ggc_m_S to gt_pointer_walker.
gcc/cp
	* mangle.c (save_partially_mangled_name): Remove.
	(restore_partially_mangled_name): Likewise.
	(write_encoding): Update.
	(write_unqualified_name): Likewise.
	(start_mangling): Always use name_obstack.  Remove 'ident_p'
	argument.
	(get_identifier_nocopy): Remove.
	(finish_mangling_internal): Rename from finish_mangling.
	(finish_mangling): New function.
	(finish_mangling_get_identifier): Likewise.
	(partially_mangled_name, partially_mangled_name_len): Remove.
	(mangle_decl_string): Change return type.  Update.
	(mangle_decl, mangle_type_string, mangle_special_for_type,
	mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
	mangle_ref_init_variable): Update.

From-SVN: r135720
2008-05-21 15:00:59 +00:00
Nick Clifton 9dcd6f09a3 Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
2007-07-26 08:37:01 +00:00
Jan Hubicka a5573239ec toplev.c (dump_memory_report): Break out from...
* toplev.c (dump_memory_report): Break out from...
	(finalize): Here.
	* toplev.h (dump_memory_report): Declare.
	(cmp_statistic): Rename to ...
	(final_cmp_statistic): ... this one
	(cmp_statistic): New.
	(dump_ggc_loc_staitsitcs): New FINAL parpameter.
	* common.opt (-fpre-ipa-mem-report, -fpost-ipa-mem-report): Declare.
	* varray.c (dump_varray_staitiscs): Do not segfault when no varray was
	allocated so far.

From-SVN: r120168
2006-12-23 14:30:36 +00:00
Gabriel Dos Reis 7767580e64 ggc.h (GGC_RESIZEVEC): New.
* ggc.h (GGC_RESIZEVEC): New.

cp/
        * parser.c (cp_lexer_new_main): Usr GGC_RESIZEVEC instead of 
        ggc_realloc.
        (cp_parser_template_argument_list): Use XRESIZEVEC instead of xrealloc.
        * class.c (pushclass): Likewise.

From-SVN: r107887
2005-12-02 12:37:15 +00:00
Mark Mitchell 6f02b1dbf6 ggc-page.c (ggc_push_context): Remove.
* ggc-page.c (ggc_push_context): Remove.
	(ggc_pop_context): Likewise.
	* ggc.h (ggc_push_context): Remove.
	(ggc_pop_context): Likewise.

From-SVN: r103979
2005-09-07 03:50:08 +00:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Daniel Jacobowitz a6e4d85b50 ggc.h (ggc_alloc_zone_pass_stat): New macro.
* ggc.h (ggc_alloc_zone_pass_stat): New macro.
	(ggc_alloc_zone_stat): Don't define.
	* ggc-zone.c (ggc_alloc_typed_stat, ggc_alloc_stat): Use
	ggc_alloc_zone_pass_stat.
	* rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Likewise.
	* tree.c (make_node_stat, copy_node_stat, make_tree_binfo_stat)
	(make_tree_vec_stat, tree_cons_stat, build1_stat): Likewise.

From-SVN: r99114
2005-05-02 18:25:23 +00:00
Kazu Hirata a21309013c alloc-pool.c, [...]: Update copyright.
* alloc-pool.c, except.h, ggc-common.c, ggc-zone.c, ggc.h,
	stringpool.c, config/mips/mips-protos.h: Update copyright.

From-SVN: r96428
2005-03-14 13:10:51 +00:00
Daniel Jacobowitz 08cee789cd ggc-zone.c: Rewritten.
* ggc-zone.c: Rewritten.

	* alloc-pool.c (dump_alloc_pool_statistics): Don't print statistics
	if there are none.
	* configure.ac: Define GGC_ZONE for --with-gc=zone.
	* config.in: Regenerated.
	* configure: Regenerated.
	* gentype.c (write_types_process_field, write_func_for_structure):
	Pass new argument to gt_pch_note_object.
	* ggc-common.c (struct ptr_data): Add TYPE.
	(gt_pch_note_object): Take TYPE argument and save it.
	(call_count): Update call to ggc_pch_count_object.
	(call_alloc): Update call to ggc_pch_alloc_object.
	(gt_pch_save): Call ggc_pch_prepare_write after paddng the PCH
	file.
	* ggc-none.c (rtl_zone, garbage_zone, ggc_alloc_zone_stat): Delete.
	* ggc-page.c (rtl_zone, tree_zone, garbage_zone)
	(ggc_alloc_zone_stat): Delete.
	(ggc_pch_count_object, ggc_pch_alloc_object): Add TYPE argument.
	* ggc.h (gt_pch_note_object, ggc_pch_count_object)
	(ggc_pch_alloc_object): Update prototypes.
	(garbage_zone): Delete.
	(tree_zone, rtl_zone, ggc_alloc_zone_stat, ggc_alloc_zone): Move to
	GGC_ZONE conditional.  Update.  Change tree_zone and rtl_zone into
	pointers.
	(tree_id_zone): New variable.
	(ggc_alloc_cleared_zone): Remove unused.
	(ggc_alloc_zone): Define.
	(ggc_alloc_rtvec, ggc_alloc_tree): Update to use ggc_alloc_zone.
	* rtl.c (rtx_alloc_stat, shallow_copy_rtx_stat): Use
	ggc_alloc_zone_stat.
	* stringpool.c (gt_pch_n_S): Update call to gt_pch_note_object.
	* tree.c (copy_node_stat, make_tree_binfo_stat, make_tree_vec_stat)
	(tree_cons_stat, build1_stat): Update call to ggc_alloc_zone_stat.
	(make_node_stat): Likewise.  Use tree_id_zone.

From-SVN: r96381
2005-03-13 18:09:55 +00:00
Jan Hubicka 0772402279 gimplify.c (gimplify_compound_lval): Move "stack" varray out of GGC.
* gimplify.c (gimplify_compound_lval): Move "stack" varray out of
	GGC.

	* ggc-page.c: include tree-flow.h.
	(extra_order_size_table): Add stmt_ann_d.
	(STAT_LABEL): Rename from ....
	(LABEL): ... this one.
	* Makefile.in (ggc-page.o): Add dependency.

	* ggc-common.c (ggc_force_collect): New global variable.
	(loc_description): Add fields "freed", "collected"
	(ptr_hash): New static hash
	(ptr_hash_entry): New structure.
	(hash_ptr,eq_ptr,ggc_prune_ptr): New static functions.
	(ggc_record_overhead): Take ptr argument, record it
	(ggc_prune_overhead_list, ggc_free_overhead): New functions.
	(cmp_statistics): Imrove sorting.
	(dump_ggc_loc_statistics): Output newly collected statistics
	* ggc-page.c (ggc_alloc): Update call of ggc_record_overhead
	(ggc_free): Call ggc_free_overhead.
	(ggc_collect): Force collection when asked to be forced.
	(ggc_collect): Call ggc_prune_overhead_list.
	* ggc.h (ggc_force_collect): Declare
	(ggc_record_overhead): Update prototype.
	(ggc_free_overhead, ggc_prune_overhead_list): Declare.

From-SVN: r86974
2004-09-02 18:32:49 +00:00
Dan Nicolaescu 1e8964cf94 *** empty log message ***
From-SVN: r86955
2004-09-02 02:39:15 +00:00
Bernardo Innocenti c32118f961 ggc.h (GGC_NEW, [...]): New macros.
* ggc.h (GGC_NEW, GGC_CNEW, GGC_NEWVEC, GGC_CNEWVEC, GGC_NEWVAR,
	GGC_CNEWVAR): New macros.

From-SVN: r85133
2004-07-25 02:20:14 +02:00
Jan Hubicka b9dcdee46e ggc-common.c (ggc_alloc_cleared_stat, [...]): Rename from ...; make statistics transparent.
* ggc-common.c (ggc_alloc_cleared_stat, ggc_realloc_stat):
	Rename from ...; make statistics transparent.
	(ggc_alloc_cleared, ggc_realloc_stat): ... these.
	(loc_descriptor): New structure.
	(hash_descriptor, eq_descriptor, loc_descriptor, cmp_statistics,
	add_statistics):
	New static function.
	(ggc_record_overhead, dump_statistics): New global function.
	* ggc-none.c (ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat,
	ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Rename
	from ...; accept locations
	(ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared,
	ggc_realloc, ggc_alloc_typed):  ... this one.
	from ...; accept locations
	* ggc-page.c (ggc_alloc_typed_stat, ggc_alloc_zone_stat,
	ggc_alloc_stat): Rename from ... ; pass locations
	* ggc-page.c (ggc_alloc_typed, ggc_alloc_zone, ggc_alloc):
	... this one.
	(ggc_alloc_stat): Record overehead.
	* ggc.h (ggc_alloc_types, ggc_alloc, ggc_alloc_zone, ggc_alloc_cleared,
	ggc_realloc, ggc_alloc_typed):  Turn to macros
	(ggc_alloc_types_stat, ggc_alloc_stat, ggc_alloc_zone_stat,
	ggc_alloc_cleared_stat, ggc_realloc_stat, ggc_alloc_typed_stat): Declare.
	(dump_ggc_loc_satistics, ggc_record_overehead): Declare.
	* langhooks.h (lhd_make_node): Declare.
	(LANG_HOOKS_MAKE_TYPE): Default to new function,
	* langhooks.c (lhd_make_node): New.
	* rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Rename from ... ; pass
	locations.
	(rtx_alloc, swallow_copy_rtx): ... this one.
	* rtl.h (rtx_alloc, swallow_copy_rtx): Turn to macros.
	* rtl.c (rtx_alloc_stat, swallow_copy_rtx_stat): Declare.
	* toplpev.c (finalize): Dump stats.
	* tree.c (make_node_stat, copy_node_stat, make_tree_vec_stat,
	build_tree_list_stat, tree_cons_stat, build?_stat,  build_decl_stat):
	Rename from ... ; pass locators.
	(make_node, copy_node, make_tree_vec, build_tree_list, tree_cons,
	build?,  build_decl): Declare.
	* tree.h (make_node_stat, copy_node_stat, make_tree_vec_stat,
	build_tree_list_stat, tree_cons_stat, build?_stat,  build_decl_stat):
	Declare.
	(make_node, copy_node, make_tree_vec, build_tree_list, tree_cons,
	build?,  build_decl): New macros.
	* Makefile.in (RTL_H, TREE_H): Add statistics.h dependency.
	* statistics.h: New file.

From-SVN: r78826
2004-03-03 11:25:51 +00:00
Kazu Hirata 283334f011 alloc-pool.c, c-lex.c, c-pragma.h, c-semantics.c, cfghooks.c,
cfghooks.h, cfglayout.c, cfgloopmanip.c, debug.c, debug.h,
	flow.c, genextract.c, ggc-common.c, ggc-page.c, ggc.h,
	ifcvt.c, jump.c, loop-unswitch.c, timevar.c, timevar.def,
	tree-optimize.c, vmsdbgout.c, config/fp-bit.c,
	config/alpha/alpha.c, config/alpha/alpha.h,
	config/alpha/alpha.md, config/alpha/unicosmk.h,
	config/alpha/vms.h, config/arm/linux-elf.h, config/avr/avr.c,
	config/c4x/c4x-protos.h, config/c4x/c4x.md,
	config/d30v/d30v.h, config/frv/frv.md, config/frv/frvbegin.c,
	config/frv/frvend.c, config/i386/cygming.h,
	config/i386/djgpp.h, config/i386/emmintrin.h,
	config/i386/gthr-win32.c, config/i386/i386-interix.h,
	config/i386/i386-protos.h, config/i386/openbsd.h,
	config/i386/winnt.c, config/i386/xm-mingw32.h,
	config/i386/xmmintrin.h, config/ia64/ia64.md,
	config/iq2000/iq2000.md, config/m32r/m32r.md,
	config/m68k/m68k.md, config/mcore/mcore-elf.h,
	config/mcore/mcore.md, config/mips/elf.h, config/mips/elf64.h,
	config/mips/iris5gas.h, config/mips/iris6.h,
	config/mips/iris6gas.h, config/mips/linux.h,
	config/mips/mips.md, config/mips/netbsd.h,
	config/mips/openbsd.h, config/mips/windiss.h,
	config/pa/fptr.c, config/rs6000/aix.h,
	config/rs6000/altivec.h, config/rs6000/darwin.h,
	config/rs6000/xcoff.h, config/s390/s390-protos.h,
	config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
	config/sh/netbsd-elf.h, config/sh/sh.h, config/sh/vxworks.h,
	config/sparc/sol2.h: Update copyright.

From-SVN: r77018
2004-01-31 02:07:12 +00:00
Richard Henderson 685fe0325c ggc.h (ggc_free): Declare.
* ggc.h (ggc_free): Declare.
        * ggc-common.c (ggc_realloc): Use it.
        * ggc-page.c: Remove lots of inline markers.
        (globals): Add free_object_list.
        (ggc_alloc): Tidy.
        (ggc_free, validate_free_objects): New.
        (poison_pages): Provide default.
        (ggc_collect): Call validate_free_objects; emit markers to
        the debug file.

From-SVN: r76801
2004-01-28 10:49:26 -08:00
Richard Henderson 242d879216 Revert accidental commit.
From-SVN: r76675
2004-01-26 14:59:40 -08:00
Richard Henderson 6d4b0a5d57 c-parse.in (extension): Use itype.
* c-parse.in (extension): Use itype.
        (SAVE_EXT_FLAGS): Don't allocate a tree.
        (RESTORE_EXT_FLAGS): Don't read a tree.

From-SVN: r76674
2004-01-26 14:57:19 -08:00
Kazu Hirata 6614fd40d2 alias.c: Fix comment formatting.
* alias.c: Fix comment formatting.
	* alloc-pool.c: Likewise.
	* bitmap.c: Likewise.
	* bitmap.h: Likewise.
	* bt-load.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-decl.c: Likewise.
	* c-opts.c: Likewise.
	* c-pretty-print.c: Likewise.
	* caller-save.c: Likewise.
	* cfghooks.h: Likewise.
	* cgraph.c: Likewise.
	* collect2.c: Likewise.
	* cppfiles.c: Likewise.
	* cpplib.h: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* final.c: Likewise.
	* function.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genemit.c: Likewise.
	* ggc.h: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* libgcc2.h: Likewise.
	* loop.c: Likewise.
	* predict.h: Likewise.
	* unwind-libunwind.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r74907
2003-12-21 14:08:35 +00:00
Steven Bosscher 47aeffac9c ggc.h (struct alloc_zone): Move forward declaration up.
* ggc.h (struct alloc_zone): Move forward declaration up.
	(new_ggc_zone): New function prototype.
	(destroy_ggc_zone): Ditto.
	* ggc-simple.c (new_ggc_zone): New function, does nothing.
	(destroy_ggc_zone): Ditto.
	* ggc-page.c (new_ggc_zone): New function, does nothing.
	(destroy_ggc_zone): Ditto.
	* ggc-zone.c (struct page_entry): Fix comment.
	(ggc_alloc_typed): Use a switch statement instead of ifs.
	(new_ggc_zone): New function to set up a new GC zone.
	(destroy_ggc_zone): New function to remove a GC zone.
	init_ggc): Use new_ggc_zone to set up the default zones.
	(ggc_collect): Walk a list of zones, instead of just the
	default zones.  Report statistics using the zone name.

From-SVN: r74132
2003-12-01 22:59:30 +00:00
Daniel Berlin b6f611637e ggc-zone.c: New file, zone allocating collector.
2003-10-26  Daniel Berlin  <dberlin@dberlin.org>

	* ggc-zone.c:  New file, zone allocating collector.
	* configure: Accept zone option for --with-gc
	* configure.in: Ditto.
	* ggc.h (ggc_pch_count_object): Pass bool indicating
	stringiness. Update all callers.
	(ggc_pch_alloc_object): Ditto.
	(ggc_pch_write_object): Ditto.
	(ggc_alloc_rtx): Use typed allocation, since all RTX's are of a single
	type.
	(ggc_alloc_rtvec): Ditto.
	(ggc_alloc_tree): Use zone allocation, since some things using this macro
	aren't a single typecode.
	* ggc-none.c (ggc_alloc_typed): New function.
	(ggc_alloc_zone): Ditto.
	* ggc-page.c: Ditto on both functions.

From-SVN: r72971
2003-10-27 00:26:52 +00:00
Richard Sandiford e1de156021 rtl.h (rtl_size): Declare.
* rtl.h (rtl_size): Declare.
	(rtunion): Remove rtwint.
	(rtx_def): Replace 'fld' with a union of an rtunion or a HOST_WIDE_INT.
	(RTX_HDR_SIZE, RTX_SIZE): New macros.
	(RTL_CHECK1): Adjust for new rtx_def layout.
	(RTL_CHECK2, RTL_CHECKC1, RTL_CHECKC2): Likewise.
	(XWINT, XCWINT): Likewise.  Access the rtx structure directly.
	(X0WINT): Remove.
	(X0ANY): New macro.
	* rtl.def: Adjust comments for new rtx_def layout.
	* ggc.h (ggc_alloc_rtx): Take the rtx code as argument, not the
	number of slots.
	* rtl.c (rtx_size): New array.
	(rtx_alloc): Adjust call to ggc_alloc_rtx.  Use RTX_HDR_SIZE.
	(copy_rtx): Use RTX_HDR_SIZE.  Adjust for new rtx_def layout.
	(shallow_copy_rtx): Adjust call to ggc_alloc_rtx.  Use RTX_SIZE.
	* integrate.c (copy_rtx_and_substitute): Use X0ANY to copy '0' fields.
	* emit-rtl.c (copy_most_rtx): Likewise.
	(copy_rtx_if_shared): Use RTX_SIZE.
	(copy_insn_1): Use RTX_HDR_SIZE.  Adjust for new rtx_def layout.
	* gengenrtl.c (gendef): Adjust ggc_alloc_rtx call.  Use RTX_HDR_SIZE.
	* gengtype.c (write_rtx_next): Use RTX_HDR_SIZE.
	(adjust_field_rtx_def): Expect "rtx_def" to be a union rather than
	an array.  Adjust output for new rtx_def layout.
	* ggc-page.c (RTL_SIZE): Use RTX_HDR_SIZE.
	* reload1.c (eliminate_regs): Use RTX_SIZE.
	* rtlanal.c (loc_mentioned_in_p): Adjust for new rtx_def layout.
	* gdbinit.in (pi): Likewise.

From-SVN: r72647
2003-10-18 18:45:16 +00:00
Kazu Hirata 0ee55ad88a c-pretty-print.c: Fix comment formatting.
* c-pretty-print.c: Fix comment formatting.
	* cfglayout.c: Likewise.
	* cfgloopanal.c: Likewise.
	* cppcharset.c: Likewise.
	* dbxout.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc.h: Likewise.
	* target.h: Likewise.

From-SVN: r72110
2003-10-05 13:09:48 +00:00
Andrew Pinski d07605f570 re PR c/10962 (lookup_field is a linear search on a linked list (can be slow if large struct))
2003-07-16  Andrew Pinski  <pinskia@physics.uc.edu>
ChangeLog:
        PR c/10962
        * ggc.h: Add header guards.
        * c-decl.c (finish_struct): Sort fields if
        number greater than 15 and there are no
        anonymous structs/unions.
        * c-common.h: Include ggc.h.
        (sorted_fields_type): New struct.
        (field_decl_cmp): New prototype.
        (resort_sorted_fields): New prototype.
        (DECL_DECLARES_TYPE_NON_TEMPLATE_P): New macro.
        * c-tree.h: (lang_type): Use pointer to sorted_fields_type
        as s, removing other fields.
        * c-typeck.c (lookup_field): Use s in lang_type.
        These were mostly moved from cp/class.c:
        * c-common.c (field_decl_cmp): New static function.
        (field_decl_cmp): New function.
        (resort_sorted_fields): New function.
cp/ChangeLog:
        * class.c (field_decl_cmp): Remove.
        (resort_field_decl_cmp): Remove.
        (resort_sorted_fields): Remove.
        (add_fields_to_vec): Rename to ...
        (add_fields_to_record_type): this.
        (finish_struct_1): Change to be using
        sorted_fields_type's fields.
        * cp-tree.h (lang_decl): In lang_decl_u3
        change sorted_fields to be a pointer to
        sorted_fields_type.
        (resort_sorted_fields): Remove prototype.
        * search.c (lookup_field_1): Change to be using
        sorted_fields_type's fields.

From-SVN: r69470
2003-07-16 11:45:56 -07:00
Steven Bosscher bcda12f4f4 ggc.h, [...]: Use `rtx' instead of `struct rtx_def *'...
2003-07-10  Steven Bosscher  <steven@gcc.gnu.org>

	* ggc.h, integrate.h, langhooks.h, real.h, toplev.h:
	Use `rtx' instead of `struct rtx_def *', `rtvec' instead of
	`struct rtvec_dev *' and `tree' instead of `union tree_node *'
	in function prototypes.
	* varray.h (const_equiv_data): Likewise for fields.
	(varray_data_tag): Likewise.
	* output.h: Likewise, and don't forward declare union tree_node.
	* emit_rtl.c (const_int_htab_hash): Cast to `rtx' instead of
	`struct rtxvec *'.
	* print-tree.c (print_node): Likewise.
	* reload1.c: Don't redeclare current_function_decl, tree.h is
	included in this file.

From-SVN: r69183
2003-07-10 11:38:18 +00:00
Andreas Jaeger 1d088deebe gcc.c: Convert prototypes to ISO C90.
* gcc.c: Convert prototypes to ISO C90.
	* gcc.h: Likewise.
	* gcov-dump.c: Likewise.
	* gcov-iov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.h: Likewise.
	* ggc.h: Likewise.
	* global.c: Likewise.
	* graph.c: Likewise.
	* graph.h: Likewise.
	* hosthooks.h: Likewise.
	* hooks.h: Likewise.
	* hooks.c: Likewise.
	* hashtable.h: Likewise.
	* hashtable.c: Likewise.
	* haifa-sched.c: Likewise.
	* integrate.h: Likewise.
	* integrate.c: Likewise.
	* input.h: Likewise.
	* ifcvt.c: Likewise.

From-SVN: r68995
2003-07-06 08:15:36 +02:00
Kazu Hirata 39e3f58cbc ggc.h: Follow spelling conventions.
* ggc.h: Follow spelling conventions.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.

From-SVN: r68976
2003-07-05 15:39:59 +00:00
Kazu Hirata 6356f89288 ChangeLog: Follow spelling conventions.
* ChangeLog: Follow spelling conventions.
	* ChangeLog.2: Likewise.
	* c-decl.c: Likewise.
	* cfgloop.h: Likewise.
	* cgraph.c: Likewise.
	* coverage.c: Likewise.
	* cppcharset.c: Likewise.
	* cpphash.h: Likewise.
	* cpplex.c: Likewise.
	* cpplib.c: Likewise.
	* dbxout.c: Likewise.
	* df.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* explow.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gengtype.c: Likewise.
	* ggc.h: Likewise.
	* opts.c: Likewise.
	* real.c: Likewise.
	* reload.c: Likewise.
	* stmt.c: Likewise.

From-SVN: r67849
2003-06-12 19:01:08 +00:00
Andreas Jaeger 20c1dc5e9b ggc.h: Convert to ISO C90 prototypes.
* ggc.h: Convert to ISO C90 prototypes.
	* ggc-none.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc-simple.c: Likewise.

From-SVN: r67596
2003-06-07 20:35:35 +02:00
Matt Austern d24ecd21b3 cpppch.c (reset_ht): Remove.
* cpppch.c (reset_ht): Remove.
	(cpp_read_state): Remove loop to reset hashtable identifiers.
	* ggc-common.c (gt_pch_save): Add call to gt_pch_fixup_stringpool
	after pch file is written.
	* ggc.h (gt_pch_fixup_stringpool): Declare.
	* stringpool.c (ht_copy_and_clear): Define.  Callback.  Copy
	hashnode's value to another hashtable, then clear the original.
	(saved_ident_hash): Define.
	(gt_pch_save_stringpool): Create saved_ident_hash, use it to
	store definitions in ident_hash, and clear ident_hash.
	(gt_pch_fixup_stringpool): Define.  Restore definitions from
	saved_ident_hash to ident_hash, then destroy saved_ident_hash.

From-SVN: r65215
2003-04-03 21:00:56 +00:00
Kaveh R. Ghazi 9ac121af2a Makefile.in (ggc-common.o): Depend on $(PARAMS_H)
* Makefile.in (ggc-common.o): Depend on $(PARAMS_H)
	* doc/invoke.texi (ggc-min-expand, ggc-min-heapsize): Update
	documentation.
	* ggc-common.c: Include params.h
	(ggc_min_expand_heuristic, ggc_min_heapsize_heuristic,
	init_ggc_heuristics): New functions.
	* ggc.h (ggc_min_expand_heuristic, ggc_min_heapsize_heuristic,
	init_ggc_heuristics): Prototype.
	* toplev.c (print_version):  Output GGC heuristics.
	(parse_options_and_default_flags): Call init_ggc_heuristics.

From-SVN: r63268
2003-02-22 03:08:47 +00:00
Geoffrey Keating 17211ab553 Merge from pch-branch.
From-SVN: r61136
2003-01-10 02:22:34 +00:00
Kazu Hirata cc2902df52 dbxout.c: Follow spelling conventions.
* dbxout.c: Follow spelling conventions.
	* defaults.h: Likewise.
	* df.c: Likewise.
	* diagnostic.h: Likewise.
	* doloop.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* flags.h: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* genconfig.c: Likewise.
	* genrecog.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc.h: Likewise.
	* global.c: Likewise.
	* gthr-win32.h: Likewise.
	* integrate.c: Likewise.
	* jump.c: Likewise.
	* langhooks.c: Likewise.
	* langhooks.h: Likewise.
	* line-map.h: Likewise.
	* local-alloc.c: Likewise.
	* longlong.h: Likewise.
	* loop.c: Likewise.
	* loop.h: Likewise.

From-SVN: r57406
2002-09-22 14:09:34 +00:00
Geoffrey Keating 36a5eadd1a 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.

From-SVN: r57206
2002-09-16 18:33:23 +00:00
Geoffrey Keating ec52b446cc * ggc.h (ggc_add_root): Document as obsolete.
From-SVN: r55247
2002-07-04 21:24:25 +00:00
Kazu Hirata 589005ff21 gbl-ctors.h: Fix formatting.
* gbl-ctors.h: Fix formatting.
	* gcc.c: Likewise.
	* gccspec.c: Likewise.
	* gcov.c: Likewise.
	* gcov-io.h: Likewise.
	* gcse.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc.h: Likewise.
	* ggc-page.c: Likewise.
	* ggc-simple.c: Likewise.
	* global.c: Likewise.
	* graph.h: Likewise.
	* gthr-dce.h: Likewise.
	* gthr.h: Likewise.
	* gthr-posix.h: Likewise.
	* gthr-rtems.h: Likewise.
	* gthr-solaris.h: Likewise.
	* gthr-win32.h: Likewise.

From-SVN: r54240
2002-06-04 11:30:46 +00:00
Geoffrey Keating e2500fedef Merge from pch-branch up to tag pch-commit-20020603.
From-SVN: r54232
2002-06-04 07:11:05 +00:00
Kaveh R. Ghazi d875078437 varray.h (VARRAY_CHECK): Const-ify.
* varray.h (VARRAY_CHECK): Const-ify.
	* ggc.h (ggc_mark_rtx, ggc_mark_tree, ggc_mark_nonnull_tree,
	ggc_mark_rtvec, ggc_mark): Const-ify.

From-SVN: r51677
2002-04-01 05:08:51 +00:00
Neil Booth 31c816cfbd gcc-common.c (lang_mark_false_label_stack): Remove.
* gcc-common.c (lang_mark_false_label_stack): Remove.
	* ggc.h (lang_mark_false_label_stack): Similarly.
ada:
	* misc.c (ggc_p): Remove.

From-SVN: r51433
2002-03-27 07:30:52 +00:00
Neil Booth 4f0ade925d Makefile.in (ggc-common.o): Update.
* Makefile.in (ggc-common.o): Update.
	* c-decl.c (lang_mark_tree): Rename c_mark_tree.
	* c-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
	* c-tree.h (c_mark_tree): New.
	* ggc-common.c: Include langhooks.h.
	(gcc_mark_trees): Use new langhook.
	* ggc-callbacks.c: Delete file.
	* ggc.h (lang_mark_tree): Remove.
	* langhooks-def.h (LANG_HOOKS_MARK_TREE): New.
	(LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (struct lang_hooks): New hook.
ada:
	* misc.c (LANG_HOOKS_MARK_TREE): Redefine.
	(lang_mark_tree): Make static, rename.
cp:
	* cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
	* cp-tree.h (cxx_mark_tree): New.
	* decl.c (lang_mark_tree): Rename cxx_mark_tree.
f:
	* com.c (LANG_HOOKS_MARK_TREE): Redefine.
	(lang_mark_tree): Rename ffe_mark_tree, make static.
java:
	* decl.c (lang_mark_tree): Rename java_mark_tree.
	* java-tree.h (java_mark_tree): New.
	* java-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
objc:
	* objc-lang.c (LANG_HOOKS_MARK_TREE): Redefine.

From-SVN: r51369
2002-03-26 07:16:01 +00:00
Kazu Hirata eebedaa523 calls.c: Fix formatting.
* calls.c: Fix formatting.
	* c-decl.c: Likewise.
	* cfgcleanup.c: Likewise.
	* combine.c: Likewise.
	* cppfiles.c: Likewise.
	* cpplib.c: Likewise.
	* cppmacro.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* dwarf2out.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-page.c: Likewise.
	* integrate.c: Likewise.
	* libgcc2.c: Likewise.
	* loop.c: Likewise.
	* optabs.c: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* reload1.c: Likewise.
	* reload.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* sched-rgn.c: Likewise.
	* sdbout.c: Likewise.
	* stmt.c: Likewise.
	* toplev.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r46182
2001-10-11 12:43:43 +00:00
Richard Kenner 4c160717ca fold-const.c (hashtab.h): Include.
* fold-const.c (hashtab.h): Include.
	(int_const_binop): Remove FORSIZE arg and compute from type; all
	callers changed.
	Call size_int_type_wide for all single-word constants.
	(size_htab_hash, size_htab_eq): New functions.
	(size_int_type_wide): Rework to use hash table.
	* ggc-common.c (hashtab.h): Include.
	(struct d_htab_root): New struct.
	(d_htab_roots): New variable.
	(ggc_add_deletable_htab, ggc_htab_delete): New functions
	(ggc_mark_roots): Handle deletable htabs.
	* ggc-page.c (ggc_marked_p): New function.
	* ggc-simple.c (ggc_marked_p): Likewise.
	* ggc.h: Reformatting throughout.
	(ggc_marked_p, ggc_add_deletable_htab): New declarations.
	* tree.c (init_obstacks): Make type_hash_table a deletable root.
	(type_hash_add): Allocate struct type_hash from GC memory.
	(mark_hash_entry, mark_type_hash): Deleted.
	(type_hash_marked_p, type_hash_mark): New functions.
	* Makefile.in (ggc-common.o, fold-const.o): Include hashtab.h.

From-SVN: r45710
2001-09-20 11:12:54 -04:00
Lars Brinkhoff 1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Neil Booth 2a967f3d3a Makefile.in (OBJS, [...]): Update.
* Makefile.in (OBJS, LIBCPP_OBJS, LIBCPP_DEPS,
	cpplib.o, cpphash.o, fix-header): Update.
	(hashtable.o): New target.
	* c-common.h: Include cpplib.h.  Define C_RID_CODE and
	struct c_common_identifier here.
	* c-lang.c (c_init_options): Update.  Call set_identifier_size.
	* c-lex.c (c_lex): Update.
	* c-pragma.h: Update.
	* c-tree.h (struct lang_identifier): Contain c_common_identifier.
	Delete rid_code.
	(C_RID_CODE): Delete.
	* cpphash.c: Rewrite to use hashtable.c.
	* cpphash.h: Update include guards.
	(struct cpp_reader): Remove hashtab.
	hash_ob and buffer_ob are no longer pointers.  Add hash_table
	and our_hashtable.
	(HASHSTEP, _cpp_init_hashtable,	_cpp_lookup_with_hash): Delete.
	(_cpp_cleanup_hashtable): Rename _cpp_destroy_hashtable.
	(_cpp_cleanup_stacks): Rename _cpp_init_directives.
	* cppinit.c (cpp_create_reader): Update.
	* cpplex.c (cpp_ideq, parse_identifier, cpp_output_token): Update.
	(cpp_interpret_charconst): Eliminate warning.
	* cpplib.c (do_pragma, do_endif, push_conditional,
	cpp_push_buffer, cpp_pop_buffer): Update.
	(_cpp_init_stacks): Rename cpp_init_directives.
	(_cpp_cleanup_stacks): Remove.
	* cpplib.h: Update include guards.  Include tree-core.h and c-rid.h.
	(cpp_hashnode, cpp_token, NODE_LEN, NODE_NAME,
	 cpp_forall_identifiers, cpp_create_reader): Update.
	(C_RID_CODE, cpp_make_node): New.
	(c_common_identifier): New identifier node for C front ends.
	* cppmain.c (main): Update.
	* fix-header.c (read_scan_file): Update.
	* flags.h (id_clash_len): Make unsigned.
	* ggc.h (ggc_mark_nonnull_tree): New.
	* hashtable.c: New.
	* hashtable.h: New.
	* stringpool.c: Update comments and copyright.  Update to use
	hashtable.c.
	* toplev.c (approx_sqrt): Move to hashtable.c.
	(id_clash_len): Make unsigned.
	* toplev.h (ident_hash): New.
	* tree.c (gcc_obstack_init): Move to hashtable.c.
	* tree.h: Include hashtable.h.
	(IDENTIFIER_POINTER, IDENTIFIER_LENGTH): Update.
	(GCC_IDENT_TO_HT_IDENT, HT_IDENT_TO_GCC_IDENT): New.
	(struct tree_identifier): Update.
	(make_identifier): New.
cp:
	* cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
	(C_RID_CODE): Remove.
	* lex.c (cxx_init_options): Call set_identifier_size.  Update.
	(init_parse): Don't do it here.
objc:
	* objc-act.c (objc_init_options): Call set_identifier_size. Update.

From-SVN: r42334
2001-05-20 06:26:45 +00:00