1. 10 Dec, 2014 1 commit
  2. 20 Nov, 2014 1 commit
    • implement a replacement for if_marked · aebf76a2
      gcc/ChangeLog:
      
      2014-11-20  Trevor Saunders  <tsaunders@mozilla.com>
      
      	* doc/gty.texi: Document the new cache gty attribute.
      	* gengtype.c (finish_cache_funcs): New function.
      	(write_roots): Call gt_clear_cache on global variables with the cache
      	gty attribute.
      	* ggc-common.c (ggc_mark_roots): Call gt_clear_caches.
      	* ggc.h (gt_clear_caches): New declaration.
      	* hash-table.h (struct ggc_cache_hasher): New hasher for caches in gc
      	memory.
      	(gt_cleare_cache): New function.
      	* emit-rtl.c, rtl.h, tree.c: Use hash_table instead of htab.
      
      From-SVN: r217866
      Trevor Saunders committed
  3. 12 Oct, 2014 1 commit
    • move many gc hashtab to hash_table · 2a22f99c
      gcc/
      
      * asan.c, cfgloop.c, cfgloop.h, cgraph.c, cgraph.h,
      	config/darwin.c, config/m32c/m32c.c, config/mep/mep.c,
      	config/mips/mips.c, config/rs6000/rs6000.c, dwarf2out.c,
      	function.c, function.h, gimple-ssa.h, libfuncs.h, optabs.c,
      	output.h, rtl.h, sese.c, symtab.c, tree-cfg.c, tree-dfa.c,
      	tree-ssa.c, varasm.c: Use hash-table instead of hashtab.
      	* doc/gty.texi (for_user): Document new option.
      	* gengtype.c (create_user_defined_type): Don't try to get a struct for
      	char.
      	(walk_type): Don't error out on for_user option.
      	(write_func_for_structure): Emit user marking routines if requested by
      	for_user option.
      	(write_local_func_for_structure): Likewise.
      	(main): Mark types with for_user option as used.
      	* ggc.h (gt_pch_nx): Add overload for unsigned int.
      	* hash-map.h (hash_map::hash_entry::pch_nx_helper): AddOverloads.
      	* hash-table.h (ggc_hasher): New struct.
      	(hash_table::create_ggc): New function.
      	(gt_pch_nx): New overload for hash_table.
      
      java/
      
      	* class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
      	hash_table instead of hashtab.
      
      objc/
      
      	* objc-act.c: use hash_table instead of hashtab.
      
      cp/
      
      	* cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
      	pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
      	hashtab.
      
      fortran/
      
      	* trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab.
      
      c-family/
      
      	* c-common.c: Use hash_table instead of hashtab.
      
      From-SVN: r216127
      Trevor Saunders committed
  4. 02 Sep, 2014 1 commit
    • support ggc hash_map and hash_set · b086d530
      gcc/ChangeLog:
      
      	* alloc-pool.c: Include coretypes.h.
      	* cgraph.h, dbxout.c, dwarf2out.c, except.c, except.h, function.c,
      	function.h, symtab.c, tree-cfg.c, tree-eh.c: Use hash_map and
      	hash_set instead of htab.
      	* ggc-page.c (in_gc): New variable.
      	(ggc_free): Do nothing if a collection is taking place.
      	(ggc_collect): Set in_gc appropriately.
      	* ggc.h (gt_ggc_mx(const char *)): New function.
      	(gt_pch_nx(const char *)): Likewise.
      	(gt_ggc_mx(int)): Likewise.
      	(gt_pch_nx(int)): Likewise.
      	* hash-map.h (hash_map::hash_entry::ggc_mx): Likewise.
      	(hash_map::hash_entry::pch_nx): Likewise.
      	(hash_map::hash_entry::pch_nx_helper): Likewise.
      (hash_map::hash_map): Adjust.
      (hash_map::create_ggc): New function.
      (gt_ggc_mx): Likewise.
      (gt_pch_nx): Likewise.
      	* hash-set.h (default_hashset_traits::ggc_mx): Likewise.
      (default_hashset_traits::pch_nx): Likewise.
      (hash_set::hash_entry::ggc_mx): Likewise.
      (hash_set::hash_entry::pch_nx): Likewise.
      (hash_set::hash_entry::pch_nx_helper): Likewise.
      (hash_set::hash_set): Adjust.
      (hash_set::create_ggc): New function.
      (hash_set::elements): Likewise.
      (gt_ggc_mx): Likewise.
      (gt_pch_nx): Likewise.
      	* hash-table.h (hash_table::hash_table): Adjust.
      (hash_table::m_ggc): New member.
      	(hash_table::~hash_table): Adjust.
      	(hash_table::expand): Likewise.
      	(hash_table::empty): Likewise.
      (gt_ggc_mx): New function.
      	(hashtab_entry_note_pointers): Likewise.
      (gt_pch_nx): Likewise.
      
      From-SVN: r214834
      Trevor Saunders committed
  5. 25 May, 2014 1 commit
  6. 17 May, 2014 4 commits
    • add finalizers to ggc · de49ce19
      This implements finalizers by keeping a list of registered finalizers
      and after every mark but before sweeping check to see if any of them are
      for unmarked blocks.
      
      gcc/ChangeLog:
      
      	* ggc-common.c (ggc_internal_cleared_alloc): Adjust.
      	* ggc-none.c (ggc_internal_alloc): Assert if a finalizer is passed.
      	(ggc_internal_cleared_alloc): Likewise.
      	* ggc-page.c (finalizer): New class.
      (vec_finalizer): Likewise.
      	(globals::finalizers): New member.
      (globals::vec_finalizers): Likewise.
      	(ggc_internal_alloc): Record the finalizer if any for the block being
      	allocated.
      	(ggc_handle_finalizers): New function.
      	(ggc_collect): Call ggc_handle_finalizers.
      	* ggc.h (ggc_internal_alloc): Add arguments to allow installing a
      	finalizer.
      	(ggc_internal_cleared_alloc): Likewise.
      	(finalize): New function.
      	(need_finalization_p): Likewise.
      	(ggc_alloc): Install the type's destructor as the finalizer if it
      	might do something.
      	(ggc_cleared_alloc): Likewise.
      	(ggc_vec_alloc): Likewise.
      	(ggc_cleared_vec_alloc): Likewise.
      
      From-SVN: r210568
      Trevor Saunders committed
    • remove unused function · 04eec987
      gcc/ChangeLog:
      
      	*ggc.h (ggc_alloc_cleared_simd_clone_stat): Remove function.
      
      From-SVN: r210567
      Trevor Saunders committed
    • use templates instead of gengtype for typed allocation functions · 766090c2
      gcc/ChangeLog:
      
      	* alias.c (record_alias_subset): Adjust.
      	* bitmap.c (bitmap_element_allocate): Likewise.
      	(bitmap_gc_alloc_stat): Likewise.
      	* cfg.c (init_flow): Likewise.
      	(alloc_block): Likewise.
      	(unchecked_make_edge): Likewise.
      	* cfgloop.c (alloc_loop): Likewise.
      	(flow_loops_find): Likewise.
      	(rescan_loop_exit): Likewise.
      	* cfgrtl.c (init_rtl_bb_info): Likewise.
      	* cgraph.c (insert_new_cgraph_node_version): Likewise.
      	(cgraph_allocate_node): Likewise.
      	(cgraph_create_edge_1): Likewise.
      	(cgraph_allocate_init_indirect_info): Likewise.
      	* cgraphclones.c (cgraph_clone_edge): Likewise.
      	* cgraphunit.c (add_asm_node): Likewise.
      	(init_lowered_empty_function): Likewise.
      	* config/aarch64/aarch64.c (aarch64_init_machine_status):
      	Likewise.
      	* config/alpha/alpha.c (alpha_init_machine_status): Likewise.
      	(alpha_use_linkage): Likewise.
      	* config/arc/arc.c (arc_init_machine_status): Likewise.
      	* config/arm/arm.c (arm_init_machine_status): Likewise.
      	* config/avr/avr.c (avr_init_machine_status): Likewise.
      	* config/bfin/bfin.c (bfin_init_machine_status): Likewise.
      	* config/c6x/c6x.c (c6x_init_machine_status): Likewise.
      	* config/cris/cris.c (cris_init_machine_status): Likewise.
      	* config/darwin.c (machopic_indirection_name): Likewise.
      	(darwin_build_constant_cfstring): Likewise.
      	(darwin_enter_string_into_cfstring_table): Likewise.
      	* config/epiphany/epiphany.c (epiphany_init_machine_status):
      	* Likewise.
      	* config/frv/frv.c (frv_init_machine_status): Likewise.
      	* config/i386/i386.c (get_dllimport_decl): Likewise.
      	(ix86_init_machine_status): Likewise.
      	(assign_386_stack_local): Likewise.
      	* config/i386/winnt.c (i386_pe_record_external_function):
      	Likewise.
      	(i386_pe_maybe_record_exported_symbol): Likewise.
      	(i386_pe_record_stub): Likewise.
      	* config/ia64/ia64.c (ia64_init_machine_status): Likewise.
      	* config/iq2000/iq2000.c (iq2000_init_machine_status): Likewise.
      	* config/m32c/m32c.c (m32c_init_machine_status): Likewise.
      	(m32c_note_pragma_address): Likewise.
      	* config/mep/mep.c (mep_init_machine_status): Likewise.
      	(mep_note_pragma_flag): Likewise.
      	* config/mips/mips.c (mflip_mips16_use_mips16_p): Likewise.
      	(mips16_local_alias): Likewise.
      	(mips_init_machine_status): Likewise.
      	* config/mmix/mmix.c (mmix_init_machine_status): Likewise.
      	* config/moxie/moxie.c (moxie_init_machine_status): Likewise.
      	* config/msp430/msp430.c (msp430_init_machine_status): Likewise.
      	* config/nds32/nds32.c (nds32_init_machine_status): Likewise.
      	* config/nios2/nios2.c (nios2_init_machine_status): Likewise.
      	* config/pa/pa.c (pa_init_machine_status): Likewise.
      	(pa_get_deferred_plabel): Likewise.
      	* config/rl78/rl78.c (rl78_init_machine_status): Likewise.
      	* config/rs6000/rs6000.c (builtin_function_type): Likewise.
      	(rs6000_init_machine_status): Likewise.
      	(output_toc): Likewise.
      	* config/s390/s390.c (s390_init_machine_status): Likewise.
      	* config/score/score.c (score_output_external): Likewise.
      	* config/sparc/sparc.c (sparc_init_machine_status): Likewise.
      	* config/spu/spu.c (spu_init_machine_status): Likewise.
      	* config/tilegx/tilegx.c (tilegx_init_machine_status): Likewise.
      	* config/tilepro/tilepro.c (tilepro_init_machine_status):
      	* Likewise.
      	* config/xtensa/xtensa.c (xtensa_init_machine_status): Likewise.
      	* coverage.c (coverage_end_function): Likewise.
      	* dbxout.c (dbxout_init): Likewise.
      	* doc/gty.texi: Don't mention variable_size attribute.
      	* dwarf2cfi.c (new_cfi): Adjust.
      	(new_cfi_row): Likewise.
      	(copy_cfi_row): Likewise.
      	(create_cie_data): Likewise.
      	* dwarf2out.c (dwarf2out_alloc_current_fde): Likewise.
      	(new_loc_descr): Likewise.
      	(find_AT_string_in_table): Likewise.
      	(add_addr_table_entry): 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.
      	(add_loc_descr_to_each): Likewise.
      	(add_location_or_const_value_attribute): Likewise.
      	(add_linkage_name): Likewise.
      	(lookup_filename): Likewise.
      	(dwarf2out_var_location): Likewise.
      	(new_line_info_table): Likewise.
      	(dwarf2out_init): Likewise.
      	(mem_loc_descriptor): Likewise.
      	(loc_descriptor): Likewise.
      	(add_const_value_attribute): Likewise.
      	(tree_add_const_value_attribute): Likewise.
      	(comp_dir_string): Likewise.
      	(dwarf2out_vms_debug_main_pointer): Likewise.
      	(string_cst_pool_decl): Likewise.
      	* emit-rtl.c (set_mem_attrs): Likewise.
      	(get_reg_attrs): Likewise.
      	(start_sequence): Likewise.
      	(init_emit): Likewise.
      	(init_emit_regs): 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.
      	* function.c (add_frame_space): Likewise.
      	(insert_temp_slot_address): Likewise.
      	(assign_stack_temp_for_type): Likewise.
      	(get_hard_reg_initial_val): Likewise.
      	(allocate_struct_function): Likewise.
      	(prepare_function_start): Likewise.
      	(types_used_by_var_decl_insert): Likewise.
      	* gengtype.c (variable_size_p): Remove function.
      	(enum alloc_quantity): Remove enum.
      	(write_typed_alloc_def): Remove function.
      	(write_typed_struct_alloc_def): Likewise.
      	(write_typed_typedef_alloc_def): Likewise.
      	(write_typed_alloc_defns): Likewise.
      	(main): Adjust.
      	* ggc-common.c (ggc_cleared_alloc_htab_ignore_args): Adjust.
      	(ggc_cleared_alloc_ptr_array_two_args): Likewise.
      	* ggc.h (ggc_alloc): new function.
      	(ggc_cleared_alloc): Likewise.
      	(ggc_vec_alloc): Template on type of vector element, and remove
      	element size argument.
      	(ggc_cleared_vec_alloc): Likewise.
      	* gimple.c (gimple_build_omp_for): Adjust.
      	(gimple_copy): Likewise.
      	* ipa-cp.c (get_replacement_map): Likewise.
      	(find_aggregate_values_for_callers_subset): Likewise.
      	(known_aggs_to_agg_replacement_list): Likewise.
      	* ipa-devirt.c (get_odr_type): Likewise.
      	* ipa-prop.c (ipa_node_duplication_hook): Likewise.
      	(read_agg_replacement_chain): Likewise.
      	* loop-iv.c (get_simple_loop_desc): Likewise.
      	* lto-cgraph.c (input_node_opt_summary): Likewise.
      	* lto-section-in.c (lto_new_in_decl_state): Likewise.
      	* lto-streamer-in.c (lto_input_eh_catch_list): Likewise.
      	(input_eh_region): Likewise.
      	(input_eh_lp): Likewise.
      	(input_cfg): Likewise.
      	* optabs.c (set_optab_libfunc): Likewise.
      	(init_tree_optimization_optabs): Likewise.
      	(set_conv_libfunc): Likewise.
      	* passes.c (do_per_function_toporder): Likewise.
      	* rtl.h: Don't use variable_size gty attribute.
      	* sese.c (if_region_set_false_region): Adjust.
      	* stringpool.c (gt_pch_save_stringpool): Likewise.
      	* target-globals.c (save_target_globals): Likewise.
      	* toplev.c (general_init): Likewise.
      	* trans-mem.c (record_tm_replacement): Likewise.
      	(split_bb_make_tm_edge): Likewise.
      	* tree-cfg.c (move_sese_region_to_fn): Likewise.
      	* tree-data-ref.h (lambda_vector_new): Likewise.
      	* tree-eh.c (add_stmt_to_eh_lp_fn): Likewise.
      	* tree-iterator.c (tsi_link_before): Likewise.
      	(tsi_link_after): Likewise.
      	* tree-scalar-evolution.c (new_scev_info_str): Likewise.
      	* tree-ssa-loop-niter.c (record_estimate): Likewise.
      	* tree-ssa-operands.c (ssa_operand_alloc): Likewise.
      	* tree-ssa-operands.h: Don't use variable_size gty attribute.
      	* tree-ssa.c (init_tree_ssa): Adjust.
      	* tree-ssanames.c (set_range_info): Likewise.
      	(get_ptr_info): Likewise.
      	(duplicate_ssa_name_ptr_info): Likewise.
      	(duplicate_ssa_name_range_info): Likewise.
      	* tree-streamer-in.c (unpack_ts_real_cst_value_fields): Likewise.
      	(unpack_ts_fixed_cst_value_fields): Likewise.
      	* tree.c (build_fixed): Likewise.
      	(build_real): Likewise.
      	(build_string): Likewise.
      	(decl_priority_info): Likewise.
      	(decl_debug_expr_insert): Likewise.
      	(decl_value_expr_insert): Likewise.
      	(decl_debug_args_insert): Likewise.
      	(type_hash_add): Likewise.
      	(build_omp_clause): Likewise.
      	* ubsan.c (decl_for_type_insert): Likewise.
      	* varasm.c (get_unnamed_section): Likewise.
      	(get_noswitch_section): Likewise.
      	(get_section): Likewise.
      	(get_block_for_section): Likewise.
      	(create_block_symbol): Likewise.
      	(build_constant_desc): Likewise.
      	(create_constant_pool): Likewise.
      	(force_const_mem): Likewise.
      	(record_tm_clone_pair): Likewise.
      	* varpool.c (varpool_create_empty_node): Likewise.
      
      gcc/c/ChangeLog:
      
      	* c-decl.c (finish_struct): Adjust.
      	(finish_enum): Likewise.
      	(bind): Adjust.
      	(record_inline_static): Likewise.
      	(push_scope): Likewise.
      	(make_label): Likewise.
      	(lookup_label_for_goto): Likewise.
      	(finish_struct): Likewise.
      	(finish_enum): Likewise.
      	(store_parm_decls): Likewise.
      	(c_push_function_context): Likewise.
      	* c-lang.h: Remove usage of variable_size gty attribute.
      	* c-parser.c (c_parse_init): Adjust.
      	(c_parse_file): Likewise.
      
      gcc/java/ChangeLog:
      
      	* class.c (add_method_1): Adjust.
      	(java_treetreehash_new): Likewise.
      	* constants.c (set_constant_entry): Likewise.
      	(cpool_for_class): Likewise.
      	* decl.c (make_binding_level): Likewise.
      	(java_dup_lang_specific_decl): Likewise.
      	* expr.c (add_type_assertion): Likewise.
      	* java-tree.h (MAYBE_CREATE_VAR_LANG_DECL_SPECIFIC): Likewise.
      	(lang_decl): don't use variable_size gty attribute.
      	(MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Adjust.
      	(lang_type): Don't use variable_size gty attribute.
      	* jcf-parse.c (java_parse_file): Adjust.
      	(process_zip_dir): Likewise.
      	* jcf.h: Remove usage of variable_size gty attribute.
      	* jcf-reader.c (jcf_parse_constant_pool): Adjust.
      	(jcf_parse_bootstrap_methods): Likewise.
      
      gcc/objc/ChangeLog:
      
      	* objc-act.c (objc_build_string_object): Adjust.
      	(continue_class): Likewise.
      	* objc-act.h (ALLOC_OBJC_TYPE_LANG_SPECIFIC): Likewise.
      	* objc-map.c (objc_map_alloc_ggc): Likewise.
      	(objc_map_private_resize): Likewise.
      	* objc-next-runtime-abi-02.c (objc_next_runtime_abi_02_init):
      	Likewise.
      	(hash_name_enter): Likewise.
      
      gcc/cp/ChangeLog:
      
      	* class.c (sorted_fields_type_new): Adjust.
      	* cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Likewise.
      	* cp-objcp-common.c (decl_shadowed_for_var_insert): Likewise.
      	* cp-tree.h: Remove usage of variable_size gty attribute.
      	* decl.c (make_label_decl): Adjust.
      	(check_goto): Likewise.
      	(start_preparsed_function): Likewise.
      	(save_function_data): Likewise.
      	* lex.c (init_reswords): Likewise.
      	(retrofit_lang_decl): Likewise.
      	(cxx_dup_lang_specific_decl): Likewise.
      	(copy_lang_type): Likewise.
      	(cxx_make_type): Likewise.
      	* name-lookup.c (binding_entry_make): Likewise.
      	(binding_table_construct): Likewise.
      	(binding_table_new): Likewise.
      	(cxx_binding_make): Likewise.
      	(pushdecl_maybe_friend_1): Likewise.
      	(begin_scope): Likewise.
      	(push_to_top_level): Likewise.
      	* parser.c (cp_lexer_alloc): 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.
      	* pt.c (maybe_process_partial_specialization): Likewise.
      	(register_specialization): Likewise.
      	(add_pending_template): Likewise.
      	(lookup_template_class_1): Likewise.
      	(push_tinst_level): Likewise.
      	* semantics.c (register_constexpr_fundef): Likewise.
      	(cxx_eval_call_expression): Likewise.
      	* typeck2.c (abstract_virtuals_error_sfinae): Likewise.
      
      gcc/fortran/ChangeLog:
      
      	* f95-lang.c (pushlevel): Adjust.
      	* trans-decl.c (gfc_allocate_lang_decl): Adjust.
      	(gfc_find_module): Likewise.
      	* trans-types.c (gfc_get_nodesc_array_type): Likewise.
      	(gfc_get_array_type_bounds): Likewise.
      	(gfc_nonrestricted_type): Likewise.
      	* trans.h: Don't use variable_size gty attribute.
      
      gcc/ada/ChangeLog:
      
      	* gcc-interface/ada-tree.h: Remove usage of variable_size gty
      	annotation.
      	* gcc-interface/decl.c (annotate_value): Adjust.
      	* gcc-interface/trans.c (Attribute_to_gnu): Likewise.
      	(push_range_check_info): Likewise.
      	(Loop_Statement_to_gnu): Likewise.
      	(Subprogram_Body_to_gnu): Likewise.
      	(Compilation_Unit_to_gnu): Likewise.
      	(start_stmt_group): Likewise.
      	* gcc-interface/utils.c (init_gnat_utils): Likewise.
      	(gnat_pushlevel): Likewise.
      	(maybe_pad_type): Likewise.
      
      gcc/go/ChangeLog:
      
      	* go-lang.c (struct GTY): Don't use variable_size gty attribute.
      
      gcc/c-family/ChangeLog:
      
      	* c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
      	* c-pragma.c (push_alignment): Adjust.
      	(handle_pragma_push_options): Likewise.
      
      gcc/lto/ChangeLog:
      
      	* lto-tree.h: Don't use variable_size gty attribute.
      	* lto.c (lto_read_in_decl_state): Adjust.
      	(create_subid_section_table): Likewise.
      	(lto_flatten_files): Likewise.
      	(read_cgraph_and_symbols): Likewise.
      
      gcc/objcp/ChangeLog:
      
      	* objcp-decl.h: Adjust.
      
      From-SVN: r210566
      Trevor Saunders committed
    • rm a bunch of _stat allocation functions · 231120e5
      Now that we can use c++ default arguments there's no reason to use
      functions and wrapper macros.
      
      gcc/ChangeLog:
      
      	* dwarf2out.c (tree_add_const_value_attribute): Call
      	ggc_internal_cleared_alloc instead of ggc_alloc_cleared_atomic.
      	* gengtype.c (write_typed_alloc_def): Call ggc_internal_<x>alloc
      	instead of ggc_internal_<x>alloc_stat.
      	* ggc-common.c (ggc_internal_cleared_alloc): Drop _stat suffix.
      	(ggc_realloc): Likewise.
      	* ggc-none.c (ggc_internal_alloc): Likewise.
      	(ggc_internal_cleared_alloc): Likewise.
      	* ggc-page.c: Likewise.
      	* ggc.h (ggc_internal_alloc_stat): Likewise.
      	(ggc_internal_alloc): Remove macro.
      	(ggc_internal_cleared_alloc_stat): Drop _stat suffix.
      	(ggc_internal_cleared_alloc): Remove macro.
      	(GGC_RESIZEVEC): Adjust.
      	(ggc_resizevar): Remove macro.
      	(ggc_internal_vec_alloc_stat): Drop _stat suffix.
      	(ggc_internal_cleared_vec_alloc_stat): Likewise.
      	(ggc_internal_vec_cleared_alloc): Remove macro.
      	(ggc_alloc_atomic_stat): Drop _stat suffix.
      	(ggc_alloc_atomic): Remove macro.
      	(ggc_alloc_cleared_atomic): Remove macro.
      	(ggc_alloc_string_stat): Drop _stat suffix.
      	(ggc_alloc_string): Remove macro.
      	(ggc_alloc_rtx_def_stat): Adjust.
      	(ggc_alloc_tree_node_stat): Likewise.
      	(ggc_alloc_cleared_tree_node_stat): Likewise.
      	(ggc_alloc_cleared_gimple_statement_stat): Likewise.
      	(ggc_alloc_cleared_simd_clone_stat): Likewise.
      	* gimple.c (gimple_build_omp_for): Likewise.
      	(gimple_copy): Likewise.
      	* stringpool.c (ggc_alloc_string_stat): Drop _stat suffix.
      	* toplev.c (realloc_for_line_map): Adjust.
      	* tree-data-ref.h (lambda_vector_new): Likewise.
      	* tree-phinodes.c (allocate_phi_node): Likewise.
      	* tree.c (grow_tree_vec_stat): Likewise.
      	* vec.h (va_gc::reserve): Adjust.
      
      gcc/java/ChangeLog:
      
      	* constants.c (set_constant_entry): Adjust.
      
      From-SVN: r210565
      Trevor Saunders committed
  7. 07 Feb, 2014 1 commit
  8. 02 Jan, 2014 1 commit
  9. 27 Nov, 2013 1 commit
    • cgraph.h (enum cgraph_simd_clone_arg_type): New. · 0136f8f0
      	* cgraph.h (enum cgraph_simd_clone_arg_type): New.
      	(struct cgraph_simd_clone_arg, struct cgraph_simd_clone): New.
      	(struct cgraph_node): Add simdclone and simd_clones fields.
      	* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen,
      	ix86_simd_clone_adjust, ix86_simd_clone_usable): New functions.
      	(TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
      	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Define.
      	* doc/tm.texi.in (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
      	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Add.
      	* doc/tm.texi: Regenerated.
      	* ggc.h (ggc_alloc_cleared_simd_clone_stat): New function.
      	* ipa-cp.c (determine_versionability): Fail if "omp declare simd"
      	attribute is present.
      	* omp-low.c: Include pretty-print.h, ipa-prop.h and tree-eh.h.
      	(simd_clone_vector_of_formal_parm_types): New function.
      	(simd_clone_struct_alloc, simd_clone_struct_copy,
      	simd_clone_vector_of_formal_parm_types, simd_clone_clauses_extract,
      	simd_clone_compute_base_data_type, simd_clone_mangle,
      	simd_clone_create, simd_clone_adjust_return_type,
      	create_tmp_simd_array, simd_clone_adjust_argument_types,
      	simd_clone_init_simd_arrays): New functions.
      	(struct modify_stmt_info): New type.
      	(ipa_simd_modify_stmt_ops, ipa_simd_modify_function_body,
      	simd_clone_adjust, expand_simd_clones, ipa_omp_simd_clone): New
      	functions.
      	(pass_data_omp_simd_clone): New variable.
      	(pass_omp_simd_clone): New class.
      	(make_pass_omp_simd_clone): New function.
      	* passes.def (pass_omp_simd_clone): New.
      	* target.def (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
      	TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): New target
      	hooks.
      	* target.h (struct cgraph_node, struct cgraph_simd_node): Declare.
      	* tree-core.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): Document.
      	* tree.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): Define.
      	* tree-pass.h (make_pass_omp_simd_clone): New prototype.
      	* tree-vect-data-refs.c: Include cgraph.h.
      	(vect_analyze_data_refs): Inline by hand find_data_references_in_loop
      	and find_data_references_in_bb, if find_data_references_in_stmt
      	fails, still allow calls to #pragma omp declare simd functions
      	in #pragma omp simd loops unless they contain data references among
      	the call arguments or in lhs.
      	* tree-vect-loop.c (vect_determine_vectorization_factor): Handle
      	calls with no lhs.
      	(vect_transform_loop): Allow NULL STMT_VINFO_VECTYPE for calls without
      	lhs.
      	* tree-vectorizer.h (enum stmt_vec_info_type): Add
      	call_simd_clone_vec_info_type.
      	(struct _stmt_vec_info): Add simd_clone_fndecl field.
      	(STMT_VINFO_SIMD_CLONE_FNDECL): Define.
      	* tree-vect-stmts.c: Include tree-ssa-loop.h,
      	tree-scalar-evolution.h and cgraph.h.
      	(vectorizable_call): Handle calls without lhs.  Assert
      	!stmt_can_throw_internal instead of failing for it.  Don't update
      	EH stuff.
      	(struct simd_call_arg_info): New.
      	(vectorizable_simd_clone_call): New function.
      	(vect_transform_stmt): Call it.
      	(vect_analyze_stmt): Likewise.  Allow NULL STMT_VINFO_VECTYPE for
      	calls without lhs.
      	* ipa-prop.c (ipa_add_new_function): Only call ipa_analyze_node
      	if cgraph_function_with_gimple_body_p is true.
      c/
      	* c-decl.c (c_builtin_function_ext_scope): Avoid binding if
      	external_scope is NULL.
      cp/
      	* semantics.c (finish_omp_clauses): For #pragma omp declare simd
      	linear clause step call maybe_constant_value.
      testsuite/
      	* g++.dg/gomp/declare-simd-1.C (f38): Make sure
      	simdlen is a power of two.
      	* gcc.dg/gomp/simd-clones-2.c: Compile on all targets.
      	Remove -msse2.  Adjust regexps for name mangling changes.
      	* gcc.dg/gomp/simd-clones-3.c: Likewise.
      	* gcc.dg/vect/vect-simd-clone-1.c: New test.
      	* gcc.dg/vect/vect-simd-clone-2.c: New test.
      	* gcc.dg/vect/vect-simd-clone-3.c: New test.
      	* gcc.dg/vect/vect-simd-clone-4.c: New test.
      	* gcc.dg/vect/vect-simd-clone-5.c: New test.
      	* gcc.dg/vect/vect-simd-clone-6.c: New test.
      	* gcc.dg/vect/vect-simd-clone-7.c: New test.
      	* gcc.dg/vect/vect-simd-clone-8.c: New test.
      	* gcc.dg/vect/vect-simd-clone-9.c: New test.
      	* gcc.dg/vect/vect-simd-clone-10.c: New test.
      	* gcc.dg/vect/vect-simd-clone-10.h: New file.
      	* gcc.dg/vect/vect-simd-clone-10a.c: New file.
      	* gcc.dg/vect/vect-simd-clone-11.c: New test.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r205442
      Aldy Hernandez committed
  10. 19 Nov, 2013 1 commit
    • Convert gimple types from a union to C++ inheritance · daa6e488
      Patch partially autogenerated by refactor_gimple.py from
      https://github.com/davidmalcolm/gcc-refactoring-scripts
      revision 05fc808c61bd8ddd2372f29b79ceb2491360d298
      
      	* Makefile.in (GIMPLE_H): Add dep on is-a.h.
      	* coretypes.h (union gimple_statement_d): Remove declaration.
      	(gimple): Convert from being a "union gimple_statement_d *"
      	to a "struct gimple_statement_base *".
      	(const_gimple): Likewise (with "const").
      	* ggc.h (ggc_alloc_cleared_gimple_statement_d_stat): Replace
      	with...
      	(ggc_alloc_cleared_gimple_statement_stat): ...this.
      	* gimple-pretty-print.c (debug): Change parameter from a
      	"gimple_statement_d &" to a "gimple_statement_base &".
      	(debug): Change parameter from a "gimple_statement_d *" to
      	a "gimple_statement_base *".
      	* gimple-pretty-print.h (debug): Update declarations as above.
      	* gimple.c (gimple_alloc_stat): Update for renaming of
      	ggc_alloc_cleared_gimple_statement_d_stat to
      	ggc_alloc_cleared_gimple_statement_stat.
      	* gimple.h: Include "is-a.h" for use by is_a_helper
      	specializations in followup autogenerated patch.
      	(struct gimple statement_base): Make this type usable as a base
      	class by adding "desc", "tag" and "variable_size" to GTY, thus
      	using opting-in to gengtype's support for simple inheritance.
      	(gimple_statement_with_ops_base): Convert to a subclass of
      	gimple_statement_base, dropping initial "gsbase" field.  Note
      	that this type is abstract, with no GSS_ value, and thus no GTY
      	tag value.
      	(gimple_statement_with_ops): Convert to a subclass of
      	gimple_statement_with_ops_base, dropping initial "opbase" field.
      	Add tag value to GTY marking.  Update marking of op field to
      	reflect how num_ops field is accessed via inheritance.
      	(gimple_statement_with_memory_ops_base): Convert to a subclass of
      	gimple_statement_with_ops_base, dropping initial "opbase" field.
      	Add tag value to GTY marking.
      	(gimple_statement_with_memory_ops): Convert to a subclass of
      	public gimple_statement_with_memory_ops_base, dropping initial
      	"membase" field.  Add tag value to GTY marking.  Update marking
      	of op field to reflect how num_ops field is accessed via
      	inheritance.
      	(gimple_statement_call): Analogous changes that also update the
      	marking of the "u" union.
      	(gimple_statement_omp): Convert to a subclass of
      	gimple_statement_base, dropping initial "gsbase" field, adding
      	tag value to GTY marking.
      	(gimple_statement_bind): Likewise.
      	(gimple_statement_catch): Likewise.
      	(gimple_statement_eh_filter): Likewise.
      	(gimple_statement_eh_else): Likewise.
      	(gimple_statement_eh_mnt): Likewise.
      	(gimple_statement_phi): Likewise.
      	(gimple_statement_eh_ctrl): Likewise.
      	(gimple_statement_try): Likewise.
      	(gimple_statement_wce): Likewise.
      	(gimple_statement_asm): Convert to a subclass of
      	gimple_statement_with_memory_ops_base, dropping initial
      	"membase" field, adding tag value to GTY marking, and updating
      	marking of op field.
      	(gimple_statement_omp_critical): Convert to a subclass of
      	gimple_statement_omp, dropping initial "omp" field, adding tag
      	value to GTY marking.
      	(gimple_statement_omp_for): Likewise.
      	(gimple_statement_omp_parallel): Likewise.
      	(gimple_statement_omp_task): Convert to a subclass of
      	gimple_statement_omp_parallel, dropping initial "par" field,
      	adding tag value to GTY marking.
      	(gimple_statement_omp_sections): Convert to a subclass of
      	gimple_statement_omp, dropping initial "omp" field, adding
      	tag value to GTY marking.
      	(gimple_statement_omp_continue): Convert to a subclass of
      	gimple_statement_base, dropping initial "gsbase" field, adding
      	tag value to GTY marking.
      	(gimple_statement_omp_single): Convert to a subclass of
      	gimple_statement_omp, dropping initial "omp" field, adding
      	tag value to GTY marking.
      	(gimple_statement_omp_atomic_load): Convert to a subclass of
      	gimple_statement_base, dropping initial "gsbase" field, adding
      	tag value to GTY marking.
      	(gimple_statement_omp_atomic_store): Convert to a subclass of
      	gimple_statement_base, dropping initial "gsbase" field, adding
      	tag value to GTY marking.
      	(gimple_statement_transaction): Convert to a subclass of
      	gimple_statement_with_memory_ops_base, dropping initial "gsbase"
      	field, adding tag value to GTY marking.
      	(union gimple_statement_d): Remove.
      	* system.h (CONST_CAST_GIMPLE): Update to use
      	"struct gimple_statement_base *" rather than
      	"union gimple_statement_d *".
      	* tree-ssa-ccp.c (gimple_htab): Convert underlying type from
      	gimple_statement_d to gimple_statement_base.
      
      	* gimple.h (gimple_use_ops): Port from union to usage of
      	dyn_cast.
      	(gimple_set_use_ops): Port from union to usage of as_a.
      	(gimple_set_vuse): Likewise.
      	(gimple_set_vdef): Likewise.
      	(gimple_call_internal_fn): Port from union to a static_cast,
      	given that the type has already been asserted.
      	(gimple_omp_body_ptr): Port from unchecked union usage to
      	a static_cast.
      	(gimple_omp_set_body): Likewise.
      
      	* gimple-iterator.c (update_bb_for_stmts): Update for conversion of
      	gimple types to a true class hierarchy.
      	(update_call_edge_frequencies): Likewise.
      	(gsi_insert_seq_nodes_before): Likewise.
      	(gsi_insert_seq_nodes_after): Likewise.
      	(gsi_split_seq_after): Likewise.
      	(gsi_set_stmt): Likewise.
      	(gsi_split_seq_before): Likewise.
      	(gsi_remove): Likewise.
      	* gimple-iterator.h (gsi_one_before_end_p): Likewise.
      	(gsi_next): Likewise.
      	(gsi_prev): Likewise.
      	* gimple-pretty-print.c (dump_gimple_debug): Likewise.
      	* gimple-ssa.h (gimple_vuse_op): Likewise.
      	(gimple_vdef_op): Likewise.
      	* gimple-streamer-in.c (input_gimple_stmt): Likewise.
      	* gimple-streamer-out.c (output_gimple_stmt): Likewise.
      	* gimple.c (gimple_set_code): Likewise.
      	(gimple_alloc_stat): Likewise.
      	(gimple_set_subcode): Likewise.
      	(gimple_build_call_internal_1): Likewise.
      	(gimple_check_failed): Likewise.
      	(gimple_call_flags): Likewise.
      	(gimple_set_bb): Likewise.
      	* gimple.h (is_a_helper <gimple_statement_asm> (gimple)): New.
      	(is_a_helper <gimple_statement_bind> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_call> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_catch> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_eh_ctrl> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_eh_else> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_eh_filter> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_eh_mnt> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_atomic_load> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_atomic_store> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_continue> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_critical> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_for> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_parallel> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_sections> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_single> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_omp_task> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_phi> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_transaction> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_try> (gimple)): Likewise.
      	(is_a_helper <gimple_statement_wce> (gimple)): Likewise.
      	(is_a_helper <const gimple_statement_asm> (const_gimple)): Likewise.
      	(is_a_helper <const gimple_statement_bind> (const_gimple)): Likewise.
      	(is_a_helper <const gimple_statement_call> (const_gimple)): Likewise.
      	(is_a_helper <const gimple_statement_catch> (const_gimple)): Likewise.
      	(is_a_helper <const gimple_statement_eh_ctrl> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_eh_filter> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_omp_atomic_load> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_omp_atomic_store>
      	(const_gimple)): Likewise.
      	(is_a_helper <const gimple_statement_omp_continue> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_omp_critical> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_omp_for> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_omp_parallel> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_omp_sections> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_omp_single> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_omp_task> (const_gimple)):
      	Likewise.
      	(is_a_helper <const gimple_statement_phi> (const_gimple)): Likewise.
      	(is_a_helper <const gimple_statement_transaction> (const_gimple)):
      	Likewise.
      	(gimple_seq_last): Update for conversion of gimple types to a true
      	class hierarchy.
      	(gimple_seq_set_last): Likewise.
      	(gimple_code): Likewise.
      	(gimple_bb): Likewise.
      	(gimple_block): Likewise.
      	(gimple_set_block): Likewise.
      	(gimple_location): Likewise.
      	(gimple_location_ptr): Likewise.
      	(gimple_set_location): Likewise.
      	(gimple_no_warning_p): Likewise.
      	(gimple_set_no_warning): Likewise.
      	(gimple_set_visited): Likewise.
      	(gimple_visited_p): Likewise.
      	(gimple_set_plf): Likewise.
      	(gimple_plf): Likewise.
      	(gimple_set_uid): Likewise.
      	(gimple_uid): Likewise.
      	(gimple_init_singleton): Likewise.
      	(gimple_modified_p): Likewise.
      	(gimple_set_modified): Likewise.
      	(gimple_expr_code): Likewise.
      	(gimple_has_volatile_ops): Likewise.
      	(gimple_set_has_volatile_ops): Likewise.
      	(gimple_omp_subcode): Likewise.
      	(gimple_omp_set_subcode): Likewise.
      	(gimple_omp_return_set_nowait): Likewise.
      	(gimple_omp_section_set_last): Likewise.
      	(gimple_omp_parallel_set_combined_p): Likewise.
      	(gimple_omp_atomic_set_need_value): Likewise.
      	(gimple_omp_atomic_set_seq_cst): Likewise.
      	(gimple_num_ops): Likewise.
      	(gimple_set_num_ops): Likewise.
      	(gimple_assign_nontemporal_move_p): Likewise.
      	(gimple_assign_set_nontemporal_move): Likewise.
      	(gimple_assign_rhs_code): Likewise.
      	(gimple_assign_set_rhs_code): Likewise.
      	(gimple_call_internal_p): Likewise.
      	(gimple_call_with_bounds_p): Likewise.
      	(gimple_call_set_with_bounds): Likewise.
      	(gimple_call_set_tail): Likewise.
      	(gimple_call_tail_p): Likewise.
      	(gimple_call_set_return_slot_opt): Likewise.
      	(gimple_call_return_slot_opt_p): Likewise.
      	(gimple_call_set_from_thunk): Likewise.
      	(gimple_call_from_thunk_p): Likewise.
      	(gimple_call_set_va_arg_pack): Likewise.
      	(gimple_call_va_arg_pack_p): Likewise.
      	(gimple_call_set_nothrow): Likewise.
      	(gimple_call_set_alloca_for_var): Likewise.
      	(gimple_call_alloca_for_var_p): Likewise.
      	(gimple_call_copy_flags): Likewise.
      	(gimple_cond_code): Likewise.
      	(gimple_cond_set_code): Likewise.
      	(gimple_cond_make_false): Likewise.
      	(gimple_cond_make_true): Likewise.
      	(gimple_asm_volatile_p): Likewise.
      	(gimple_asm_set_volatile): Likewise.
      	(gimple_asm_set_input): Likewise.
      	(gimple_asm_input_p): Likewise.
      	(gimple_try_kind): Likewise.
      	(gimple_try_set_kind): Likewise.
      	(gimple_try_catch_is_cleanup): Likewise.
      	(gimple_try_set_catch_is_cleanup): Likewise.
      	(gimple_wce_cleanup_eh_only): Likewise.
      	(gimple_wce_set_cleanup_eh_only): Likewise.
      	(gimple_debug_bind_p): Likewise.
      	(gimple_debug_source_bind_p): Likewise.
      	(gimple_omp_for_set_kind): Likewise.
      	(gimple_omp_for_set_combined_p): Likewise.
      	(gimple_omp_for_set_combined_into_p): Likewise.
      	(gimple_omp_target_set_kind): Likewise.
      	(gimple_transaction_subcode): Likewise.
      	(gimple_transaction_set_subcode): Likewise.
      	(gimple_predict_predictor): Likewise.
      	(gimple_predict_set_predictor): Likewise.
      	(gimple_predict_outcome): Likewise.
      	(gimple_predict_set_outcome): Likewise.
      	(gimple_transaction_set_label): Likewise.
      	(gimple_transaction_set_body): Likewise.
      	(gimple_transaction_label_ptr): Likewise.
      	(gimple_transaction_label): Likewise.
      	(gimple_transaction_body_ptr): Likewise.
      	(gimple_omp_continue_set_control_use): Likewise.
      	(gimple_omp_continue_control_use_ptr): Likewise.
      	(gimple_omp_continue_control_use): Likewise.
      	(gimple_omp_continue_set_control_def): Likewise.
      	(gimple_omp_continue_control_def_ptr): Likewise.
      	(gimple_omp_continue_control_def): Likewise.
      	(gimple_omp_atomic_load_rhs_ptr): Likewise.
      	(gimple_omp_atomic_load_rhs): Likewise.
      	(gimple_omp_atomic_load_set_rhs): Likewise.
      	(gimple_omp_atomic_load_lhs_ptr): Likewise.
      	(gimple_omp_atomic_load_lhs): Likewise.
      	(gimple_omp_atomic_load_set_lhs): Likewise.
      	(gimple_omp_atomic_store_val_ptr): Likewise.
      	(gimple_omp_atomic_store_val): Likewise.
      	(gimple_omp_atomic_store_set_val): Likewise.
      	(gimple_omp_for_cond): Likewise.
      	(gimple_omp_for_set_cond): Likewise.
      	(gimple_omp_sections_set_control): Likewise.
      	(gimple_omp_sections_control_ptr): Likewise.
      	(gimple_omp_sections_control): Likewise.
      	(gimple_omp_sections_set_clauses): Likewise.
      	(gimple_omp_sections_clauses_ptr): Likewise.
      	(gimple_omp_sections_clauses): Likewise.
      	(gimple_omp_teams_set_clauses): Likewise.
      	(gimple_omp_teams_clauses_ptr): Likewise.
      	(gimple_omp_teams_clauses): Likewise.
      	(gimple_omp_target_set_data_arg): Likewise.
      	(gimple_omp_target_data_arg_ptr): Likewise.
      	(gimple_omp_target_data_arg): Likewise.
      	(gimple_omp_target_set_child_fn): Likewise.
      	(gimple_omp_target_child_fn_ptr): Likewise.
      	(gimple_omp_target_child_fn): Likewise.
      	(gimple_omp_target_set_clauses): Likewise.
      	(gimple_omp_target_clauses_ptr): Likewise.
      	(gimple_omp_target_clauses): Likewise.
      	(gimple_omp_single_set_clauses): Likewise.
      	(gimple_omp_single_clauses_ptr): Likewise.
      	(gimple_omp_single_clauses): Likewise.
      	(gimple_omp_task_set_arg_align): Likewise.
      	(gimple_omp_task_arg_align_ptr): Likewise.
      	(gimple_omp_task_arg_align): Likewise.
      	(gimple_omp_task_set_arg_size): Likewise.
      	(gimple_omp_task_arg_size_ptr): Likewise.
      	(gimple_omp_task_arg_size): Likewise.
      	(gimple_omp_task_set_copy_fn): Likewise.
      	(gimple_omp_task_copy_fn_ptr): Likewise.
      	(gimple_omp_task_copy_fn): Likewise.
      	(gimple_omp_task_set_data_arg): Likewise.
      	(gimple_omp_task_data_arg_ptr): Likewise.
      	(gimple_omp_task_data_arg): Likewise.
      	(gimple_omp_task_set_child_fn): Likewise.
      	(gimple_omp_task_child_fn_ptr): Likewise.
      	(gimple_omp_task_child_fn): Likewise.
      	(gimple_omp_task_set_clauses): Likewise.
      	(gimple_omp_task_clauses_ptr): Likewise.
      	(gimple_omp_task_clauses): Likewise.
      	(gimple_omp_parallel_set_data_arg): Likewise.
      	(gimple_omp_parallel_data_arg_ptr): Likewise.
      	(gimple_omp_parallel_data_arg): Likewise.
      	(gimple_omp_parallel_set_child_fn): Likewise.
      	(gimple_omp_parallel_child_fn_ptr): Likewise.
      	(gimple_omp_parallel_child_fn): Likewise.
      	(gimple_omp_parallel_set_clauses): Likewise.
      	(gimple_omp_parallel_clauses_ptr): Likewise.
      	(gimple_omp_parallel_clauses): Likewise.
      	(gimple_omp_for_set_pre_body): Likewise.
      	(gimple_omp_for_pre_body_ptr): Likewise.
      	(gimple_omp_for_set_incr): Likewise.
      	(gimple_omp_for_incr_ptr): Likewise.
      	(gimple_omp_for_incr): Likewise.
      	(gimple_omp_for_set_final): Likewise.
      	(gimple_omp_for_final_ptr): Likewise.
      	(gimple_omp_for_final): Likewise.
      	(gimple_omp_for_set_initial): Likewise.
      	(gimple_omp_for_initial_ptr): Likewise.
      	(gimple_omp_for_initial): Likewise.
      	(gimple_omp_for_set_index): Likewise.
      	(gimple_omp_for_index_ptr): Likewise.
      	(gimple_omp_for_index): Likewise.
      	(gimple_omp_for_collapse): Likewise.
      	(gimple_omp_for_set_clauses): Likewise.
      	(gimple_omp_for_clauses_ptr): Likewise.
      	(gimple_omp_for_clauses): Likewise.
      	(gimple_omp_critical_set_name): Likewise.
      	(gimple_omp_critical_name_ptr): Likewise.
      	(gimple_omp_critical_name): Likewise.
      	(gimple_eh_dispatch_set_region): Likewise.
      	(gimple_eh_dispatch_region): Likewise.
      	(gimple_resx_set_region): Likewise.
      	(gimple_resx_region): Likewise.
      	(gimple_phi_set_arg): Likewise.
      	(gimple_phi_arg): Likewise.
      	(gimple_phi_set_result): Likewise.
      	(gimple_phi_result_ptr): Likewise.
      	(gimple_phi_result): Likewise.
      	(gimple_phi_num_args): Likewise.
      	(gimple_phi_capacity): Likewise.
      	(gimple_wce_set_cleanup): Likewise.
      	(gimple_wce_cleanup_ptr): Likewise.
      	(gimple_try_set_cleanup): Likewise.
      	(gimple_try_set_eval): Likewise.
      	(gimple_try_cleanup_ptr): Likewise.
      	(gimple_try_eval_ptr): Likewise.
      	(gimple_eh_else_set_e_body): Likewise.
      	(gimple_eh_else_set_n_body): Likewise.
      	(gimple_eh_else_e_body_ptr): Likewise.
      	(gimple_eh_else_n_body_ptr): Likewise.
      	(gimple_eh_must_not_throw_set_fndecl): Likewise.
      	(gimple_eh_must_not_throw_fndecl): Likewise.
      	(gimple_eh_filter_set_failure): Likewise.
      	(gimple_eh_filter_set_types): Likewise.
      	(gimple_eh_filter_failure_ptr): Likewise.
      	(gimple_eh_filter_types_ptr): Likewise.
      	(gimple_eh_filter_types): Likewise.
      	(gimple_catch_set_handler): Likewise.
      	(gimple_catch_set_types): Likewise.
      	(gimple_catch_handler_ptr): Likewise.
      	(gimple_catch_types_ptr): Likewise.
      	(gimple_catch_types): Likewise.
      	(gimple_asm_string): Likewise.
      	(gimple_asm_set_label_op): Likewise.
      	(gimple_asm_label_op): Likewise.
      	(gimple_asm_set_clobber_op): Likewise.
      	(gimple_asm_clobber_op): Likewise.
      	(gimple_asm_set_output_op): Likewise.
      	(gimple_asm_output_op_ptr): Likewise.
      	(gimple_asm_output_op): Likewise.
      	(gimple_asm_set_input_op): Likewise.
      	(gimple_asm_input_op_ptr): Likewise.
      	(gimple_asm_input_op): Likewise.
      	(gimple_asm_nlabels): Likewise.
      	(gimple_asm_nclobbers): Likewise.
      	(gimple_asm_noutputs): Likewise.
      	(gimple_asm_ninputs): Likewise.
      	(gimple_bind_set_block): Likewise.
      	(gimple_bind_block): Likewise.
      	(gimple_bind_add_seq): Likewise.
      	(gimple_bind_add_stmt): Likewise.
      	(gimple_bind_set_body): Likewise.
      	(gimple_bind_body_ptr): Likewise.
      	(gimple_bind_append_vars): Likewise.
      	(gimple_bind_set_vars): Likewise.
      	(gimple_bind_vars): Likewise.
      	(gimple_call_clobber_set): Likewise.
      	(gimple_call_use_set): Likewise.
      	(gimple_call_set_internal_fn): Likewise.
      	(gimple_call_set_fntype): Likewise.
      	(gimple_call_fntype): Likewise.
      	(gimple_omp_return_lhs_ptr): Likewise.
      	(gimple_omp_return_lhs): Likewise.
      	(gimple_omp_return_set_lhs): Likewise.
      	(gimple_omp_taskreg_set_data_arg): Likewise.
      	(gimple_omp_taskreg_data_arg_ptr): Likewise.
      	(gimple_omp_taskreg_data_arg): Likewise.
      	(gimple_omp_taskreg_set_child_fn): Likewise.
      	(gimple_omp_taskreg_child_fn_ptr): Likewise.
      	(gimple_omp_taskreg_child_fn): Likewise.
      	(gimple_omp_taskreg_set_clauses): Likewise.
      	(gimple_omp_taskreg_clauses_ptr): Likewise.
      	(gimple_omp_taskreg_clauses): Likewise.
      	(gimple_vuse): Likewise.
      	(gimple_vdef): Likewise.
      	(gimple_vuse_ptr): Likewise.
      	(gimple_vdef_ptr): Likewise.
      	* tree-inline.c (copy_debug_stmt): Likewise.
      	* tree-phinodes.c (make_phi_node): Likewise.
      
      	* gimple.h (is_a_helper <const gimple_statement_with_ops>::test): New.
      	(is_a_helper <gimple_statement_with_ops>::test): New.
      	(is_a_helper <const gimple_statement_with_memory_ops>::test): New.
      	(is_a_helper <gimple_statement_with_memory_ops>::test): New.
      
      	* gimple-streamer-in.c (input_gimple_stmt): Port from union
      	access to use of as_a.
      	* gimple.c (gimple_build_asm_1): Likewise.
      	(gimple_build_try): Likewise.  Also, return a specific subclass
      	rather than just gimple.
      	(gimple_build_resx): Port from union access to use of as_a.
      	(gimple_build_eh_dispatch): Likewise.
      	(gimple_build_omp_for): Likewise.  Also, convert allocation of iter
      	now that gengtype no longer provides a typed allocator function.
      	(gimple_copy): Likewise.
      	* gimple.h (gimple_build_try): Return a specific subclass rather
      	than just gimple.
      	* gimplify.c (gimplify_cleanup_point_expr): Replace union access
      	with subclass access by making use of new return type of
      	gimple_build_try.
      	* tree-phinodes.c: (allocate_phi_node): Return a
      	"gimple_statement_phi *" rather than just a gimple.
      	(resize_phi_node): Likewise.
      	(make_phi_node): Replace union access with subclass access by
      	making use of new return type of allocate_phi_node.
      	(reserve_phi_args_for_new_edge): Replace union access with as_a.
      	(remove_phi_arg_num): Accept a "gimple_statement_phi *" rather
      	than just a gimple.
      	(remove_phi_args): Update for change to remove_phi_arg_num.
      
      	* gdbhooks.py (GimplePrinter.to_string): Update lookup of
      	code field to reflect inheritance, rather than embedding of
      	the base gimple type.
      
      From-SVN: r205034
      David Malcolm committed
  11. 20 Aug, 2013 2 commits
    • Revert my last two changes, r201865 and r201864 · 6cd4d135
      2013-08-20  David Malcolm  <dmalcolm@redhat.com>
      
      	Revert my last two changes, r201865 and r201864:
      
      	Revert r201865:
      	2013-08-20  David Malcolm  <dmalcolm@redhat.com>
      
      	Make opt_pass and gcc::pass_manager be GC-managed, so that pass
      	instances can own GC refs.
      
      	* Makefile.in (GTFILES): Add pass_manager.h and tree-pass.h.
      	* context.c (gcc::context::gt_ggc_mx): Traverse passes_.
      	(gcc::context::gt_pch_nx): Likewise.
      	(gcc::context::gt_pch_nx):  Likewise.
      	* ggc.h (gt_ggc_mx <T>): New.
      	(gt_pch_nx_with_op <T>): New.
      	(gt_pch_nx <T>): New.
      	* passes.c (opt_pass::gt_ggc_mx): New.
      	(opt_pass::gt_pch_nx): New.
      	(opt_pass::gt_pch_nx_with_op): New.
      	(pass_manager::gt_ggc_mx): New.
      	(pass_manager::gt_pch_nx): New.
      	(pass_manager::gt_pch_nx_with_op): New.
      	(pass_manager::operator new): Use
      	ggc_internal_cleared_alloc_stat rather than xcalloc.
      	* pass_manager.h (class pass_manager): Add GTY((user)) marking.
      	(pass_manager::gt_ggc_mx): New.
      	(pass_manager::gt_pch_nx): New.
      	(pass_manager::gt_pch_nx_with_op): New.
      	* tree-pass.h (class opt_pass): Add GTY((user)) marking.
      	(opt_pass::operator new): New.
      	(opt_pass::gt_ggc_mx): New.
      	(opt_pass::gt_pch_nx): New.
      	(opt_pass::gt_pch_nx_with_op): New.
      
      	Revert r201864:
      	2013-08-20  David Malcolm  <dmalcolm@redhat.com>
      
      	* Makefile.in (GTFILES): Add context.h.
      	* context.c (gcc::context::operator new): New.
      	(gcc::context::gt_ggc_mx): New.
      	(gcc::context::gt_pch_nx): New.
      	(gcc::context::gt_pch_nx): New.
      	* context.h (gcc::context): Add GTY((user)) marking.
      	(gcc::context::operator new): New.
      	(gcc::context::gt_ggc_mx): New.
      	(gcc::context::gt_pch_nx): New.
      	(gcc::context::gt_pch_nx): New.
      	(g): Add GTY marking.
      	(gt_ggc_mx (gcc::context *)): New.
      	(gt_pch_nx (gcc::context *)): New.
      	(gt_pch_nx (gcc::context *ctxt, gt_pointer_operator op,
      	void *cookie)): New.
      	* gengtype.c (open_base_files) <ifiles>: Add context.h.
      
      From-SVN: r201887
      David Malcolm committed
    • Make opt_pass and gcc::pass_manager be GC-managed · e42c64cb
      2013-08-20  David Malcolm  <dmalcolm@redhat.com>
      
      	Make opt_pass and gcc::pass_manager be GC-managed, so that pass
      	instances can own GC refs.
      
      	* Makefile.in (GTFILES): Add pass_manager.h and tree-pass.h.
      	* context.c (gcc::context::gt_ggc_mx): Traverse passes_.
      	(gcc::context::gt_pch_nx): Likewise.
      	(gcc::context::gt_pch_nx):  Likewise.
      	* ggc.h (gt_ggc_mx <T>): New.
      	(gt_pch_nx_with_op <T>): New.
      	(gt_pch_nx <T>): New.
      	* passes.c (opt_pass::gt_ggc_mx): New.
      	(opt_pass::gt_pch_nx): New.
      	(opt_pass::gt_pch_nx_with_op): New.
      	(pass_manager::gt_ggc_mx): New.
      	(pass_manager::gt_pch_nx): New.
      	(pass_manager::gt_pch_nx_with_op): New.
      	(pass_manager::operator new): Use
      	ggc_internal_cleared_alloc_stat rather than xcalloc.
      	* pass_manager.h (class pass_manager): Add GTY((user)) marking.
      	(pass_manager::gt_ggc_mx): New.
      	(pass_manager::gt_pch_nx): New.
      	(pass_manager::gt_pch_nx_with_op): New.
      	* tree-pass.h (class opt_pass): Add GTY((user)) marking.
      	(opt_pass::operator new): New.
      	(opt_pass::gt_ggc_mx): New.
      	(opt_pass::gt_pch_nx): New.
      	(opt_pass::gt_pch_nx_with_op): New.
      
      From-SVN: r201865
      David Malcolm committed
  12. 24 Jan, 2013 1 commit
  13. 10 Jan, 2013 1 commit
  14. 04 Jan, 2013 1 commit
  15. 18 Nov, 2012 1 commit
    • This patch rewrites the old VEC macro-based interface into a new one based on… · 9771b263
      This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
      
      This patch rewrites the old VEC macro-based interface into a new one
      based on the template class 'vec'.  The user-visible changes are
      described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.
      
      I have tested the patch pretty extensively:
      
      - Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
      - Bootstraps with --enable-checking=release
      - Bootstraps with --enable-checking=gc,gcac
      - Basic builds on all targets (using contrib/config-list.mk).
      
      We no longer access the vectors via VEC_* macros.  The pattern is
      "VEC_operation (T, A, V, args)" becomes "V.operation (args)".
      
      The only thing I could not do is create proper ctors and dtors for the
      vec class.  Since these vectors are stored in unions, we
      have to keep them as PODs (C++03 does not allow non-PODs in unions).
      
      This means that creation and destruction must be explicit.  There is a
      new method vec<type, allocation, layout>::create() and another vec<type,
      allocation, layout>::destroy() to allocate the internal vector.
      
      For vectors that must be pointers, there is a family of free functions
      that implement the operations that need to tolerate NULL vectors.
      These functions all start with the prefix 'vec_safe_'.  See the wiki
      page for details.
      
      The gengtype change removes the special handling for VEC() that used
      to exist in gengtype. Additionally, it allows gengtype to recognize
      templates of more than one argument and introduces the concept of an
      undefined type (useful for template arguments that may or may not be
      types).
      
      When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
      happens inside a type marked with GTY((user)).  Otherwise, it will
      emit an error.
      
      Finally, gengtype rejects root types marked GTY((user)) that are not
      first class pointers.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
      
      	* vec.c (register_overhead): Convert it into
      	member function of vec_prefix.
      	(release_overhead): Likewise.
      	(calculate_allocation): Likewise.
      	(vec_heap_free): Remove.
      	(vec_gc_o_reserve_1): Remove.
      	(vec_heap_o_reserve_1): Remove.
      	(vec_stack_o_reserve_1): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(register_stack_vec): New.
      	(stack_vec_register_index): New.
      	(unregister_stack_vec): New.
      	(vec_assert_fail): Remove.
      	* vec.h: Conditionally include ggc.h.  Document conditional
      	hackery.
      	Update top-level documentation.
      	(ALONE_VEC_CHECK_INFO): Remove.
      	(VEC_CHECK_INFO): Remove.
      	(ALONE_VEC_CHECK_DECL): Remove.
      	(VEC_CHECK_DECL): Remove.
      	(ALONE_VEC_CHECK_PASS): Remove.
      	(VEC_CHECK_PASS): Remove.
      	(VEC_ASSERT): Remove.
      	(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
      	va_stack.
      	Mark fields alloc_ and num_ as protected.
      	(struct vec_t): Remove.  Remove all function members.
      	(struct vl_embed): Declare.
      	(struct vl_ptr): Declare.
      	(free): Remove.
      	(reserve_exact): Remove.
      	(reserve): Remove.
      	(safe_splice): Remove.
      	(safe_push): Remove.
      	(safe_grow): Remove.
      	(safe_grow_cleared): Remove.
      	(safe_insert): Remove.
      	(DEF_VEC_I): Remove.
      	(DEF_VEC_ALLOC_I): Remove.
      	(DEF_VEC_P): Remove.
      	(DEF_VEC_ALLOC_P): Remove.
      	(DEF_VEC_O): Remove.
      	(DEF_VEC_ALLOC_O): Remove.
      	(DEF_VEC_ALLOC_P_STACK): Remove.
      	(DEF_VEC_ALLOC_O_STACK): Remove.
      	(DEF_VEC_ALLOC_I_STACK): Remove.
      	(DEF_VEC_A): Remove.
      	(DEF_VEC_ALLOC_A): Remove.
      	(vec_stack_p_reserve_exact_1): Remove.
      	(vec_stack_o_reserve): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(VEC_length): Remove.
      	(VEC_empty): Remove.
      	(VEC_address): Remove.
      	(vec_address): Remove.
      	(VEC_last): Remove.
      	(VEC_index): Remove.
      	(VEC_iterate): Remove.
      	(VEC_embedded_size): Remove.
      	(VEC_embedded_init): Remove.
      	(VEC_free): Remove.
      	(VEC_copy): Remove.
      	(VEC_space): Remove.
      	(VEC_reserve): Remove.
      	(VEC_reserve_exact): Remove.
      	(VEC_splice): Remove.
      	(VEC_safe_splice): Remove.
      	(VEC_quick_push): Remove.
      	(VEC_safe_push): Remove.
      	(VEC_pop): Remove.
      	(VEC_truncate): Remove.
      	(VEC_safe_grow): Remove.
      	(VEC_replace): Remove.
      	(VEC_quick_insert): Remove.
      	(VEC_safe_insert): Remove.
      	(VEC_ordered_remove): Remove.
      	(VEC_unordered_remove): Remove.
      	(VEC_block_remove): Remove.
      	(VEC_lower_bound): Remove.
      	(VEC_alloc): Remove.
      	(VEC_qsort): Remove.
      
      	(va_heap): Declare.
      	(va_heap::default_layout): New typedef to vl_ptr.
      	(va_heap::reserve): New.
      	(va_heap::release): New.
      	(va_gc): Declare.
      	(va_gc::default_layout): New typedef to vl_embed.
      	(va_gc::reserve): New.
      	(va_gc::release): New.
      	(va_gc_atomic): Declare.  Inherit from va_gc.
      	(va_stack): Declare.
      	(va_stack::default_layout): New typedef to vl_ptr.
      	(va_stack::alloc): New.
      	(va_stack::reserve): New.
      	(va_stack::release): New.
      	(register_stack_vec): Declare.
      	(stack_vec_register_index): Declare.
      	(unregister_stack_vec): Declare.
      
      	(vec<T, A = va_heap, L = typename A::default_layout>): Declare
      	empty vec template.
      	(vec<T, A, vl_embed>): Partial specialization for embedded
      	layout.
      	(vec<T, A, vl_embed>::allocated): New.
      	(vec<T, A, vl_embed>::length): New.
      	(vec<T, A, vl_embed>::is_empty): New.
      	(vec<T, A, vl_embed>::address): New.
      	(vec<T, A, vl_embed>::operator[]): New.
      	(vec<T, A, vl_embed>::last New.
      	(vec<T, A, vl_embed>::space): New.
      	(vec<T, A, vl_embed>::iterate): New.
      	(vec<T, A, vl_embed>::iterate): New.
      	(vec<T, A, vl_embed>::copy): New.
      	(vec<T, A, vl_embed>::splice): New.
      	(vec<T, A, vl_embed>::quick_push New.
      	(vec<T, A, vl_embed>::pop New.
      	(vec<T, A, vl_embed>::truncate): New.
      	(vec<T, A, vl_embed>::quick_insert): New.
      	(vec<T, A, vl_embed>::ordered_remove): New.
      	(vec<T, A, vl_embed>::unordered_remove): New.
      	(vec<T, A, vl_embed>::block_remove): New.
      	(vec<T, A, vl_embed>::qsort): New.
      	(vec<T, A, vl_embed>::lower_bound): New.
      	(vec<T, A, vl_embed>::embedded_size): New.
      	(vec<T, A, vl_embed>::embedded_init): New.
      	(vec<T, A, vl_embed>::quick_grow): New.
      	(vec<T, A, vl_embed>::quick_grow_cleared): New.
      	(vec_safe_space): New.
      	(vec_safe_length): New.
      	(vec_safe_address): New.
      	(vec_safe_is_empty): New.
      	(vec_safe_reserve): New.
      	(vec_safe_reserve_exact): New.
      	(vec_alloc): New.
      	(vec_free): New.
      	(vec_safe_grow): New.
      	(vec_safe_grow_cleared): New.
      	(vec_safe_iterate): New.
      	(vec_safe_push): New.
      	(vec_safe_insert): New.
      	(vec_safe_truncate): New.
      	(vec_safe_copy): New.
      	(vec_safe_splice): New.
      
      	(vec<T, A, vl_ptr>): New partial specialization for the space
      	efficient layout.
      	(vec<T, A, vl_ptr>::exists): New.
      	(vec<T, A, vl_ptr>::is_empty): New.
      	(vec<T, A, vl_ptr>::length): New.
      	(vec<T, A, vl_ptr>::address): New.
      	(vec<T, A, vl_ptr>::operator[]): New.
      	(vec<T, A, vl_ptr>::operator!=): New.
      	(vec<T, A, vl_ptr>::operator==): New.
      	(vec<T, A, vl_ptr>::last): New.
      	(vec<T, A, vl_ptr>::space): New.
      	(vec<T, A, vl_ptr>::iterate): New.
      	(vec<T, A, vl_ptr>::copy): New.
      	(vec<T, A, vl_ptr>::reserve): New.
      	(vec<T, A, vl_ptr>::reserve_exact): New.
      	(vec<T, A, vl_ptr>::splice): New.
      	(vec<T, A, vl_ptr>::safe_splice): New.
      	(vec<T, A, vl_ptr>::quick_push): New.
      	(vec<T, A, vl_ptr>::safe_push): New.
      	(vec<T, A, vl_ptr>::pop): New.
      	(vec<T, A, vl_ptr>::truncate): New.
      	(vec<T, A, vl_ptr>::safe_grow): New.
      	(vec<T, A, vl_ptr>::safe_grow_cleared): New.
      	(vec<T, A, vl_ptr>::quick_grow): New.
      	(vec<T, A, vl_ptr>::quick_grow_cleared): New.
      	(vec<T, A, vl_ptr>::quick_insert): New.
      	(vec<T, A, vl_ptr>::safe_insert): New.
      	(vec<T, A, vl_ptr>::ordered_remove): New.
      	(vec<T, A, vl_ptr>::unordered_remove): New.
      	(vec<T, A, vl_ptr>::block_remove): New.
      	(vec<T, A, vl_ptr>::qsort): New.
      	(vec<T, A, vl_ptr>::lower_bound): New.
      	(vec_stack_alloc): Define.
      	(FOR_EACH_VEC_SAFE_ELT): Define.
      	* vecir.h: Remove.  Update all users.
      	* vecprim.h: Remove.  Update all users.
      	Move uchar to coretypes.h.
      
      	* Makefile.in (VEC_H): Add $(GGC_H).
      	Remove vecir.h and vecprim.h dependencies everywhere.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	* gengtype-lex.l (VEC): Remove.
      	Add characters in the set [\!\>\.-].
      	* gengtype-parse.c (token_names): Remove "VEC".
      	(require_template_declaration): Remove handling of VEC_TOKEN.
      	(type): Likewise.
      	Call create_user_defined_type when parsing GTY((user)).
      	* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
      	(write_state_undefined_type): New.
      	(write_state_type): Call write_state_undefined_type for
      	TYPE_UNDEFINED.
      	(read_state_type): Call read_state_undefined_type for
      	TYPE_UNDEFINED.
      	* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
      	(create_user_defined_type): Make extern.
      	(type_for_name): Factor out of resolve_typedef.
      	(create_undefined_type): New
      	(resolve_typedef): Call it when we cannot find a previous
      	typedef and the type is not a template.
      	(find_structure): Accept TYPE_UNDEFINED.
      	(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
      	default to false.
      	Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
      	ALLOWED_UNDEFINED_TYPES is set.
      	Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
      	(filter_type_name): Accept templates with more than one
      	argument.
      	(output_mangled_typename): Handle TYPE_UNDEFINED
      	(walk_type): Likewise.
      	(write_types_process_field): Likewise.
      	(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
      	should not be a user-defined type.
      	(write_types_local_user_process_field): Handle TYPE_ARRAY,
      	TYPE_NONE and TYPE_UNDEFINED.
      	(write_types_local_process_field): Likewise.
      	(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
      	(write_root): Reject user-defined types that are not pointers.
      	Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
      	and TYPE_PARAM_STRUCT.
      	(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
      	TYPE_ARRAY.
      	(dump_typekind): Handle TYPE_UNDEFINED.
      	* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
      	(create_user_defined_type): Declare.
      	(enum gty_token): Remove VEC_TOKEN.
      
      2012-11-16  Diego Novillo  <dnovillo@google.com>
      
      	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
      
      	* coretypes.h (uchar): Define.
      	* alias.c: Use new vec API in vec.h.
      	* asan.c: Likewise.
      	* attribs.c: Likewise.
      	* basic-block.h: Likewise.
      	* bb-reorder.c: Likewise.
      	* builtins.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfghooks.h: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloop.h: Likewise.
      	* cfgloopanal.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cfgrtl.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* combine.c: Likewise.
      	* compare-elim.c: Likewise.
      	* coverage.c: Likewise.
      	* cprop.c: Likewise.
      	* data-streamer.h: Likewise.
      	* dbxout.c: Likewise.
      	* dce.c: Likewise.
      	* df-core.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* dominance.c: Likewise.
      	* domwalk.c: Likewise.
      	* domwalk.h: Likewise.
      	* dse.c: Likewise.
      	* dwarf2cfi.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* dwarf2out.h: Likewise.
      	* emit-rtl.c: Likewise.
      	* except.c: Likewise.
      	* except.h: Likewise.
      	* expr.c: Likewise.
      	* expr.h: Likewise.
      	* final.c: Likewise.
      	* fold-const.c: Likewise.
      	* function.c: Likewise.
      	* function.h: Likewise.
      	* fwprop.c: Likewise.
      	* gcc.c: Likewise.
      	* gcse.c: Likewise.
      	* genattr.c: Likewise.
      	* genattrtab.c: Likewise.
      	* genautomata.c: Likewise.
      	* genextract.c: Likewise.
      	* genopinit.c: Likewise
      	* ggc-common.c: Likewise.
      	* ggc.h: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-ssa-strength-reduction.c: Likewise.
      	* gimple-streamer-in.c: Likewise.
      	* gimple.c: Likewise.
      	* gimple.h: Likewise.
      	* gimplify.c: Likewise.
      	* graph.c: Likewise.
      	* graphds.c: Likewise.
      	* graphds.h: Likewise.
      	* graphite-blocking.c: Likewise.
      	* graphite-clast-to-gimple.c: Likewise.
      	* graphite-dependences.c: Likewise.
      	* graphite-interchange.c: Likewise.
      	* graphite-optimize-isl.c: Likewise.
      	* graphite-poly.c: Likewise.
      	* graphite-poly.h: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-scop-detection.h: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* graphite.c: Likewise.
      	* godump.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* hw-doloop.c: Likewise.
      	* hw-doloop.h: Likewise.
      	* ifcvt.c: Likewise.
      	* insn-addr.h: Likewise.
      	* ipa-cp.c: Likewise.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-inline-transform.c: Likewise.
      	* ipa-inline.c: Likewise.
      	* ipa-inline.h: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-prop.h: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-ref-inline.h: Likewise.
      	* ipa-ref.c: Likewise.
      	* ipa-ref.h: Likewise.
      	* ipa-reference.c: Likewise.
      	* ipa-split.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* ipa-utils.h: Likewise.
      	* ipa.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-emit.c: Likewise.
      	* ira-int.h: Likewise.
      	* ira.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* loop-unroll.c: Likewise.
      	* lower-subreg.c: Likewise.
      	* lra-lives.c: Likewise.
      	* lra.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* lto-streamer.h: Likewise.
      	* lto-symtab.c: Likewise.
      	* mcf.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* omp-low.c: Likewise.
      	* opts-common.c: Likewise.
      	* opts-global.c: Likewise.
      	* opts.c: Likewise.
      	* opts.h: Likewise.
      	* passes.c: Likewise.
      	* predict.c: Likewise.
      	* print-tree.c: Likewise.
      	* profile.c: Likewise.
      	* profile.h: Likewise.
      	* read-rtl.c: Likewise.
      	* ree.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regrename.c: Likewise.
      	* regrename.h: Likewise.
      	* reload.c: Likewise.
      	* reload.h: Likewise.
      	* reload1.c: Likewise.
      	* rtl.h: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-int.h: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched-ir.h: Likewise.
      	* sel-sched.c: Likewise.
      	* sese.c: Likewise.
      	* sese.h: Likewise.
      	* statistics.h: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* tlink.c: Likewise.
      	* toplev.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-browser.c: 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-diagnostic.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-emutls.c: Likewise.
      	* tree-flow.h: Likewise.
      	* tree-if-conv.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-inline.h: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-iterator.c: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-mudflap.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-pretty-print.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-sra.c: Likewise.
      	* tree-ssa-address.c: Likewise.
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-live.h: 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-math-opts.c: Likewise.
      	* tree-ssa-operands.c: 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-sccvn.h: Likewise.
      	* tree-ssa-strlen.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-tail-merge.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-ssanames.c: Likewise.
      	* tree-stdarg.c: Likewise.
      	* tree-streamer-in.c: Likewise.
      	* tree-streamer-out.c: Likewise.
      	* tree-streamer.c: Likewise.
      	* tree-streamer.h: Likewise.
      	* tree-switch-conversion.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.h: Likewise.
      	* value-prof.c: Likewise.
      	* value-prof.h: Likewise.
      	* var-tracking.c: Likewise.
      	* varasm.c: Likewise.
      	* varpool.c: Likewise.
      	* vmsdbgout.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/c6x/c6x.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/rs6000/rs6000-c.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/spu/spu-c.c: Likewise.
      	* config/vms/vms.c: Likewise.
      	* config/vxworks.c: Likewise.
      	* config/epiphany/resolve-sw-modes.c: Likewise.
      
      From-SVN: r193595
      Diego Novillo committed
  16. 15 Aug, 2012 1 commit
    • backport: As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html... · 0823efed
      Merge from cxx-conversion branch (http://gcc.gnu.org/wiki/cxx-conversion).
      
      As described in http://gcc.gnu.org/ml/gcc/2012-08/msg00015.html, this patch
      changes the default bootstrap process so that stage 1 always builds with a C++
      compiler.
      
      Other than the bootstrap change, the patch makes no functional changes to the
      compiler.  Everything should build as it does now in trunk.  The main
      changes in this patch are:
      
      1- Configuration changes.
      2- Re-write of VEC.
      3- Re-write of gengtype to support C++ templates and
         user-provided marking functions.
      4- New hash table class.
      5- Re-write double_int.
      6- Implement tree macros as inline functions so they can be
         called from gdb.
      
      As discussed before, several of these changes do not fully change
      the call sites to use the new APIs.
      
      The bootstrap changes have already been tested on a wide range of
      targets (http://gcc.gnu.org/wiki/CppBuildStatus).  Additionally,
      I have tested the merged trunk on: x86_64-unknown-linux-gnu,
      mips64el-unknown-linux-gnu, powerpc64-unknown-linux-gnu,
      i686-pc-linux-gnu, and ia64-unknown-linux-gnu.
      
      ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.
      
      	* Makefile.tpl (STAGE[+id+]_CXXFLAGS): Remove
      	POSTSTAGE1_CONFIGURE_FLAGS.
      	* Makefile.in: Regenerate.
      	* configure.ac (ENABLE_BUILD_WITH_CXX): Remove.  Update all users.
      	Force C++ when bootstrapping.
      	* configure: Regenerate.
      
      
      libcpp/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* Makefile.in: Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* configure.ac: Likewise.
      	* configure: Regenerate.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge from cxx-conversion branch.  New C++ hash table.
      
      	* include/symtab.h (typedef struct ht hash_table): Change the typedef
      	name to cpp_hash_table.  Update all users of the typedef.
      
      gcc/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* configure.ac (CXX_FOR_BUILD): Define and substitute.
      	(BUILD_CXXFLAGS): Define.
      	Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	Force all build to be with C++.
      	* Makefile.in (BUILD_CXXFLAGS): Use it.
      	Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* doc/install.texi: Remove documentation for --enable-build-with-cxx
      	and --enable-build-poststage1-with-cxx.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Re-implement VEC in C++.
      
      	* vec.c (vec_heap_free): Convert into a template function.
      	(vec_gc_o_reserve_1): Make extern.
      	(vec_gc_p_reserve): Remove.
      	(vec_gc_p_reserve_exact): Remove.
      	(vec_gc_o_reserve): Remove.
      	(vec_gc_o_reserve_exact): Remove.
      	(vec_heap_o_reserve_1): Make extern.
      	(vec_heap_p_reserve): Remove.
      	(vec_heap_p_reserve_exact): Remove.
      	(vec_heap_o_reserve): Remove.
      	(vec_heap_o_reserve_exact): Remove.
      	(vec_stack_p_reserve): Remove.
      	(vec_stack_p_reserve_exact): Remove.
      	* vec.h (VEC_CHECK_INFO, VEC_CHECK_DECL, VEC_CHECK_PASS,
      	VEC_ASSERT, VEC_ASSERT_FAIL, vec_assert_fail): Move earlier
      	in the file.
      	(VEC): Define to vec_t<T>.
      	(vec_allocation_t): Define.
      	(struct vec_prefix): Move earlier in the file.
      	(vec_t<T>): New template.
      	(DEF_VEC_I, DEF_VECL_ALLOC_I, DEF_VEC_P, DEF_VEC_ALLOC_P,
      	DEF_VEC_O, DEF_VEC_ALLOC_P, DEF_VEC_O, DEF_VEC_ALLOC_O,
      	DEF_VEC_ALLOC_P_STACK, DEF_VEC_ALLOC_O_STACK,
      	DEF_VEC_ALLOC_I_STACK): Expand to 'struct vec_swallow_trailing_semi'.
      	(DEF_VEC_A): Provide template instantiations for
      	GC/PCH markers that do not traverse the vector.
      	(vec_stack_p_reserve): Remove.
      	(vec_stack_p_reserve_exact): Remove.
      	(vec_stack_p_reserve_exact_1): Remove.
      	(vec_stack_o_reserve): Remove.
      	(vec_stack_o_reserve_exact): Remove.
      	(vec_stack_free): Re-write as a template function.
      	(vec_reserve): New template function.
      	(vec_reserve_exact): New template function.
      	(vec_heap_free): New template function if GATHER_STATISTICS is
      	defined.  Otherwise, macro that expands to free().
      	(VEC_length_1): New template function.
      	(VEC_length): Call it.
      	(VEC_empty_1): New template function.
      	(VEC_empty): Call it.
      	(VEC_address_1): New template function.
      	(VEC_address): Call it.
      	(VEC_last_1): New template function.
      	(VEC_last): Call it.  Change return type to T&.
      	Change all users that used VEC_Os.
      	(VEC_index_1): New template function.
      	(VEC_index): Call it.  Return a T& instead of a T*.
      	Update all callers that were using VEC_O before.
      	(VEC_iterate_1): New template function.
      	(VEC_iterate): Call it.
      	(VEC_embedded_size_1): New template function.
      	(VEC_embedded_size): Call it.
      	(VEC_embedded_init_1): New template function.
      	(VEC_embedded_init): Call it.
      	(VEC_alloc_1): New template function.
      	(VEC_alloc): Call it.  If A is 'stack', call XALLOCAVAR to
      	do the allocation.
      	(VEC_free_1): New template function.
      	(VEC_free): Call it.
      	(VEC_copy_1): New template function.
      	(VEC_copy): Call it.
      	(VEC_space_1): New template function
      	(VEC_space): Call it.
      	(VEC_reserve_1): New template function.
      	(VEC_reserve): Call it.
      	(VEC_reserve_exact_1): New template function.
      	(VEC_reserve_exact): Call it.
      	(VEC_splice_1): New template function.
      	(VEC_splice): Call it.
      	(VEC_safe_splice_1): New template function.
      	(VEC_safe_splice): Call it.
      	(VEC_quick_push_1): New template function.  Create two overloads, one
      	accepting T, the other accepting T *.  Update all callers
      	where T and T * are ambiguous.
      	(VEC_quick_push): Call it.
      	(VEC_safe_push_1): New template function. Create two overloads, one
      	accepting T, the other accepting T *.  Update all callers
      	where T and T * are ambiguous.
      	(VEC_safe_push): Call it.
      	(VEC_pop_1): New template function.
      	(VEC_pop): Call it.
      	(VEC_truncate_1): New template function.
      	(VEC_truncate): Call it.
      	(VEC_safe_grow_1): New template function.
      	(VEC_safe_grow): Call it.
      	(VEC_safe_grow_cleared_1): New template function.
      	(VEC_safe_grow_cleared): Call it.
      	(VEC_replace_1): New template function.
      	(VEC_replace): Call it.  Always accept T instead of T*.
      	Update all callers that used VEC_Os.
      	(VEC_quick_insert_1): New template function.
      	(VEC_quick_insert): Call it.
      	(VEC_safe_insert_1): New template function.
      	(VEC_safe_insert): Call it.
      	(VEC_ordered_remove_1): New template function.
      	(VEC_ordered_remove): Call it.
      	(VEC_unordered_remove_1): New template function.
      	(VEC_unordered_remove): Call it.
      	(VEC_block_remove_1): New template function.
      	(VEC_block_remove): Call it.
      	(VEC_lower_bound_1): New template function.
      	(VEC_lower_bound): Call it.
      	(VEC_OP): Remove.
      	(DEF_VEC_FUNC_P): Remove.
      	(DEF_VEC_ALLOC_FUNC_P): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_P): Remove.
      	(DEF_VEC_FUNC_O): Remove.
      	(DEF_VEC_ALLOC_FUNC_O): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_O): Remove.
      	(DEF_VEC_ALLOC_FUNC_I): Remove.
      	(DEF_VEC_NONALLOC_FUNCS_I): Remove.
      	(DEF_VEC_ALLOC_FUNC_P_STACK): Remove.
      	(DEF_VEC_ALLOC_FUNC_O_STACK): Remove.
      	(DEF_VEC_ALLOC_FUNC_I_STACK): Remove.
      	(vec_reserve_exact): New template function.
      
      	* gengtype-lex.l (DEF_VEC_ALLOC_[IOP]/{EOID}): Remove.
      	* gengtype-parse.c (token_names): Remove DEF_VEC_ALLOC_[IOP].
      	(typedef_name): Emit vec_t<C1> instead of VEC_C1_C2.
      	(def_vec_alloc): Remove.  Update all callers.
      	* gengtype.c (filter_type_name): New.
      	(output_mangled_typename): Call it.
      	(write_func_for_structure): Likewise.
      	(write_types): Likewise.
      	(write_root): Likewise.
      	(write_typed_alloc_def): Likewise.
      	(note_def_vec): Emit vec_t<TYPE_NAME> instead of VEC_TYPE_NAME_base.
      	(note_def_vec_alloc): Remove.
      	* gengtype.h (note_def_vec_alloc): Remove.
      	(DEFVEC_ALLOC): Remove token code.
      
      	* df-scan.c (df_bb_verify): Remove call to df_free_collection_rec
      	inside the insn traversal loop.
      	* gimplify.c (gimplify_compound_lval): Rename STACK to EXPR_STACK.
      	* ipa-inline.c (inline_small_functions): Rename HEAP to EDGE_HEAP.
      	* reg-stack.c (stack): Rename to STACK_PTR.  Update all users.
      	* tree-vrp.c (stack): Rename to EQUIV_STACK.  Update all users.
      
      	* config/bfin/bfin.c (hwloop_optimize): Update some calls to
      	VEC_* for vectors of non-pointers.
      	* config/c6x/c6x.c (try_rename_operands): Likewise.
      	(reshuffle_units): Likewise.
      	* config/mips/mips.c (mips_multi_start): Likewise.
      	(mips_multi_add): Likewise.
      	(mips_multi_copy_insn): Likewise.
      	(mips_multi_set_operand): Likewise.
      	* hw-doloop.c (discover_loop): Likewise.
      	(discover_loops): Likewise.
      	(reorg_loops): Likewise.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  C++ support in gengtype.
      
      	* coretypes.h (gt_pointer_operator): Move from ...
      	* ggc.h: ... here.
      	* doc/gty.texi: Document support for C++ templates and
      	user-provided markers.
      	* gcc/gengtype-lex.l: Update copyright year.
      	Remove support for recognizing DEF_VEC_O, DEF_VEC_P and
      	DEFVEC_I.
      	* gengtype-parse.c: Update copyright year.
      	(token_names): Remove DEF_VEC_O, DEF_VEC_P and DEF_VEC_I.
      	(require_template_declaration): New.
      	(typedef_name): Call it.
      	(type): Replace IS_UNION with KIND. Replace all users.
      	(def_vec): Remove.  Update all users.
      	* gengtype-state.c (type_lineloc): Handle TYPE_USER_STRUCT.
      	(write_state_user_struct_type): New.
      	(write_state_type): Call it.
      	(read_state_user_struct_type): New.
      	(read_state_type): Call it.
      	* gengtype.c: Update copyright year.
      	(dump_pair): Move declaration to the top.
      	(dump_type): Likewise.
      	(dump_type_list): Likewise.
      	(dbgprint_count_type_at): Handle TYPE_USER_STRUCT.
      	(create_user_defined_type): New.
      	(resolve_typedef): Call it.
      	(new_structure): Replace argument ISUNION with KIND.
      	Change users to refer to KIND directly.
      	Update all callers.
      	(find_structure): Likewise.
      	(set_gc_used_type): Handle TYPE_USER_STRUCT.
      	(create_file): Update HDR to include new copyright year.
      	(struct walk_type_data): Add field IN_PTR_FIELD.
      	(output_mangled_typename): Handle TYPE_USER_STRUCT.
      	(walk_type): Set D->IN_PTR_FIELD when walking a TYPE_POINTER.
      	Clear it afterwards.
      	Handle TYPE_USER_STRUCT.
      	(write_types_process_field): Handle TYPE_USER_STRUCT.
      	(get_type_specifier): Move earlier in the file.
      	(write_type_decl): New.
      	(write_marker_function_name): New.
      	(write_user_func_for_structure_ptr): New.
      	(write_user_func_for_structure_body): New.
      	(write_user_marking_functions): New.
      	(write_func_for_structure): Call write_marker_function_name
      	and write_type_decl.
      	Do not call walk_type for TYPE_USER_STRUCT. Emit a call to the user
      	function directly.
      	Call write_user_marking_functions on TYPE_USER_STRUCTs.
      	(write_types_local_user_process_field): New.
      	(write_pch_user_walking_for_structure_body): New.
      	(write_pch_user_walking_functions): New.
      	(write_types_local_process_field): Handle TYPE_USER_STRUCT.
      	(write_local_func_for_structure): Do not call walk_type for
      	TYPE_USER_STRUCT. Instead, emit the call to gt_pch_nx directly.
      	Call write_pch_user_walking_functions for TYPE_USER_STRUCTs.
      	(write_root): Handle TYPE_USER_STRUCT.
      	(vec_prefix_type): Remove.  Update all users.
      	(note_def_vec): Remove.  Update all users.
      	(dump_typekind): Handle TYPE_USER_STRUCT.
      	(dump_type): Initialize SEEN_TYPES, if needed.
      	Handle TYPE_USER_STRUCT.
      	(dump_everything): Do not initialize SEEN_TYPES.
      	* gengtype.h: Update copyright year.
      	(enum typekind): Add TYPE_USER_STRUCT.
      	(union_or_struct_p): Rename from UNION_OR_STRUCT_P.
      	Convert into function.
      	Add an overload taking const_type_p.
      	Update all callers.
      	(new_structure): Change second field to type enum typekind.
      	Update all users.
      	(find_structure): Likewise.
      	(note_def_vec): Remove.
      	(DEFVEC_OP): Remove.
      	(DEFVEC_I): Remove.
      	* ggc-page.c (gt_ggc_mx): Add entry points for marking
      	'const char *&', 'unsigned char *&' and 'unsigned char&'.
      	* ggc-zone.c (gt_ggc_mx): Add entry points for marking
      	'const char *&' and 'unsigned char *&'.
      	* stringpool.c (gt_pch_nx): Add entry points for marking
      	'const char *&', 'unsigned char *&' and 'unsigned char&'.
      	Add an entry point for the overload taking arguments 'unsigned char
      	*', 'gt_pointer_operator' and 'void *'.
      	* vec.h (struct vec_prefix): Remove GTY marker.
      	(struct vec_t): Remove GTY((length)) attribute from field 'vec'.
      	(gt_ggc_mx (vec_t<T> *)): New template function.
      	(gt_pch_nx (vec_t<T> *)): New template function.
      	(gt_pch_nx (vec_t<T *> *, gt_pointer_operator, void *)): New template
      	function.
      	(gt_pch_nx (vec_t<T> *, gt_pointer_operator, void *)): New template
      	function.
      
      	* basic-block.h (struct edge_def): Mark GTY((user)).
      	Remove all GTY markers from fields.
      	(gt_ggc_mx): Declare.
      	(gt_pch_nx): Declare.
      	* tree-cfg.c (gt_ggc_mx): New.
      	(gt_pch_nx): New.
      
      	* gengtype-lex.l (USER_GTY): Add pattern for "user".
      	* gengtype-parse.c (option): Handle USER_GTY.
      	(opts_have): New.
      	(type): Call it.
      	If the keyword 'user' is used, do not walk the fields
      	of the structure.
      	* gengtype.h (USER_GTY): Add.
      	* doc/gty.texi: Update.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge cxx-conversion branch.  Implement C++ hash table.
      
      	* hash-table.h: New. Implementation borrowed from libiberty/hashtab.c.
      	* hash-table.c: Likewise.
      	* tree-ssa-tail-merge.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t same_succ_htab): Change type to hash_table;
      	move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(same_succ_print_traverse): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(same_succ_hash): Likewise.
      	(same_succ_equal): Likewise.
      	(same_succ_delete): Likewise.
      	* tree-ssa-threadupdate.c: Include hash-table.h.
      	(struct local_info): Rename to ssa_local_info_t to avoid overloading
      	the type name local_info with the variable name local_info.
      	(static htab_t redirection_data): Change type to hash_table.
      	Move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(redirection_data_hash): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(redirection_data_eq): Likewise.
      	(fix_duplicate_block_edges): Likewise.
      	(create_duplicates): Likewise.
      	(fixup_template_block): Likewise.
      	(redirect_edges): Likewise.
      	(lookup_redirection_data): Change types associated with the hash table
      	from void* to their actual type. Remove unnecessary casts.
      	* tree-ssa-ccp.c: Include hash-table.h.
      	(typedef gimple_htab): New.  Uses hash_table.  Replace specific uses
      	of htab_t with gimple_htab.  Change users to invoke member functions.
      	Move specification of helper functions from create call to declaration.
      	* tree-ssa-coalesce.c: Include hash-table.h instead of hashtab.h.
      	(hash_ssa_name_by_var): Make extern. Remove void* casting.
      	(eq_ssa_name_by_var): Likewise.
      	(coalesce_ssa_name): Change type of local static htab_t ssa_name_hash
      	to hash_table. Change users to invoke member functions.
      	Move specification of helper functions from create call to declaration.
      	* coverage.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t counts_hash): Change type to hash_table;
      	move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(htab_counts_entry_hash): Make extern. Rename with coverage_... instead
      	of htab_... Remove void* casting.
      	(htab_counts_entry_eq): Likewise.
      	(htab_counts_entry_del): Likewise.
      	* tree-ssa-pre.c: Include hash-table.h instead of hashtab.h.
      	(static htab_t expression_to_id): Change type to hash_table.
      	Move specification of helper functions from create call to declaration.
      	Change users to invoke member functions.
      	(static htab_t phi_translate_table): Likewise.
      	(pre_expr_eq): Make extern ssa_.... Change callers.
      	Remove void* casting.
      	(pre_expr_hash): Likewise.
      	(expr_pred_trans_hash): Likewise.
      	(expr_pred_trans_eq): Likewise.
      	(alloc_expression_id): Change types associated with the hash table
      	from void* to their actual type. Remove unnecessary casts.
      	(lookup_expression_id): Likewise.
      	(phi_trans_lookup): Likewise.
      	(phi_trans_add): Likewise.
      	* stringpool.c: Rename uses of libcpp typedef hash_table to
      	cpp_hash_table.
      	* Makefile.in: Add hash-table.o to OBJS-libcommon-target.
      	Add $(HASH_TABLE_H). Add new dependences on $(HASH_TABLE_H).
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge from cxx-conversion branch.  Re-write double_int in C++.
      
      	* hash-table.h
      	(typedef double_int): Change to struct (POD).
      	(double_int::make): New overloads for int to double-int conversion.
      	(double_int::mask): New.
      	(double_int::max_value): New.
      	(double_int::min_value): New.
      	(double_int::operator ++): New.
      	(double_int::operator --): New.
      	(double_int::operator *=): New.
      	(double_int::operator +=): New.
      	(double_int::operator -=): New.
      	(double_int::to_signed): New.
      	(double_int::to_unsigned): New.
      	(double_int::fits_unsigned): New.
      	(double_int::fits_signed): New.
      	(double_int::fits): New.
      	(double_int::trailing_zeros): New.
      	(double_int::popcount): New.
      	(double_int::multiple_of): New.
      	(double_int::set_bit): New.
      	(double_int::mul_with_sign): New.
      	(double_int::operator * (binary)): New.
      	(double_int::operator + (binary)): New.
      	(double_int::operator - (binary)): New.
      	(double_int::operator - (unary)): New.
      	(double_int::operator ~ (unary)): New.
      	(double_int::operator & (binary)): New.
      	(double_int::operator | (binary)): New.
      	(double_int::operator ^ (binary)): New.
      	(double_int::and_not): New.
      	(double_int::lshift): New.
      	(double_int::rshift): New.
      	(double_int::alshift): New.
      	(double_int::arshift): New.
      	(double_int::llshift): New.
      	(double_int::lrshift): New.
      	(double_int::lrotate): New.
      	(double_int::rrotate): New.
      	(double_int::div): New.
      	(double_int::sdiv): New.
      	(double_int::udiv): New.
      	(double_int::mod): New.
      	(double_int::smod): New.
      	(double_int::umod): New.
      	(double_int::divmod): New.
      	(double_int::sdivmod): New.
      	(double_int::udivmod): New.
      	(double_int::ext): New.
      	(double_int::zext): New.
      	(double_int::sext): New.
      	(double_int::is_zero): New.
      	(double_int::is_one): New.
      	(double_int::is_minus_one): New.
      	(double_int::is_negative): New.
      	(double_int::cmp): New.
      	(double_int::ucmp): New.
      	(double_int::scmp): New.
      	(double_int::ult): New.
      	(double_int::ugt): New.
      	(double_int::slt): New.
      	(double_int::sgt): New.
      	(double_int::max): New.
      	(double_int::smax): New.
      	(double_int::umax): New.
      	(double_int::min): New.
      	(double_int::smin): New.
      	(double_int::umin): New.
      	(double_int::operator ==): New.
      	(double_int::operator !=): New.
      	(shwi_to_double_int): Change implementation to use member function.
      	(double_int_minus_one): Likewise.
      	(double_int_zero): Likewise.
      	(double_int_one): Likewise.
      	(double_int_two): Likewise.
      	(double_int_ten): Likewise.
      	(uhwi_to_double_int): Likewise.
      	(double_int_to_shwi): Likewise.
      	(double_int_to_uhwi): Likewise.
      	(double_int_fits_in_uhwi_p): Likewise.
      	(double_int_fits_in_shwi_p): Likewise.
      	(double_int_fits_in_hwi_p): Likewise.
      	(double_int_mul): Likewise.
      	(double_int_mul_with_sign): Likewise.
      	(double_int_add): Likewise.
      	(double_int_sub): Likewise.
      	(double_int_neg): Likewise.
      	(double_int_div): Likewise.
      	(double_int_sdiv): Likewise.
      	(double_int_udiv): Likewise.
      	(double_int_mod): Likewise.
      	(double_int_smod): Likewise.
      	(double_int_umod): Likewise.
      	(double_int_divmod): Likewise.
      	(double_int_sdivmod): Likewise.
      	(double_int_udivmod): Likewise.
      	(double_int_multiple_of): Likewise.
      	(double_int_setbit): Likewise.
      	(double_int_ctz): Likewise.
      	(double_int_not): Likewise.
      	(double_int_ior): Likewise.
      	(double_int_and): Likewise.
      	(double_int_and_not): Likewise.
      	(double_int_xor): Likewise.
      	(double_int_lshift): Likewise.
      	(double_int_rshift): Likewise.
      	(double_int_lrotate): Likewise.
      	(double_int_rrotate): Likewise.
      	(double_int_cmp): Likewise.
      	(double_int_scmp): Likewise.
      	(double_int_ucmp): Likewise.
      	(double_int_max): Likewise.
      	(double_int_smax): Likewise.
      	(double_int_umax): Likewise.
      	(double_int_min): Likewise.
      	(double_int_smin): Likewise.
      	(double_int_umin): Likewise.
      	(double_int_ext): Likewise.
      	(double_int_sext): Likewise.
      	(double_int_zext): Likewise.
      	(double_int_mask): Likewise.
      	(double_int_max_value): Likewise.
      	(double_int_min_value): Likewise.
      	(double_int_zero_p): Likewise.
      	(double_int_one_p): Likewise.
      	(double_int_minus_one_p): Likewise.
      	(double_int_equal_p): Likewise.
      	(double_int_popcount): Likewise.
      	* hash-table.c
      	(double_int_mask): Reuse implementation for double_int::mask.
      	(double_int_max_value): Likewise.
      	(double_int_min_value): Likewise.
      	(double_int_ext): Likewise.
      	(double_int_zext): Likewise.
      	(double_int_sext): Likewise.
      	(double_int_mul_with_sign): Likewise.
      	(double_int_divmod): Likewise.
      	(double_int_sdivmod): Likewise.
      	(double_int_udivmod): Likewise.
      	(double_int_div): Likewise.
      	(double_int_sdiv): Likewise.
      	(double_int_udiv): Likewise.
      	(double_int_mod): Likewise.
      	(double_int_smod): Likewise.
      	(double_int_umod): Likewise.
      	(double_int_multiple_of): Likewise.
      	(double_int_lshift): Likewise.
      	(double_int_rshift): Likewise.
      	(double_int_lrotate): Likewise.
      	(double_int_rrotate): Likewise.
      	(double_int_cmp): Likewise.
      	(double_int_ucmp): Likewise.
      	(double_int_scmp): Likewise.
      	(double_int_max): Likewise.
      	(double_int_smax): Likewise.
      	(double_int_umax): Likewise.
      	(double_int_min): Likewise.
      	(double_int_smin): Likewise.
      	(double_int_umin): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int_min): Likewise.
      	(double_int::alshift): New.
      	(double_int::arshift): New.
      	(double_int::llshift): New.
      	(double_int::lrshift): New.
      	(double_int::ult): New.
      	(double_int::ugt): New.
      	(double_int::slt): New.
      	(double_int::sgt): New.
      	(double_int_setbit): Reuse implementation for double_int::set_bit,
      	which avoids a name conflict with a macro.
      	(double_int_double_int_ctz): Reuse implementation for
      	double_int::trailing_zeros.
      	(double_int_fits_in_shwi_p): Reuse implementation for
      	double_int::fits_signed.
      	(double_int_fits_in_hwi_p): Reuse implementation for double_int::fits.
      	(double_int_mul): Reuse implementation for binary
      	double_int::operator *.
      	(double_int_add): Likewise.
      	(double_int_sub): Likewise.
      	(double_int_neg): Reuse implementation for unary
      	double_int::operator -.
      	(double_int_max_value): Likewise.
      	* fixed-value.c: Change to use member functions introduced above.
      
      2012-08-14   Lawrence Crowl  <crowl@google.com>
      
      	Merge cxx-conversion branch.  Support tree macro calling
      	from gdb.
      
      	* tree.h (tree_check): New.
      	(TREE_CHECK): Use inline function above instead of __extension__.
      	(tree_not_check): New.
      	(TREE_NOT_CHECK): Use inline function above instead of __extension__.
      	(tree_check2): New.
      	(TREE_CHECK2): Use inline function above instead of __extension__.
      	(tree_not_check2): New.
      	(TREE_NOT_CHECK2): Use inline function above instead of __extension__.
      	(tree_check3): New.
      	(TREE_CHECK3): Use inline function above instead of __extension__.
      	(tree_not_check3): New.
      	(TREE_NOT_CHECK3): Use inline function above instead of __extension__.
      	(tree_check4): New.
      	(TREE_CHECK4): Use inline function above instead of __extension__.
      	(tree_not_check4): New.
      	(TREE_NOT_CHECK4): Use inline function above instead of __extension__.
      	(tree_check5): New.
      	(TREE_CHECK5): Use inline function above instead of __extension__.
      	(tree_not_check5): New.
      	(TREE_NOT_CHECK5): Use inline function above instead of __extension__.
      	(contains_struct_check): New.
      	(CONTAINS_STRUCT_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_class_check): New.
      	(TREE_CLASS_CHECK): Use inline function above instead of __extension__.
      	(tree_range_check): New.
      	(TREE_RANGE_CHECK): Use inline function above instead of __extension__.
      	(omp_clause_subcode_check): New.
      	(OMP_CLAUSE_SUBCODE_CHECK): Use inline function above instead of
      	__extension__.
      	(omp_clause_range_check): New.
      	(OMP_CLAUSE_RANGE_CHECK): Use inline function above instead of
      	__extension__.
      	(expr_check): New.
      	(EXPR_CHECK): Use inline function above instead of __extension__.
      	(non_type_check): New.
      	(NON_TYPE_CHECK): Use inline function above instead of __extension__.
      	(tree_vec_elt_check): New.
      	(TREE_VEC_ELT_CHECK): Use inline function above instead of
      	__extension__.
      	(omp_clause_elt_check): New.
      	(OMP_CLAUSE_ELT_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_operand_check): New.
      	(TREE_OPERAND_CHECK): Use inline function above instead of
      	__extension__.
      	(tree_operand_check_code): New.
      	(TREE_OPERAND_CHECK_CODE): Use inline function above instead of
      	__extension__.
      	(TREE_CHAIN): Simplify implementation.
      	(TREE_TYPE): Simplify implementation.
      	(tree_operand_length): Move for compilation dependences.
      	* gdbinit.in: (macro define __FILE__): New.
      	(macro define __LINE__): New.
      	(skip "tree.h"): New.
      
      gcc/cp/ChangeLog
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Re-write VEC in C++.
      
      	* call.c (add_function_candidate): Remove const qualifier
      	from call to VEC_index.
      
      2012-08-14   Diego Novillo  <dnovillo@google.com>
      
      	Merge from cxx-conversion branch.  Configury.
      
      	* go-c.h: Remove all handlers of ENABLE_BUILD_WITH_CXX.
      	* go-gcc.cc: Likewise.
      	* go-system.h: Likewise.
      
      From-SVN: r190402
      Diego Novillo committed
  17. 24 Jul, 2012 1 commit
    • sbitmap.h (SBITMAP_ELT_BITS): Use "1u" trick as for BITMAP_WORD_BITS. · 7aa6d18a
      gcc/
      	* sbitmap.h (SBITMAP_ELT_BITS): Use "1u" trick as for BITMAP_WORD_BITS.
      	Move test to check that there is a popcount function for the the number
      	of bits in SBITMAP_ELT_BITS to sbitmap.c.
      	* sbitmap.c: Test SBITMAP_ELT_BITS, not HOST_BITS_PER_WIDEST_FAST_INT.
      	MEM_STAT_INFO): Define in terms of their ALONE counterparts.
      
      	* configure.ac (GATHER_STATISTICS): Always define, non-zero if enabled.
      	* configure: Regenerate.
      	* statistics.h (GATHER_STATISTICS): Error out if it is not defined.
      	(GCC_MEM_STAT_ARGUMENTS): New define.
      	(ALONE_MEM_STAT_DECL): Define in terms of GCC_MEM_STAT_ARGUMENTS.
      	(ALONE_FINAL_MEM_STAT_DECL, ALONE_FINAL_PASS_MEM_STAT): New defines.
      	(MEM_STAT_DECL, FINAL_MEM_STAT_DECL, PASS_MEM_STAT, FINAL_PASS_MEM_STAT,
      	* ggc-internal.h (ggc_record_overhead): Use FINAL_MEM_STAT_DECL.
      	* ggc.h (ggc_record_overhead, ggc_free_overhead,
      	ggc_prune_overhead_list): Remove internal prototypes, they are defined
      	already in ggc-internal.h.
      	* ggc-common.c (struct loc_descriptor): Remove #ifdef GATHER_STATISTICS
      	wrappers.
      	(add_statistics): Likewise.
      	(dump_ggc_loc_statistics): Likewise. Return if GATHER_STATISTICS is 0. 
      	* ggc-zone.c (struct page_entry): Remove #ifdef GATHER_STATISTICS
      	wrappers around "survived" and "stats" members.
      	(alloc_large_page): Always initialize survived.
      	(ggc_internal_alloc_zone_stat): Likewise.
      	Remove #ifdef GATHER_STATISTICS wrappers.  Record overhead if
      	GATHER_STATISTICS is non-0.
      	(ggc_free): Convert #ifdef GATHER_STATISTICS to if-code.
      	(sweep_pages): Always increase survived.
      	(ggc_collect_1): Convert #ifdef GATHER_STATISTICS to if-code.
      	(calculate_average_page_survival): Always define.
      	(ggc_collect): Convert #ifdef GATHER_STATISTICS to if-code.
      	(ggc_print_statistics): Likewise.
      	(ggc_pch_read): Likewise.
      	* ggc-page.c (struct globals): Always define "stats" member.
      	(ggc_internal_alloc_stat): Convert #ifdef GATHER_STATISTICS to if-code.
      	(ggc_free): Likewise.
      	(ggc_collec): Likewise.
      	(ggc_print_statistics): Likewise.
      	* bitmap.h (struct bitmap_head_def): Always define "desc" member.
      	(bitmap_initialize_stat): Convert #ifdef GATHER_STATISTICS to if-code.
      	* gimple.h (enum gimple_alloc_kind): Always define.
      	(gimple_alloc_kind): Likewise.
      	* tree-flow.h (phinodes_print_statistics): Always define.
      	(ssanames_print_statistics): Likewise.
      	* vec.h (vec_heap_free): Always define.
      	(VEC_stack_alloc): Define if GATHER_STATISTICS is non-0.
      	* alloc-pool.c (alloc_pool_descriptor): Always define.
      	(create_alloc_pool): Convert #ifdef GATHER_STATISTICS to if-code.
      	(empty_alloc_pool): Likewise.
      	(pool_alloc): Likewise.
      	(pool_free): Likewise.
      	(dump_alloc_pool_statistics): Likewise.
      	(print_statistics): Always define.
      	* bitmap.c (struct bitmap_descriptor): Always define.
      	(bitmap_register): Pass ALONE_FINAL_PASS_MEM_STAT.
      	(register_overhead): Always define.
      	(bitmap_element_free): Convert #ifdef GATHER_STATISTICS to if-code.
      	(bitmap_element_allocate): Likewise.
      	(bitmap_elt_clear_from): Likewise.
      	(bitmap_obstack_alloc_stat): Likewise.
      	(bitmap_gc_alloc_stat): Likewise.
      	(bitmap_obstack_free): Likewise.
      	(bitmap_find_bit): Likewise.
      	(bitmap_ior_and_into):  Likewise.
      	(bitmap_print): Likewise.
      	(dump_bitmap_statistics): Likewise. Return if GATHER_STATISTICS is 0.
      	* gimple.c (gimple_alloc_counts, gimple_alloc_sizes): Always define.
      	(gimple_alloc_kind_names): Likewise.
      	(gimple_alloc_stat): Convert #ifdef GATHER_STATISTICS to if-code.
      	(dump_gimple_statistics): Likewise. Return if GATHER_STATISTICS is 0.
      	* rtl.c (rtx_alloc_counts, rtx_alloc_sizes, rtvec_alloc_counts,
      	rtvec_alloc_sizes): Always define.
      	(rvec_alloc): Convert #ifdef GATHER_STATISTICS to if-code.
      	(rtx_alloc_stat): Likewise.
      	(dump_rtx_statistics): Likewise. Return if GATHER_STATISTICS is 0.
      	* tree.c (_obstack_allocated_p, tree_code_counts, tree_node_counts,
      	tree_node_sizes, tree_node_kind_names): Always define.
      	(record_node_allocation_statistics): Convert #ifdef GATHER_STATISTICS
      	to if-code.
      	(type_hash_canon): Likewise.
      	(dump_tree_statistics): Likewise.
      	* tree-ssanames.c (ssa_name_nodes_reused, ssa_name_nodes_created):
      	Always define.
      	(ssanames_print_statistics): Likewise.
      	(make_ssa_name_fn): Convert #ifdef GATHER_STATISTICS to if-code.
      	* tree-phinodes.c (phi_nodes_reused, phi_nodes_created): Always define.
      	(phinodes_print_statistics): Likewise.
      	(allocate_phi_node): Convert #ifdef GATHER_STATISTICS to if-code.
      	* vec.c (struct vec_descriptor): Always define.
      	(hash_descriptor, eq_descriptor, ptr_hash_entry, hash_ptr, eq_ptr,
      	vec_descriptor, rester_overhead, free_overhead): Likewise.
      	(cmp_statistic): Likewise.
      	(vec_heap_free): Convert #ifdef GATHER_STATISTICS to if-code.
      	(vec_heap_o_reserve_1): Likewise.
      	(dump_vec_loc_statistics): Likewise.
      
      cp/
      	* cp/class.c (n_vtables, n_vtable_entries, n_vtable_searches,
      	n_vtable_elems, n_convert_harshness, n_compute_conversion_costs,
      	n_inner_fields_searched): Always define.
      	(build_primary_vtable): Convert #ifdef GATHER_STATISTICS to if-code.
      	(print_class_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
      	* cp/tree.c (depth_reached): Always define global.
      	(cxx_print_statistics): Convert #ifdef GATHER_STATISTICS to if-code.
      	* cp/pt.c (depth_reached): Always define.
      	(push_tinst_level): Convert #ifdef GATHER_STATISTICS to if-code.
      	* cp/search.c (n_fields_searched, n_calls_lookup_field,
      	n_calls_lookup_field_1, n_calls_lookup_fnfields,
      	n_calls_lookup_fnfields_1, n_calls_get_base_type,
      	n_outer_fields_searched, n_contexts_saved): Always define.
      	(lookup_field_1): Convert #ifdef GATHER_STATISTICS to if-code.
      	(lookup_member): Likewise.
      	(lookup_fnfields_idx_nolazy): Likewise.
      	(print_search_statistics): Likewise.
      	(reinit_search_statistics): Unconditionally re-set counters.
      	* cp/lex.c (retrofit_lang_decl): Convert #ifdef GATHER_STATISTICS
      	to if-code.
      	(cxx_dup_lang_specific_decl): Likewise.
      	(copy_lang_type): Likewise.
      	(cxx_make_type): Likewise.
      
      From-SVN: r189803
      Steven Bosscher committed
  18. 13 Jul, 2012 1 commit
  19. 17 Oct, 2011 1 commit
    • Reduce memory waste due to non-power-of-2 allocs · b9bd6f74
      This patch basically arranges for the allocation size of line_map
      buffers to be as close as possible to a power of two.  This
      *significantly* decreases peak memory consumption as (macro) maps are
      numerous and stay live during all the compilation.
      
      The patch adds a new ggc_round_alloc_size interface to the ggc
      allocator.  In each of the two main allocator implementations ('page'
      and 'zone') the function has been extracted from the main allocation
      function code and returns the actual size of the allocated memory
      region, thus giving a chance to the caller to maximize the amount of
      memory it actually uses from the allocated memory region.  In the
      'none' allocator implementation (that uses xmalloc) the
      ggc_round_alloc_size just returns the requested allocation size.
      
      Co-Authored-By: Dodji Seketeli <dodji@redhat.com>
      
      From-SVN: r180086
      Tom Tromey committed
  20. 16 Aug, 2011 2 commits
  21. 08 Jun, 2010 1 commit
    • utils.c (init_gnat_to_gnu): Use typed GC allocation. · a9429e29
      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
      Laurynas Biveinis committed
  22. 26 May, 2010 1 commit
  23. 25 Nov, 2009 1 commit
    • Remove trailing white spaces. · b8698a0f
      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
      H.J. Lu committed
  24. 28 Sep, 2009 1 commit
  25. 26 May, 2009 1 commit
    • plugins.texi (Loading plugins): typo. · ae2392a9
      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
      Basile Starynkevitch committed
  26. 23 Feb, 2009 1 commit
  27. 20 Jun, 2008 1 commit
    • ggc.h (GGC_RESIZEVAR): New, reorder macros. · 3d9a9f94
      	* 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
      Kaveh R. Ghazi committed
  28. 21 May, 2008 1 commit
    • symtab.h (HT_ALLOCED): Remove. · dae4174e
      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
      Tom Tromey committed
  29. 26 Jul, 2007 1 commit
  30. 23 Dec, 2006 1 commit
    • toplev.c (dump_memory_report): Break out from... · a5573239
      	* 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
      Jan Hubicka committed
  31. 02 Dec, 2005 1 commit
    • ggc.h (GGC_RESIZEVEC): New. · 7767580e
              * 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
      Gabriel Dos Reis committed
  32. 07 Sep, 2005 1 commit
  33. 25 Jun, 2005 1 commit
  34. 02 May, 2005 1 commit
    • ggc.h (ggc_alloc_zone_pass_stat): New macro. · a6e4d85b
      	* 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
      Daniel Jacobowitz committed
  35. 14 Mar, 2005 1 commit