aboutsummaryrefslogtreecommitdiff
path: root/gcc/vec.c
AgeCommit message (Collapse)AuthorFilesLines
2008-06-20ggc.h (GGC_RESIZEVAR): New, reorder macros.Kaveh R. Ghazi1-2/+2
* 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
2007-07-26Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton1-5/+4
License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
2007-01-17vec.h (VEC_reserve_exact): Define.Ian Lance Taylor1-34/+109
./: * 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
2006-12-23vec.c: Don't include tree.h.Andrew Pinski1-1/+0
2006-12-23 Andrew Pinski <pinskia@gmail.com> * vec.c: Don't include tree.h. * Makefile.in (vec.o): Update dependencies. (build/vec.o): Likewise. From-SVN: r120178
2006-05-01vec.c: Include bconfig.h when appropriate.DJ Delorie1-1/+8
* vec.c: Include bconfig.h when appropriate. * Makefile.in (build/vec.o): Adjust dependencies. * mkconfig.sh: Make sure config.h isn't used for build machine compiles. From-SVN: r113432
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-01basic-block.h, [...]: Don't include errors.h and include toplev.h if necessary.Kaveh R. Ghazi1-1/+1
* 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
2005-04-21vec.h: Update API to separate allocation mechanism from type.Nathan Sidwell1-51/+60
* 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
2005-03-12cfglayout.c, [...]: Update copyright.Kazu Hirata1-1/+1
* 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
2005-03-10value-prof.c (rtl_find_values_to_profile): Use gcc_assert and gcc_unreachable.Nathan Sidwell1-4/+2
* 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
2004-09-08vec.c (vec_p_reserve, [...]): Rename to ...Nathan Sidwell1-6/+65
* 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
2004-09-05c-common.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* 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
2004-07-20vec.h (VEC_T_length, [...]): Use unsigned, not size_t.Nathan Sidwell1-3/+3
* 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
2004-07-09* vec.c, vec.h (vec_assert_fail): Use unsigned int for LINE argument.Zack Weinberg1-1/+1
From-SVN: r84398
2004-07-08* vec.c (vec_assert_fail): Remove duplicate 'function'.Nathan Sidwell1-2/+1
From-SVN: r84282
2004-07-08vec.c (vec_p_reserve, [...]): Allocation is signed.Nathan Sidwell1-22/+23
.: * vec.c (vec_p_reserve, vec_o_reserve): Allocation is signed. * vec.h (VEC_alloc, VEC_embedded_size, VEC_embedded_init): Allocation is signed. (VEC_reserve): Return flag, allocation is signed. cp: * name-lookup.c (push_binding): Use VEC_reserve. From-SVN: r84281
2004-07-06vec.h (VEC_embedded_alloc): Remove.Nathan Sidwell1-21/+7
* 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
2004-06-28vec.h, vec.c: New, type safe vector API.Nathan Sidwell1-0/+104
* vec.h, vec.c: New, type safe vector API. * Makefile.in (OBJS-common): Add vec.o. (vec.o): New target. (gengtype-lex.o): Depend on vec.h. From-SVN: r83769