1. 04 Sep, 2012 1 commit
    • Make all VEC_* functions, member functions of vec_t. · bd0c3bfd
      This patch is the first step towards making the API for VEC use
      member functions.
      
      There are no user code modifications in this patch.  Everything
      is still using the VEC_* macros, but this time they expand into
      member function calls.
      
      Because of the way VECs are used, this required some trickery.
      The API allows VECs to be NULL.  This means that services like
      VEC_length(V) will return 0 when V is a NULL pointer.  This is,
      of course, not possible to do if we call V->length().
      
      For functions that either need to allocate/re-allocate the
      vector, or they need to handle NULL vectors, I implemented them
      as static member functions or free functions.
      
      Another wart that I did not address in this patch is the fact
      that vectors of pointers and vectors of objects have slightly
      different semantics when handling elements in the vector.  In
      vector of pointers, we pass them around by value, but in vectors
      of objects, they are passed around via pointers.  That's why we
      need TYPE * and TYPE ** overloads for some functions (e.g.,
      vec_t::iterate).
      
      I will fix these two warts in a subsequent patch.  The idea is to
      make vec_t a single-word structure, which acts as a handler for
      the structure containing the actual vector.  Something like this:
      
      template<typename T>
      struct vec_t
      {
        struct vec_internal<T> *vec_;
      };
      
      This has the advantage that we can now declare the actual vector
      instances as regular variables, instead of pointers.  They will
      use the same amount of memory when embedded in other structures,
      and we will be able to allocate and reallocate the actual data
      without having to mutate the vector instance.
      
      All the functions that are now static members in vec_t, will
      become instance members in the new vec_t.  This will mean that
      all the callers will need to be changed, of course.
      
      Tested on x86_64 and ppc64 with all languages plus ada, go and obj-c++.
      
      	Rewrite VEC_* functions as member functions of vec_t.
      
      	* vec.h: Update documentation.
      	(ALONE_VEC_CHECK_INFO): Define.
      	(ALONE_VEC_CHECK_DECL): Define.
      	(ALONE_VEC_CHECK_PASS): Define.
      	(struct vec_prefix): Rename field NUM to NUM_.
      	Rename field ALLOC to ALLOC_.
      	Update all users.
      	(struct vec_t): Rename field PREFIX to PREFIX_.
      	Rename field VEC to VEC_.
      	Update all users.
      	(vec_t::length): Rename from VEC_length_1.  Update all users.
      	(vec_t::empty): Rename from VEC_empty_1.  Update all users.
      	(vec_t::address): Rename from VEC_address_1.  Update all users.
      	(vec_address): New.
      	(vec_t::last): Rename from VEC_last_1.  Update all users.
      	(vec_t::operator[]): Rename from VEC_index_1.  Update all users.
      	(vec_t::iterate): Rename from VEC_iterate_1.  Update all users.
      	(vec_t::embedded_size): Rename from VEC_embedded_size_1.
      	Update all users.
      	(vec_t::embedded_init): Rename from VEC_embedded_init_1.
      	Update all users.
      	(vec_t::alloc): Rename from VEC_alloc_1.  Update all users.
      	(vec_t::free): Rename from VEC_free_1.  Update all users.
      	(vec_t::copy): Rename from VEC_copy_1.  Update all users.
      	(vec_t::space): Rename from VEC_space_1.  Update all users.
      	(vec_t::reserve): Rename from VEC_reserve_1.  Update all users.
      	(vec_t::reserve_exact): Rename from VEC_reserve_exact_1.
      	Update all users.
      	(vec_t::splice): Rename from VEC_splice_1.  Update all users.
      	(vec_t::safe_splice): Rename from VEC_safe_splice_1.  Update all users.
      	(vec_t::quick_push): Rename from VEC_quick_push_1.  Update all users.
      	(vec_t::safe_push): Rename from VEC_safe_push_1.  Update all users.
      	(vec_t::pop): Rename from VEC_pop_1.  Update all users.
      	(vec_t::truncate): Rename from VEC_truncate_1.  Update all users.
      	(vec_t::safe_grow): Rename from VEC_safe_grow_1.  Update all users.
      	(vec_t::safe_grow_cleared): Rename from VEC_safe_grow_cleared_1.
      	Update all users.
      	(vec_t::replace): Rename from VEC_replace_1.  Update all users.
      	(vec_t::quick_insert): Rename from VEC_quick_insert_1.
      	Update all users.
      	(vec_t::safe_insert): Rename from VEC_safe_insert_1.  Update all users.
      	(vec_t::ordered_remove): Rename from VEC_ordered_remove_1.
      	Update all users.
      	(vec_t::unordered_remove): Rename from VEC_unordered_remove_1.
      	Update all users.
      	(vec_t::block_remove): Rename from VEC_block_remove_1. Update all users.
      	(vec_t::lower_bound): Rename from VEC_lower_bound_1. Update all users.
      
      From-SVN: r190927
      Diego Novillo committed
  2. 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
  3. 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
  4. 16 Jan, 2012 1 commit
  5. 27 May, 2011 1 commit
    • re PR other/48981 (bootstrap-lto -O3 produces miscompiled, broken gcc) · fc64b448
      2011-05-27  Andrew Pinski  <pinskia@gmail.com>
      
      	PR middle-end/48981
      	* gengtype.c (vec_prefix_type): New function.
      	(note_def_vec): Use vec_prefix_type and change the length
      	attribute to be based on the prefix.
      	* vec.c: Include coretypes.h before vec.h.
      	(struct vec_prefix): Remove.
      	(vec_gc_p_reserve): Change the offsetof to sizeof.
      	(vec_gc_p_reserve_exact): Likewise.
      	(vec_heap_p_reserve): Likewise.
      	(vec_heap_p_reserve_exact): Likewise.
      	(vec_stack_o_reserve_1): Copy from +1 instead of from vec.
      	(vec_stack_p_reserve): Change the offsetof to sizeof.
      	(vec_stack_p_reserve_exact): Likewise.
      	* vec.h (struct vec_prefix): New struct definition.
      	(VEC_T(T,B)): Use vec_prefix instead of having num/alloc fields.
      	(VEC_T_GTY(T,B)): Likewise.
      	(DEF_VEC_FUNC_P(T)): Use prefix field.
      	(DEF_VEC_NONALLOC_FUNCS_O(T,A)): Likewise.
      	(DEF_VEC_NONALLOC_FUNCS_I(T,A)): Likewise.
      
      From-SVN: r174359
      Andrew Pinski committed
  6. 03 Jan, 2011 1 commit
  7. 08 Jul, 2010 1 commit
    • toplev.h: Do not include diagnostic-core.h. · 718f9c0f
      2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	* toplev.h: Do not include diagnostic-core.h.
      	Include diagnostic-core.h in every file that includes toplev.h.
      	* c-tree.h: Do not include toplev.h.
      	* pretty-print.h: Update comment.
      	* Makefile.in: Update dependencies.
      	* alias.c: Include diagnostic-core.h in every file that includes
      	toplev.h.
      	* attribs.c: Likewise.
      	* auto-inc-dec.c: Likewise.
      	* bb-reorder.c: Likewise.
      	* bt-load.c: Likewise.
      	* caller-save.c: Likewise.
      	* calls.c: Likewise.
      	* cfg.c: Likewise.
      	* cfganal.c: Likewise.
      	* cfgbuild.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfghooks.c: Likewise.
      	* cfgloop.c: Likewise.
      	* combine.c: Likewise.
      	* config/alpha/alpha.c: Likewise.
      	* config/arc/arc.c: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/arm/pe.c: Likewise.
      	* config/avr/avr.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/cris/cris.c: Likewise.
      	* config/crx/crx.c: Likewise.
      	* config/darwin-c.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/fr30/fr30.c: Likewise.
      	* config/frv/frv.c: Likewise.
      	* config/h8300/h8300.c: Likewise.
      	* config/host-darwin.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/i386/netware.c: Likewise.
      	* config/i386/nwld.c: Likewise.
      	* config/i386/winnt-cxx.c: Likewise.
      	* config/i386/winnt-stubs.c: Likewise.
      	* config/i386/winnt.c: Likewise.
      	* config/ia64/ia64-c.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/iq2000/iq2000.c: Likewise.
      	* config/lm32/lm32.c: Likewise.
      	* config/m32c/m32c-pragma.c: Likewise.
      	* config/m32c/m32c.c: Likewise.
      	* config/m32r/m32r.c: Likewise.
      	* config/m68hc11/m68hc11.c: Likewise.
      	* config/m68k/m68k.c: Likewise.
      	* config/mcore/mcore.c: Likewise.
      	* config/mep/mep-pragma.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/mmix/mmix.c: Likewise.
      	* config/mn10300/mn10300.c: Likewise.
      	* config/moxie/moxie.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/pdp11/pdp11.c: Likewise.
      	* config/picochip/picochip.c: Likewise.
      	* config/rs6000/rs6000-c.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/s390/s390.c: Likewise.
      	* config/score/score.c: Likewise.
      	* config/score/score3.c: Likewise.
      	* config/score/score7.c: Likewise.
      	* config/sh/sh.c: Likewise.
      	* config/sh/symbian-base.c: Likewise.
      	* config/sh/symbian-c.c: Likewise.
      	* config/sh/symbian-cxx.c: Likewise.
      	* config/sol2-c.c: Likewise.
      	* config/sol2.c: Likewise.
      	* config/sparc/sparc.c: Likewise.
      	* config/spu/spu.c: Likewise.
      	* config/stormy16/stormy16.c: Likewise.
      	* config/v850/v850-c.c: Likewise.
      	* config/v850/v850.c: Likewise.
      	* config/vax/vax.c: Likewise.
      	* config/vxworks.c: Likewise.
      	* config/xtensa/xtensa.c: Likewise.
      	* convert.c: Likewise.
      	* cse.c: Likewise.
      	* cselib.c: Likewise.
      	* dbgcnt.c: Likewise.
      	* dbxout.c: Likewise.
      	* ddg.c: Likewise.
      	* dominance.c: Likewise.
      	* emit-rtl.c: Likewise.
      	* explow.c: Likewise.
      	* expmed.c: Likewise.
      	* fixed-value.c: Likewise.
      	* fold-const.c: Likewise.
      	* fwprop.c: Likewise.
      	* gcse.c: Likewise.
      	* ggc-common.c: Likewise.
      	* ggc-page.c: Likewise.
      	* ggc-zone.c: Likewise.
      	* gimple-low.c: Likewise.
      	* gimplify.c: Likewise.
      	* graph.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* ifcvt.c: Likewise.
      	* implicit-zee.c: Likewise.
      	* integrate.c: Likewise.
      	* ira-build.c: Likewise.
      	* ira-color.c: Likewise.
      	* ira-conflicts.c: Likewise.
      	* ira-costs.c: Likewise.
      	* ira-lives.c: Likewise.
      	* ira.c: Likewise.
      	* lists.c: Likewise.
      	* loop-doloop.c: Likewise.
      	* loop-iv.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-symtab.c: Likewise.
      	* main.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* optabs.c: Likewise.
      	* params.c: Likewise.
      	* plugin.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* postreload.c: Likewise.
      	* predict.c: Likewise.
      	* profile.c: Likewise.
      	* real.c: Likewise.
      	* regcprop.c: Likewise.
      	* reginfo.c: Likewise.
      	* regmove.c: Likewise.
      	* reorg.c: Likewise.
      	* resource.c: Likewise.
      	* rtl.c: Likewise.
      	* rtlanal.c: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-ebb.c: Likewise.
      	* sched-rgn.c: Likewise.
      	* sdbout.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* simplify-rtx.c: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* targhooks.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-dump.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-nomudflap.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-optimize.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-loop.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vrp.c: Likewise.
      	* varasm.c: Likewise.
      	* vec.c: Likewise.
      	* web.c: Likewise.
      	* xcoffout.c: Likewise.
      
      c-family/
      	* c-common.h: Include diagnostic-core.h. Error if already
      	included.
      	* c-semantics.c: Do not define GCC_DIAG_STYLE here.
      cp/
      	* cp-tree.h: Do not include toplev.h.
      	
      java/
      	* boehm.c: Include diagnostic-core.h in every file that includes
      	toplev.h.
      	* class.c: Likewise.
      	* constants.c: Likewise.
      	* decl.c: Likewise.
      	* except.c: Likewise.
      	* expr.c: Likewise.
      	* jcf-parse.c: Likewise.
      	* mangle.c: Likewise.
      	* mangle_name.c: Likewise.
      	* resource.c: Likewise.
      	* typeck.c: Likewise.
      	* verify-glue.c: Likewise.
      ada/
      	* gcc-interface/utils.c: Include diagnostic-core.h in every file
      	that includes toplev.h.
      lto/
      	* lto-coff.c: Include diagnostic-core.h in every file that
      	includes toplev.h.
      	* lto-elf.c: Likewise.
      	* lto-lang.c: Likewise.
      	* lto-macho.c: Likewise.
      
      From-SVN: r161943
      Manuel López-Ibáñez committed
  8. 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
  9. 16 Jun, 2009 1 commit
  10. 10 Jun, 2009 1 commit
    • vec.h (DEF_VEC_ALLOC_I): Use DEF_VEC_NONALLOC_FUNCS_I. · c2569604
      	* vec.h (DEF_VEC_ALLOC_I): Use DEF_VEC_NONALLOC_FUNCS_I.
      	(DEF_VEC_ALLOC_P): Use DEF_VEC_NONALLOC_FUNCS_P.
      	(DEF_VEC_ALLOC_O): Use DEF_VEC_NONALLOC_FUNCS_O.
      	(DEF_VEC_ALLOC_FUNC_P): Only define VEC_OP (T,A,alloc).
      	(DEF_VEC_NONALLOC_FUNCS_P): New macro, broken out of old
      	DEF_VEC_ALLOC_FUNC_P.
      	(DEF_VEC_ALLOC_FUNC_O): Only define VEC_OP (T,A,alloc).
      	(DEF_VEC_NONALLOC_FUNCS_O): New macro, broken out of old
      	DEF_VEC_ALLOC_FUNC_O.
      	(DEF_VEC_ALLOC_FUNC_I): Only define VEC_OP (T,A,alloc).
      	(DEF_VEC_NONALLOC_FUNCS_I): New macro, broken out of old
      	DEF_VEC_ALLOC_FUNC_I.
      	(vec_stack_p_reserve, vec_stack_p_reserve_exact): Declare.
      	(vec_stack_p_reserve_exact_1): Declare.
      	(vec_stack_o_reserve, vec_stack_o_reserve_exact): Declare.
      	(vec_stack_free): Declare.
      	(VEC_stack_alloc): Define.
      	(DEF_VEC_ALLOC_P_STACK, DEF_VEC_ALLOC_FUNC_P_STACK): Define.
      	(DEF_VEC_ALLOC_O_STACK, DEF_VEC_ALLOC_FUNC_O_STACK): Define.
      	(DEF_VEC_ALLOC_I_STACK, DEF_VEC_ALLOC_FUNC_I_STACK): Define.
      	* vec.c (void_p): New type.  Call DEF_VEC_P and DEF_VEC_ALLOC_P
      	for void_p.
      	(stack_vecs): New static variable.
      	(vec_stack_p_reserve_exact_1): New function.
      	(vec_stack_o_reserve_1): New static function.
      	(vec_stack_p_reserve, vec_stack_p_reserve_exact): New functions.
      	(vec_stack_o_reserve, vec_stack_o_reserve_exact): New functions.
      	(vec_stack_free): New function.
      	* df-scan.c (df_ref): Use DEF_VEC_P and DEF_VEC_ALLOC_P_STACK.
      	(VEC_df_ref_stack_alloc): Define.
      	(df_mw_hardreg_ptr): New type.  Use DEF_VEC_P and
      	DEF_VEC_ALLOC_P_STACK.
      	(VEC_df_mw_hardreg_ptr_stack_alloc): Define.
      	(struct df_collection_rec): Change _vec fields to VEC.  Remove
      	_use fields.
      	(df_free_collection_rec): Adjust for new fields.
      	(df_insn_rescan): Use new df_collection_rec fields.
      	(df_notes_rescan, df_canonize_collection_rec): Likewise.
      	(df_ref_create_structure, df_ref_record): Likewise.
      	(df_get_conditional_uses, df_get_call_refs): Likewise.
      	(df_insn_refs_collect, df_bb_refs_collect): Likewise.
      	(df_bb_refs_record, df_record_entry_block_defs): Likewise.
      	(df_record_exit_block_uses, df_bb_verify): Likewise.
      	(df_swap_refs): Change ref_vec parameter to VEC.  Change all
      	callers.
      	(df_sort_and_compress_refs): Change ref_vec parameter to VEC.
      	Remove count parameter.  Change return type to void.  Change all
      	callers.
      	(df_sort_and_compress_mws): Change mw_vec parameter to VEC.
      	Remove count parameter.  Change return type to void.  Change all
      	callers.
      	(df_install_refs): Change old_vec parameter to VEC.  Remove count
      	parameter.  Change all callers.
      	(df_install_mws): Change old_vec parameter to VEC.  Remove count
      	parameter.  Change all callers.
      	(df_refs_verify): Change new_rec parameter to VEC.  Change call
      	callers.
      	(df_mws_verify): Likewise.
      
      From-SVN: r148347
      Ian Lance Taylor committed
  11. 30 Apr, 2009 1 commit
  12. 20 Feb, 2009 1 commit
  13. 11 Sep, 2008 1 commit
    • toplev.c (dump_memory_report): Call dump_vec_loc_statistics. · d3492572
      	* toplev.c (dump_memory_report): Call dump_vec_loc_statistics.
      	* vec.c: Include hashtab.h
      	(vec_descriptor, ptr_hash_entry): New structures.
      	(vec_desc_hash, vec_ptr_map): New static variables.
      	(hash_descriptor, eq_descriptor, hash_ptr, eq_ptr, vec_descriptor,
      	register_overhead, free_overhead, vec_heap_free): New functions.
      	(vec_gc_o_reserve_1): ggc_free when resizing to 0.
      	(vec_heap_o_reserve_1): free when resizing to 0; add statistics.
      	(cmp_statistic, add_statistics, dump_vec_loc_statistics): New functions.
      
      From-SVN: r140277
      Jan Hubicka committed
  14. 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
  15. 26 Jul, 2007 1 commit
  16. 17 Jan, 2007 1 commit
    • vec.h (VEC_reserve_exact): Define. · efb7e1e0
      ./:	* vec.h (VEC_reserve_exact): Define.
      	(vec_gc_p_reserve_exact): Declare.
      	(vec_gc_o_reserve_exact): Declare.
      	(vec_heap_p_reserve_exact): Declare.
      	(vec_heap_o_reserve_exact): Declare.
      	(VEC_OP (T,A,reserve_exact)): New static inline function, three
      	versions.
      	(VEC_OP (T,A,reserve)) [all versions]: Remove handling of
      	negative parameter.
      	(VEC_OP (T,A,alloc)) [all versions]: Call ...reserve_exact.
      	(VEC_OP (T,A,copy)) [all versions]: Likewise.
      	(VEC_OP (T,a,safe_grow)) [all versions]: Likewise.
      	* vec.c (calculate_allocation): Add exact parameter.  Change all
      	callers.
      	(vec_gc_o_reserve_1): New static function, from vec_gc_o_reserve.
      	(vec_gc_p_reserve, vec_gc_o_reserve): Call vec_gc_o_reserve_1.
      	(vec_gc_p_reserve_exact, vec_gc_o_reserve_exact): New functions.
      	(vec_heap_o_reserve_1): New static function, from vec_heap_o_reserve.
      	(vec_heap_p_reserve, vec_heap_o_reserve): Call vec_heap_o_reserve_1.
      	(vec_heap_p_reserve_exact): New function.
      	(vec_heap_o_reserve_exact): New function.
      cp/:
      	* class.c (add_method): Call VEC_reserve_exact rather than passing
      	a negative size to VEC_reserve.
      
      From-SVN: r120861
      Ian Lance Taylor committed
  17. 23 Dec, 2006 1 commit
  18. 01 May, 2006 1 commit
  19. 25 Jun, 2005 1 commit
  20. 01 Jun, 2005 1 commit
    • basic-block.h, [...]: Don't include errors.h and include toplev.h if necessary. · 4c714dd4
      	* basic-block.h, bb-reorder.c, c-gimplify.c, config/darwin.c,
      	config/rs6000/rs6000-c.c, dominance.c, gimple-low.c, gimplify.c,
      	lambda-code.c, lambda-trans.c, tree-browser.c, tree-cfg.c,
      	tree-chrec.c, tree-data-ref.c, tree-dfa.c, tree-eh.c,
      	tree-if-conv.c, tree-into-ssa.c, tree-loop-linear.c,
      	tree-mudflap.c, tree-nomudflap.c, tree-outof-ssa.c,
      	tree-pretty-print.c, tree-scalar-evolution.c, tree-sra.c,
      	tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c,
      	tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-live.c,
      	tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
      	tree-ssa-propagate.c, tree-ssa-sink.c, tree-ssa-threadupdate.c,
      	tree-ssa-uncprop.c, tree-ssa.c, tree-vect-analyze.c,
      	tree-vect-transform.c, tree-vectorizer.c, vec.c: Don't include
      	errors.h and include toplev.h if necessary.
      
      	* rtl.c, varray.c: If we're compiling as a GENERATOR_FILE, include
      	errors.h otherwise include toplev.h.
      
      	* Makefile.in: Update dependencies.
      
      ada:
      	* misc.c: Don't include errors.h.
      
      fortran:
      	* fortran/trans-decl.c: Don't include errors.h.
      	* fortran/Make-lang.in: Updates dependencies.
      
      java:
      	* java/verify-glue.c: Don't include errors.h and include toplev.h.
      	* java/Make-lang.in: Updates dependencies.
      
      treelang:
      	* treelang/lex.l, treelang/parse.y: Don't include errors.h and
      	include toplev.h.
      	* treelang/Make-lang.in: Updates dependencies.
      
      From-SVN: r100420
      Kaveh R. Ghazi committed
  21. 21 Apr, 2005 1 commit
    • vec.h: Update API to separate allocation mechanism from type. · d4e6fecb
      	* vec.h: Update API to separate allocation mechanism from type.
      	(VEC_safe_grow): New.
      	* vec.c (calculate_allocation): New.
      	(vec_gc_o_reserve, vec_heap_o_reserve): Adjust.
      	(vec_gc_free, vec_heap_free): Remove.
      	* gengtype-lex.l (DEF_VEC_): Process mult-argument macros.  Adjust.
      	(VEC): Likewise.
      	(mangle_macro_name): New.
      	(struct macro_def): New.
      	(struct macro): Add multiple argument values.
      	(macro_expans_end): New.
      	(push_macro_expansion):  Chain on new macro. Process multiple
      	args, create follow on expansion. Return follow on argument.
      	(macro_input): Deal with multiple arguments.
      
      	* tree.h: Define VEC(tree,heap) and VEC(tree,gc).
      	(struct tree_binfo): Adjust.
      	* basic-block.h: Define VEC(edge,gc).
      	(struct edge_def): Adjust.
      	(struct basic_block_def, struct edge_iterator): Likewise.
      	(ei_container, ei_start_1, ei_last_1): Likewise.
      	* cfg.c (connect_src, connect_dest): Likewise.
      	* cfgrtl.c (force_nonfallthru_and_redirect)
      	* dbxout.c (dbxout_type)
      	* dwarf2out.c (gen_member_die)
      	* lambda-code.c: Define VEC(int,gc), VEC(lambda_loop,gc).
      	(gcc_tree_to_linear_expression): Adjust.
      	(gcc_loop_to_lambda_loop, gcc_loopnest_to_lambda_loopnest,
      	lbv_to_gcc_expression, lle_to_gcc_expression,
      	lambda_loopnest_to_gcc_loopnest, can_convert_to_perfect_nest,
      	perfect_nestify): Likewise.
      	* lambda.h (gcc_loopnest_to_lambda_loopnest,
      	lambda_loopnest_to_gcc_loopnest): Adjust prototypes.
      	* profile.c (instrument_values): Adjust.
      	* tree-cfg.c (modified_noreturn_calls): Adjust.
      	(remove_fallthru_edge): Likewise.
      	* tree-dump.c (dequeue_and_dump): Adjust.
      	* tree-flow-inline.h (mark_stmt_modified): Adjust.
      	* tree-flow.h (modified_noreturn_calls): Adjust.
      	(tree_on_heap): Remove. (yay!)
      	(register_new_def): Adjust.
      	* tree-into-ssa.c: Define VEC(int,heap).
      	(block_defs_stack): Adjust.
      	(find_idf, insert_phi_nodes, register_new_def,
      	rewrite_initialize_block, rewrite_finalize_block,
      	register_new_update_single, rewrite_update_init_block,
      	rewrite_update_fini_block, rewrite_blocks,
      	ssa_rewrite_finalize_block, ssa_register_new_def,
      	ssa_rewrite_initialize_block, rewrite_ssa_into_ssa): Likewise.
      	* tree-loop-linear.c (linear_transform_loops): Adjust.
      	* tree-ssa-alias.c: Define VEC(fieldoff_t,heap).
      	(push_fields_onto_fieldstack, create_overlap_variables_for): Adjust.
      	* tree-ssa-dom.c (avail_exprs_stack, block_defs_stack,
      	stmts_to_rescan, const_and_copies_stack, nonzero_vars_stack,
      	vrp_variables_stack): Adjust declarations.
      	(tree_ssa_dominator_optimize): Adjust.
      	(dom_opt_initialize_block, remove_local_expressions_from_table,
      	restore_nonzero_vars_to_original_value,
      	restore_vars_to_original_value,
      	restore_currdefs_to_original_value, dom_opt_finalize_block,
      	record_var_is_nonzero, record_cond, record_const_or_copy_1,
      	optimize_stmt, update_rhs_and_lookup_avail_expr,
      	lookup_avail_expr, record_range): Likewise.
      	* tree-ssa-pre.c: Define VEC(basic_block,heap).
      	(compute_antic_aux): Adjust.
      	(inserted_exprs, create_expression_by_pieces,
      	insert_into_preds_of_block, eliminate, mark_operand_necessary,
      	remove_dead_inserted_code, fini_pre): Likewise.
      	* tree-ssa-propagate.c (interesting_ssa_edges): Adjust.
      	(varying_ssa_edges, add_ssa_edge, process_ssa_edge_worklist.
      	ssa_prop_init): Likewise.
      	* tree-ssa.c: Define VEC(bitmap,heap).
      	(verify_name_tags): Adjust.
      	* value-prof.c (rtl_divmod_values_to_profile): Adjust.
      	(insn_prefetch_values_to_profile, rtl_find_values_to_profile,
      	tree_divmod_values_to_profile, tree_find_values_to_profile,
      	value_profile_transformations): Likewise.
      	* value-prof.h: Define VEC(histogram_value,heap).
      	* varasm.c: Remove alias_pair pointer typedef, define
      	VEC(alias_pair,gc).
      	(finish_aliases_1, finish_aliases_2, assemble_alias): Adjust.
      
      	* config/pa/pa.c (typedef extern_symbol): Typedef the structure,
      	not a pointer to it.  Create an object vector.
      	(extern_symbols): Turn into an object vector.
      	(pa_hpux_asm_output_external, pa_hpux_file_end): Adjust.
      
      	* cp/cp-tree.h: Adjust for new VEC API.
      	Define VEC(tree_pair_s,gc).
      	(struct save_scope): Adjust.
      	(struct lang_type_class): Adjust.
      	(unemitted_tinfo_decls): Adjust.
      	* cp/class.c (add_method, resort_type_method_vec,
      	finish_struct_methods, struct find_final_overrider_data,
      	dfs_find_final_overrider_pre, find_final_overrider,
      	get_vcall_index, warn_hidden, walk_subobject_offsets,
      	check_methods, fixup_inline_methods, end_of_class,
      	warn_about_ambiguous_bases, finish_struct, build_vtbl_initializer,
      	add_vcall_offset): Adjust.
      	* cp/decl.c (xref_basetypes, finish_method): Adjust.
      	* cp/decl2.c (check_classfn): Adjust.
      	* cp/init.c (sort_mem_initializers, push_base_cleanups): Adjust.
      	* cp/method.c (do_build_copy_constructor): Adjust.
      	* cp/name-lookup.c (new_class_binding, store_binding,
      	store_bindings, store_class_bindings): Adjust.
      	* cp/name-lookup.h: Define VEC(cxx_saved_binding,gc),
      	VEC(cp_class_binding,gc).
      	(struct cp_binding_level): Adjust.
      	* cp/parser.c: Define VEC(cp_token_position,heap).
      	(struct cp_lexer): Adjust.
      	(cp_lexer_new_main, cp_lexer_new_from_tokens, cp_lexer_destroy,
      	cp_lexer_save_tokens): Adjust.
      	* cp/pt.c (retrieve_specialization,
      	check_explicit_specialization): Adjust.
      	* cp/rtti.c (unemitted_tinfo_decls): Adjust.
      	(init_rtti_processing, get_tinfo_decl, get_pseudo_ti_init,
      	get_pseudo_ti_desc): Adjust.
      	* cp/search.c (dfs_access_in_type, lookup_conversion_operator,
      	lookup_fnfields_1, dfs_walk_once, dfs_walk_once_accessible,
      	dfs_get_pure_virtuals, lookup_conversions_r, binfo_for_vbase): Adjust.
      	* cp/semantics.c: Define VEC(deferred_access,gc).
      	(push_deferring_access_checks): Adjust.
      	* cp/typeck2.c (abstract_virtuals_error): Adjust.
      
      From-SVN: r98498
      Nathan Sidwell committed
  22. 12 Mar, 2005 1 commit
    • cfglayout.c, [...]: Update copyright. · c6c81aa6
      	* cfglayout.c, loop-doloop.c, profile.c, target-def.h,
      	target.h, targhooks.c, tracer.c, tree-ssa-loop-ch.c,
      	tree-ssa-loop-unswitch.c, tree-ssa-loop.c, vec.c, vmsdbgout.c,
      	config/m32r/m32r.md, config/xtensa/xtensa.h: Update copyright.
      
      From-SVN: r96320
      Kazu Hirata committed
  23. 10 Mar, 2005 1 commit
    • value-prof.c (rtl_find_values_to_profile): Use gcc_assert and gcc_unreachable. · fbc848cc
      	* value-prof.c (rtl_find_values_to_profile): Use gcc_assert and
      	gcc_unreachable.
      	(rtl_register_value_prof_hooks,
      	tree_value_profile_transformations,
      	tree_register_value_prof_hooks): Likewise.
      	* var-tracking.c (stack_adjust_offset_pre_post,
      	variable_htab_free, variable_union, dataflow_set_different_2,
      	count_uses, variable_was_changed, set_frame_base_location,
      	set_variable_part, emit_note_insn_var_location, vt_emit_notes,
      	vt_add_function_parameters): Likewise.
      	* varasm.c (named_section_real, named_section, make_decl_rtl,
      	asm_emit_uninitialised, assemble_integer, decode_addr_const,
      	const_hash_1, compare_constant, copy_constant, force_const_mem,
      	output_constant_pool_2, output_constant_pool_1, output_constant,
      	output_constructor, make_decl_one_only, decl_tls_model,
      	default_no_named_section, default_elf_select_section_1,
      	default_unique_section_1): Likewise.
      	* vec.c (vec_gc_o_reserve, vec_heap_o_reserve): Likewise.
      	* vmsdbgout.c (addr_const_to_string): Likewise.
      
      From-SVN: r96241
      Nathan Sidwell committed
  24. 08 Sep, 2004 1 commit
    • vec.c (vec_p_reserve, [...]): Rename to ... · 4c254e68
      	* vec.c (vec_p_reserve, vec_o_reserve): Rename to ...
      	(vec_gc_p_reserve, vec_gc_o_reserve): ... here. Clone to
      	(vec_heap_p_reserve, vec_heap_o_reserve): ... here, adjust.
      	(vec_gc_free, vec_heap_free): New.
      	* vec.h (DEF_VEC_GC_P, DEF_VEC_MALLOC_P): New.
      	(DEF_VEC_P): Add allocator argument. Adjust.
      	(DEF_VEC_GC_O, DEF_VEC_MALLOC_O): New.
      	(DEF_VEC_O): Add allocator argument. Adjust.
      	(VEC(free)): New.
      
      	* tree.h (tree): Define a GC'd vector.
      	* lamba-code.c (lambda_loop): Likewise.
      	* value-prof.h (histogram_value): Likewise.
      	* cp/cp-tree.h (tree_pair_s): Likewise.
      	* cp/name-lookup.h (cxx_saved_binding, cp_class_binding): Likewise.
      	* cp/semantics.c (deferred_access): Likewise.
      
      From-SVN: r87179
      Nathan Sidwell committed
  25. 05 Sep, 2004 1 commit
    • c-common.c, [...]: Fix comment typos. · 2a7e31df
      	* c-common.c, cfgexpand.c, cgraphunit.c, defaults.h,
      	et-forest.c, expr.c, gimplify.c, global.c, gthr-lynx.h,
      	hard-reg-set.h, modulo-sched.c, optabs.c, postreload-gcse.c,
      	tree-data-ref.c, tree-flow.h, tree-if-conv.c, tree-inline.c,
      	tree-sra.c, tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c,
      	tree-ssa-loop-niter.c, tree-ssa-operands.c,
      	tree-ssa-operands.h, tree-ssa-propagate.c,
      	tree-ssa-propagate.h, tree-ssa-threadupdate.c, value-prof.c,
      	vec.c, vec.h: Fix comment typos.  Follow spelling conventions.
      
      From-SVN: r87104
      Kazu Hirata committed
  26. 20 Jul, 2004 1 commit
    • vec.h (VEC_T_length, [...]): Use unsigned, not size_t. · 3cbf09de
      	* vec.h (VEC_T_length, VEC_T_index, VEC_T_iterate, VEC_T_truncate,
      	VEC_T_replace, VEC_T_quick_insert, VEC_T_safe_insert,
      	VEC_T_ordered_remove, VEC_T_unordered_remove): Use unsigned, not
      	size_t.
      	(struct VEC): Use unsigned for num and alloc.
      	* vec.c (struct vec_prefix): Likewise.
      	(vec_o_reserve): Adjust.
      
      From-SVN: r84973
      Nathan Sidwell committed
  27. 09 Jul, 2004 1 commit
  28. 08 Jul, 2004 2 commits
  29. 06 Jul, 2004 1 commit
    • vec.h (VEC_embedded_alloc): Remove. · a064479c
      	* vec.h (VEC_embedded_alloc): Remove.
      	(VEC_embedded_size, VEC_embedded_init): New.
      	(VEC_alloc, VEC_reserve, VEC_safe_push, VEC_safe_insert): Add
      	MEM_STAT_INFO.
      	(VEC_truncate): New.
      	(vec_p_reserve, vec_o_reserve): Add MEM_STAT_DECL.
      	(vec_embedded_alloc): Remove.
      	* vec.c (vec_p_reserve, vec_o_reserve): Add MEM_STAT_DECL, adjust.
      	(vec_embedded_alloc): Remove.
      
      From-SVN: r84159
      Nathan Sidwell committed
  30. 28 Jun, 2004 1 commit