Commit Graph

56 Commits

Author SHA1 Message Date
Jan Hubicka 2b557972cf re PR gcov-profile/20815 (-fprofile-use barfs with "coverage mismatch for function '...' while reading counter 'arcs'.")
PR profile/20815
	* coverage.c (coverage_checksum_string): Fix code to stip random seeds
	from symbol names while computing checkup.

From-SVN: r106283
2005-10-31 18:23:44 +00:00
Jan Hubicka 8a76829ccf Makefile.in (rtl-profile.o): Kill all traces of it.
* Makefile.in (rtl-profile.o): Kill all traces of it.
	* common.opt (fspeculative-prefetching, ftree-based-profiling): Kill.
	* coverage.h (rtl_coverage_counter_ref): Kill.
	* opts.c (flag_speculative_prefetching_set): Kill.
	(flag_loop_optimize_set): New.
	(common_handle_option): Disable loop optimizer when profiling;
	do not handle speculative prefetching.
	* passes.c (init_optimization_passes): Replace pass_profiling combo
	by branch_prob pass.
	* profile.c (compute_value_histograms): Update for simplified value
	profiles.
	(rtl_register_profile_hooks): Kill.
	(pass_profiling): Kill.
	(rest_of_handle_branch_prob): Do not profile.
	* toplev.c (process_options): Remove speculative prefetching.
	* toplev.h (flag_tree_based_profiling): Kill.
	* tree-profile.c (prepare_instrumented_value,
	tree_gen_interval_profiler, tree_gen_pow2_profiler,
	tree_gen_one_value_profiler, do_tree_profiling): Update for
	simplified datastructures.
	* value-prof.c: Add comment that speculative prefetching was dropped;
	update rest of file for simplified datastructures.
	(NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX,
	rtl_divmod_values_to_profile, insn_prefetch_values_to_profile,
	find_mem_reference_1, find_mem_reference_2, find_mem_reference,
	rtl_values_to_profile, rtl_divmod_fixed_value, rtl_mod_pow2,
	rtl_mod_subtract, gen_speculative_prefetch,
	rtl_divmod_fixed_value_transform, rtl_mod_pow2_value_transform,
	rtl_mod_subtract_transform, speculative_prefetching_transform): Kill.
	(gate_handle_value_profile_transformations,
	rest_of_handle_value_profile_transformations,
	pass_value_profile_transformations): Kill.
	* value-prof.h (histogram_value_t): Remove IL based unions.
	(rtl_register_value_prof_hooks, rtl_register_profile_hooks,
	rtl_profile_hooks): Remove hooks.

	* invoke.texi (-ftree-based-profiling, -fspeculative-prefetching): Kill.

	* inliner-1.c: Do not dump everything.
	* tree-prof.exp: Do not pass -ftree-based-profiling.
	* bprob.exp: Likewise.

From-SVN: r102522
2005-07-28 21:48:38 +00:00
Giovanni Bajo 4038c495fc Make CONSTRUCTOR use VEC to store initializers.
* c-common.c (complete_array_type): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* c-pretty-print.c (pp_c_initializer_list): Use pp_c_constructor_elts.
	(pp_c_constructor_elts): New function.
	* c-pretty-print.h (pp_c_constructor_elts): Declare.
	* c-typeck.c (build_function_call, build_c_cast, digest_init,
	struct constructor_stack, struct initializer_stack,
	constructor_elements, push_init_level, pop_init_level,
	add_pending_init, find_init_member, output_init_element): Update to
	cope with VEC in CONSTRUCTOR_ELTS.
	* coverage.c (build_fn_info_value, build_ctr_info_value,
	build_gcov_info): Likewise.
	* expr.c (categorize_ctor_elements_1, store_constructor,
	expand_expr_real_1): Likewise.
	* fold-const.c (fold_ternary): Likewise.
	* gimplify.c (gimplify_init_ctor_preeval, zero_sized_field_decl,
	gimplify_init_constructor, gimplify_expr): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.
	* tree-inline.c (copy_tree_r): Add code to duplicate a CONSTRUCTOR
	node.
	* tree-pretty-print.c (dump_generic_node): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* tree-sra.c (generate_element_init_1): Likewise.
	* tree-ssa-ccp.c (fold_const_aggregate_ref): Likewise.
	* tree-ssa-operands.c (get_expr_operands): Likewise.
	* tree-vect-generic.c (expand_vector_piecewise): Likewise.
	* tree-vect-transform.c (vect_get_vec_def_for_operand):
	(get_initial_def_for_reduction): Likewise.
	* tree-vn.c (set_value_handle, get_value_handle): CONSTURCTOR uses
	value handle in annotations.
	* tree.c (tree_node_kind, tree_code_size, make_node_stat,
	tree_node_structure): Add support for constr_kind.
	(build_vector_from_ctor, build_constructor_single,
	build_constructor_from_list): New functions.
	(build_constructor): Update to take a VEC instead of a TREE_LIST.
	(simple_cst_equal, iterative_hash_expr, initializer_zerop, walk_tree):
	Update to cope with VEC in CONSTRUCTOR_ELTS.
	* tree.def (CONSTRUCTOR): Make it a tcc_exceptional node.
	* tree.h (FOR_EACH_CONSTRUCTOR_VALUE, FOR_EACH_CONSTRUCTOR_ELT,
	CONSTRUCTOR_APPEND_ELT): New macros.
	(struct constructor_elt, struct	tree_constructor): New data types.
	(union tree_node): Add tree_constructor field.
	* treestruct.def: Define TS_CONSTRUCTOR.
	* varasm.c (const_hash_1, compare_constant, copy_constant,
	compute_reloc_for_constant, output_addressed_constants,
	initializer_constant_valid_p, output_constant,
	array_size_for_constructor, output_constructor): Update to cope with
	VEC in CONSTRUCTOR_ELTS.
	* vec.h (VEC_empty, VEC_copy): New macros.

ada/
	Make CONSTRUCTOR use VEC to store initializers.
	* decl.c (gnat_to_gnu_entity): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* trans.c (extract_values): Likewise.
	* utils.c (convert, remove_conversions): Likewise.
	* utils2.c (contains_save_expr_p, build_binary_op, build_unary_op,
	gnat_build_constructor): Likewise.

cp/
	Make CONSTRUCTOR use VEC to store initializers.
	* call.c (convert_default_arg): Update call to digest_init.
	* class.c (dump_class_hierarchy, dump_array): Update to cope with
	VEC in CONSTRUCTOR_ELTS.
	* cp-tree.h (EMPTY_CONSTRUCTOR_P): Likewise.
	(finish_compound_literal, digest_init): Update declaration.
	* decl.c (struct reshape_iter): New data type.
	(reshape_init_array): Rename to...
	(reshape_init_array_1): Update to cope with VEC in CONSTRUCTOR_ELTS.
	(reshape_init): Rewrite from scratch. Split parts into...
	(reshape_init_array, reshape_init_vector, reshape_init_class,
	reshape_init_r): New functions.
	(check_initializer): Update call to reshape_init. Remove obsolete
	code.
	(initialize_artificial_var, cp_complete_array_type): Update to cope
	with VEC in CONSTRUCTOR_ELTS.
	* decl2.c (grokfield): Update calls to digest_init.
	(mark_vtable_entries): Update to cope with VEC in CONSTRUCTOR_ELTS.
	* error.c (dump_expr_init_vec): New function.
	(dump_expr): Use dump_expr_init_vec.
	* init.c (build_zero_init, build_vec_init): Update to cope with VEC
	in CONSTRUCTOR_ELTS.
	(expand_default_init): Update call to digest_init.
	* parser.c  (cp_parser_postfix_expression): Use a VEC for the
	initializers.
	(cp_parser_initializer_list): Build a VEC of initializers.
	* pt.c (tsubst_copy, tsubst_copy_and_build): Update to cope with VEC
	in CONSTRUCTOR_ELTS.
	* rtti.c (tinfo_base_init, generic_initializer, ptr_initializer,
	ptm_initializer, class_initializer, get_pseudo_ti_init): Use
	build_constructor_from_list instead of build_constructor.
	* semantics.c (finish_compound_literal): Update call to digest_init.
	* tree.c (stabilize_init): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* typeck.c (build_ptrmemfunc1): Likewise.
	* typeck2.c: (cxx_incomplete_type_error, split_nonconstant_init_1):
	Likewise.
	(store_init_value): Use build_constructor_from_list and update call
	to digest_init.
	(digest_init): Rewrite.
	(process_init_constructor): Rewrite from scratch. Split into...
	(process_init_constructor_array, picflag_from_initializer,
	process_init_constructor_record, process_init_constructor_union):
	New functions.
	(PICFLAG_ERRONEOUS, PICFLAG_NOT_ALL_CONSTANT, PICFLAG_NOT_ALL_SIMPLE):
	New macros.
	(build_functional_cast): Use build_constructor_from_list instead of
	build_constructor.

fortran/
	Make CONSTRUCTOR use VEC to store initializers.
	* trans-array.c (gfc_build_null_descriptor,
	gfc_trans_array_constructor_value, gfc_conv_array_initializer):
	Update to cope with VEC in CONSTRUCTOR_ELTS.
	* trans-common.c (create_common): Likewise.
	* trans-expr.c (gfc_conv_structure): Likewise.
	* trans-stmt.c (gfc_trans_character_select): Use
	build_constructor_from_list instead of build_constructor.

java/
	Make CONSTRUCTOR use VEC to store initializers.
	* check-init.c (check_init): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* class.c (make_field_value, make_method_value, get_dispatch_table,
	make_class_data, emit_symbol_table, emit_catch_table,
	emit_assertion_table): Use build_constructor_from_list instead of
	build_constructor.
	* constants.c (build_constants_constructor): Likewise.
	* java-gimplify.c (java_gimplify_new_array_init): Update to cope with
	VEC in CONSTRUCTOR_ELTS.
	* java-tree.h (START_RECORD_CONSTRUCTOR, PUSH_SUPER_VALUE,
	PUSH_FIELD_VALUE, FINISH_RECORD_CONSTRUCTOR): Create a VEC instead
	of a TREE_LIST.
	* jcf-write.c (generate_bytecode_insns): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	* parse.y (build_new_array_init): Use build_constructor_from_list
	instead of build_constructor.
	(patch_new_array_init): Update to cope with VEC in
	CONSTRUCTOR_ELTS.
	(array_constructor_check_entry): Likewise.

objc/
	Make CONSTRUCTOR use VEC to store initializers.
	* objc-act.c (objc_build_constructor): Use build_constructor_from_list
	instead of build_constructor.

testsuite/
	Make CONSTRUCTOR use VEC to store initializers.
	* g++.dg/ext/complit3.C: Check for specific error messages.
	* g++.dg/init/brace2.C: Update error message.
	* g++.dg/warn/Wbraces2.C: Likewise.

From-SVN: r102182
2005-07-20 01:19:59 +00:00
Joseph Myers ab532386bd bb-reorder.c, [...]: Avoid "." or "\n" at end of diagnostics and capital letters at start of diagnostics.
* bb-reorder.c, c-pch.c, c-pragma.c, c.opt, cfghooks.c, cfgloop.c,
	cfgrtl.c, cgraphunit.c, config/c4x/c4x.c, config/cris/cris.c,
	config/frv/frv.c, config/host-darwin.c, config/iq2000/iq2000.c,
	config/lynx.h, config/m68k/m68k.c, config/pa/pa.c, config/sh/sh.h,
	config/stormy16/stormy16.c, config/v850/v850.c,
	config/vax/netbsd-elf.h, coverage.c, dwarf2out.c, emit-rtl.c,
	except.c, gcc.c, tree-cfg.c, tree-eh.c, tree-ssa.c, xcoffout.c:
	Avoid "." or "\n" at end of diagnostics and capital letters at
	start of diagnostics.
	* combine.c, cse.c: Don't translate dump file output.
	* toplev.c (print_version): Only translate output if going to
	stderr.

From-SVN: r101561
2005-07-03 22:08:11 +01:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Kazu Hirata fe9565ed02 attribs.c, [...]: Update copyright.
* attribs.c, c-pragma.c, caller-save.c, cfghooks.h,
	coverage.c, cselib.h, domwalk.c, domwalk.h, errors.c,
	errors.h, gcov-dump.c, gcov-io.c, gcov-io.h, gen-protos.c,
	genattrtab.h, genextract.c, gthr-win32.h, insn-notes.def,
	integrate.c, lambda-mat.c, lambda.h, libgcov.c, local-alloc.c,
	machmode.def, mips-tfile.c, params.c, pretty-print.c,
	print-rtl.c, protoize.c, regmove.c, sched-vis.c, tree-chrec.h,
	tree-data-ref.h, vec.h, config/darwin-c.c, config/sol2-c.c,
	config/sol2.c, config/arm/arm-cores.def, config/arm/cirrus.md,
	config/arm/symbian.h, config/c4x/c4x.c, config/c4x/c4x.h,
	config/i386/cygming.h, config/i386/djgpp.h,
	config/i386/lynx.h, config/i386/netware.c,
	config/i386/winnt.c, config/ia64/ia64-c.c,
	config/iq2000/iq2000.c, config/m32r/little.h,
	config/m68k/m68k-protos.h, config/m68k/m68k.h,
	config/m68k/m68k.md, config/mcore/mcore.c,
	config/mcore/mcore.h, config/mmix/mmix.c, config/mmix/mmix.md,
	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
	config/mn10300/mn10300.h, config/ns32k/netbsd.h,
	config/ns32k/ns32k.c, config/ns32k/ns32k.h,
	config/pa/pa-hpux11.h, config/pdp11/pdp11.c,
	config/pdp11/pdp11.h, config/rs6000/darwin.h,
	config/rs6000/default64.h, config/rs6000/rs6000-c.c,
	config/s390/2064.md, config/s390/2084.md,
	config/s390/s390-modes.def, config/s390/s390-protos.h,
	config/s390/tpf.h, config/sh/sh.h, config/sh/symbian.c,
	config/stormy16/stormy16.c, config/vax/vax-protos.h,
	config/vax/vax.c, config/vax/vax.h,
	config/xtensa/lib1funcs.asm, config/xtensa/xtensa.md: Update
	copyright.

From-SVN: r98914
2005-04-28 05:38:50 +00:00
DJ Delorie d4ee4d2525 diagnostic.c (warning): Accept parameter to classify warning option.
* diagnostic.c (warning): Accept parameter to classify warning option.
(warning0): New, for when a pointer to an error() like function is needed.
* errors.c (warning): Likewise.
* errors.h (warning, warning0): Adjust prototypes.
* toplev.h (warning, warning0): Likewise.

* attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.

* config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
config/darwin.c, config/darwin.h, config/h8300/h8300.c,
config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
config/rs6000/aix52.h, config/rs6000/darwin.h,
config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
config/stormy16/stormy16.c, config/v850/v850-c.c,
config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
callers.

* ada/misc.c: Adjust warning() callers.

* cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.

* fortran/trans-decl.c: Adjust warning() callers.

* java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
callers.

* objc/objc-act.c: Adjust warning() callers.

* treelang/parse.y: Adjust warning() callers.

From-SVN: r98633
2005-04-23 17:29:07 -04:00
Richard Sandiford 070e396943 coverage.h (GCOV_TYPE_NODE): Delete.
* coverage.h (GCOV_TYPE_NODE): Delete.
	* coverage.c (coverage_counter_alloc, tree_coverage_counter_ref)
	(build_ctr_info_type): Use get_gcov_type () instead of GCOV_TYPE_NODE.
	* tree-profile.c (tree_gen_edge_profiler, tree_gen_interval_profiler)
	(tree_gen_pow2_profiler, tree_gen_one_value_profiler): Likewise.
	* value-prof.c (tree_divmod_fixed_value_transform): Delete.

From-SVN: r97760
2005-04-06 22:50:29 +00:00
Richard Sandiford 251e2ff23f system.h (GCOV_SIZE_TYPE): Unposion.
* system.h (GCOV_SIZE_TYPE): Unposion.
	* gcov-io.h (GCOV_TYPE_NODE): Delete, replacing with...
	(GCOV_TYPE_SIZE): ...this new macro.
	* coverage.h (get_gcov_type, GCOV_TYPE_NODE): Declare.
	* coverage.c (get_gcov_type, get_gcov_unsigned_t): New functions.
	(rtl_coverage_counter_ref): Use GCOV_TYPE_SIZE.
	(build_fn_info_type, build_fn_info_value, build_ctr_info_type)
	(build_ctr_info_value, build_gcov_info): Use get_gcov_unsigned_t
	instead of unsigned_intSI_type_node.
	* rtl-profile.c (rtl_gen_interval_profiler, rtl_gen_pow2_profiler)
	(rtl_gen_one_value_profiler_no_edge_manipulation)
	(rtl_gen_const_delta_profiler): Use GCOV_TYPE_SIZE.
	* value-prof.c: Include coverage.h.

From-SVN: r97570
2005-04-04 19:41:14 +00:00
Joseph Myers 971801fff6 attribs.c, [...]: Use %<, %> and %q for quoting in diagnostics going through pretty-print.c.
gcc:
	* attribs.c, builtins.c, c-format.c, c-pch.c, coverage.c,
	except.c, fold-const.c, function.c, langhooks.c, params.c,
	reload.c, reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
	tree-dump.c, tree-mudflap.c, tree.c, varasm.c: Use %<, %> and %q
	for quoting in diagnostics going through pretty-print.c.  Use ''
	for quoting in other diagnostic text.
	* langhooks.c: Include intl.h.  Mark text locating diagnostics for
	translation.
	* Makefile.in (langhooks.o): Update dependencies.
	* pretty-print.h (pp_printf): Mark as accepting GCC diagnostic
	formats.

gcc/testsuite:
	* g++.dg/ext/member-attr.C, g++.dg/warn/deprecated.C,
	gcc.dg/deprecated.c, gcc.dg/noreturn-1.c, gcc.dg/noreturn-4.c:
	Update expected messages.

libmudflap:
	* testsuite/libmudflap.c/pass35-frag.c: Update expected message.

From-SVN: r87563
2004-09-15 21:48:10 +01:00
Nathan Sidwell 341c100fc5 cfganal.c (flow_depth_first_order_compute, [...]): Use gcc_assert or gcc_unreachable.
* cfganal.c (flow_depth_first_order_compute, dfs_enumerate_from,
	cfgbuild.c, inside_basic_block_p, control_flow_insn_p,
	make_label_edge, make_edges, find_basic_blocks_1): Use gcc_assert
	or gcc_unreachable.
	* cfg.c (clear_edges, initialize_bb_rbi, compact_blocks,
	remove_edge, alloc_aux_for_blocks, free_aux_for_blocks,
	alloc_aux_for_edges, free_aux_for_edges): Likewise.
	* cfgcleanup.c (try_forward_edges,
	merge_blocks_move_predecessor_nojumps,
	merge_blocks_move_successor_nojumps): Likewise.
	* cfgexpand.c (expand_gimple_cond_expr,
	expand_gimple_tailcall): Likewise.
	* cfghooks.c (duplicate_block): Likewise.
	* cfglayout.c (record_effective_endpoints,
	insn_locators_initialize, change_scope, fixup_reorder_chain,
	verify_insn_chain, fixup_fallthru_exit_predecessor,
	duplicate_insn_chain, cfg_layout_finalize): Likewise.
	* cfgloopanal.c (check_irred): Likewise.
	* cfgloop.c (superloop_at_depth, flow_loops_free,
	flow_loop_entry_edges_find, flow_loops_find,
	flow_loop_outside_edge_p, get_loop_body,
	get_loop_body_in_dom_order, get_loop_body_in_bfs_order,
	get_loop_exit_edges, num_loop_branches, cancel_loop,
	verify_loop_structure): Likewise.
	cfgloopmanip.c (find_path, remove_path, loop_delete_branch_edge,
	duplicate_loop_to_header_edge, create_preheader,
	create_loop_notes): Likewise.
	* cfgrtl.c (delete_insn, try_redirect_by_replacing_jump,
	edirect_branch_edge, force_nonfallthru_and_redirect,
	rtl_split_edge, insert_insn_on_edge, commit_one_edge_insertion,
	commit_edge_insertions, commit_edge_insertions_watch_calls,
	purge_dead_edges, cfg_layout_redirect_edge_and_branch,
	cfg_layout_redirect_edge_and_branch_force,
	cfg_layout_merge_blocks, rtl_flow_call_edges_add): Likewise.
	* cgraph.c (cgraph_node, cgraph_create_edge, cgraph_remove_edge,
	cgraph_redirect_edge_callee, cgraph_global_info, cgraph_rtl_info,
	cgraph_varpool_node): Likewise.
	* cgraphunit.c (cgraph_finalize_function,
	cgraph_finalize_compilation_unit, cgraph_mark_functions_to_output,
	cgraph_expand_function, cgraph_remove_unreachable_nodes,
	cgraph_clone_inlined_nodes, cgraph_mark_inline_edge,
	cgraph_mark_inline, cgraph_expand_all_functions,
	cgraph_build_static_cdtor): Likewise.
	* combine.c  (do_SUBST, try_combine, subst, combine_simplify_rtx,
	simplify_logical, distribute_notes, insn_cuid): Likewise.
	* conflict.c (conflict_graph_add, print_conflict): Likewise.
	* coverage.c (rtl_coverage_counter_ref, tree_coverage_counter_ref,
	coverage_checksum_string): Likewise.
	* cse.c (make_new_qty, make_regs_eqv, insert, invalidate,
	hash_rtx, exp_equiv_p, cse_basic_block, count_reg_usage,
	cse_cc_succs, cse_condition_code_reg): Likewise.
	* cselib.c (entry_and_rtx_equal_p, remove_useless_values,
	rtx_equal_for_cselib_p, wrap_constant, cselib_hash_rtx,
	new_cselib_val, cselib_subst_to_values, cselib_invalidate_regno,
	cselib_record_set): Likewise.

From-SVN: r87145
2004-09-07 15:46:53 +00:00
Nathan Sidwell 7d60be94d6 tree.h (build_int_cst): New, sign extended constant.
* tree.h  (build_int_cst): New, sign extended constant.
	(build_int_cstu): New, zero extended constant.
	(build_int_cst_wide): Renamed from build_int_cst.
	* tree.c (build_int_cst, build_int_cstu): New.
	(build_int_cst_wide): Renamed from build_int_cst.
	(make_vector_type, build_common_tree_nodes,
	build_common_tree_nodes_2): Adjust build_int_cst calls.
	* builtins.c (expand_builtin_prefetch, expand_builtin_strstr,
	expand_builtin_strpbrk, expand_builtin_fputs,
	build_string_literal, expand_builtin_printf,
	expand_builtin_sprintf, fold_builtin_classify_type,
	fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii,
	fold_builtin_toascii, fold_builtin_isdigit,
	simplify_builtin_strstr, simplify_builtin_strpbrk,
	fold_builtin_fputs, simplify_builtin_sprintf): Likewise.
	* c-common.c (start_fname_decls, fix_string_type, shorten_compare,
	DEF_ATTR_INT): Likewise.
	* c-decl.c (complete_array_type, check_bitfield_type_and_width):
	Likewise.
	* c-lex.c (interpret_integer, lex_charconst): Likewise.
	* c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise.
	* c-pretty-print.c (pp_c_integer_constant): Likewise.
	* c-typeck.c (really_start_incremental_init, push_init_level,
	set_nonincremental_init_from_string): Likewise.
	* calls.c (load_register_parameters): Likewise.
	convert.c (convert_to_pointer): Likewise.
	coverage.c (coverage_counter_alloc, tree_coverage_counter_ref,
	build_fn_info_type, build_fn_info_value, build_ctr_info_value,
	build_gcov_info): Likewise.
	* except.c (init_eh, assign_filter_values): Likewise.
	* expmed.c (store_fixed_bit_field, extract_bit_field,
	extract_fixed_bit_field, extract_split_bit_field, expand_shift,
	expand_mult_const, expand_mult_highpart_adjust, extract_high_half,
	expand_sdiv_pow2, expand_divmod, make_tree): Likewise.
	* expr.c (convert_move, emit_group_load, emit_group_store,
	expand_assignment, store_constructor, store_field,
	expand_expr_real_1, reduce_to_bit_field_precision): Likewise.
	fold-const.c (force_fit_type, int_const_binop, fold_convert_const,
	invert_truthvalue, optimize_bit_field_compare,
	decode_field_reference, all_ones_mask_p, constant_boolean_node,
	fold_div_compare, fold, fold_read_from_constant_string,
	fold_negate_const, fold_abs_const, fold_not_const, round_up,
	round_down): Likewise.
	* function.c (assign_parm_setup_block): Likewise.
	* stmt.c (shift_return_value, expand_case, estimate_case_costs):
	Likewise.
	* stor-layout.c (layout_type, initialize_sizetypes,
	set_min_and_max_values_for_integral_type): Likewise.
	* tree-chrec.c (chrec_fold_multiply_poly_poly,
	reset_evolution_in_loop): Likewise.
	* tree-chrec.h (build_polynomial_chrec): Likewise.
	* tree-complex.c (build_replicated_const): Likewise.
	* tree-eh.c (honor_protect_cleanup_actions,
	lower_try_finally_onedest, lower_try_finally_copy,
	lower_try_finally_switch): Likewise.
	* tree-mudflap.c (mf_build_string, mx_register_decls,
	mudflap_register_call, mudflap_enqueue_constant): Likewise.
	* tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref):
	Likewise.
	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
	* tree-ssa-loop-niter.c (number_of_iterations_cond,
	loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type):
	Likewise.
	* tree-ssa-loop-ivcanon.c (create_canonical_iv,
	canonicalize_loop_induction_variables): Likewise.
	* tree-vectorizer.c (vect_create_index_for_array_ref,
	vect_transform_loop_bound, vect_compute_data_ref_alignment):
	Likewise.

	* config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start,
	alpha_gimplify_va_arg_1): Likewise.
	* config/arm/arm.c (arm_get_cookie_size): Likewise.
	* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
	* config/mips/mips.c (mips_build_builtin_va_list, mips_va_start,
	mips_gimplify_va_arg_expr): Likewise.
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg,
	add_compiler_branch_island): Likewise.
	* config/s390/s390.c (s390_va_start): Likewise.
	* config/sh/sh.c (sh_va_start): Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
	Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start,
	xtensa_gimplify_va_arg_expr): Likewise.

	* objc/objc-act.c (build_objc_string_object,
	build_objc_symtab_template, init_def_list, init_objc_symtab,
	init_module_descriptor, generate_static_references,
	build_selector_translation_table, get_proto_encoding,
	build_typed_selector_reference, build_selector_reference,
	build_next_objc_exception_stuff,
	build_method_prototype_list_template, generate_descriptor_table,
	generate_protocols, build_protocol_initializer,
	build_ivar_list_template, build_method_list_template,
	build_ivar_list_initializer, generate_ivars_list,
	generate_dispatch_table, generate_protocol_list,
	build_category_initializer, build_shared_structure_initializer,
	generate_shared_structures, handle_impent,
	generate_objc_image_info): Likewise.

2004-04-25  Paolo Bonzini  <bonzini@gnu.org>

	* cfglayout.c (duplicate_insn_chain): Remove references to
	NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT.
	* cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator.
	* cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT.
	* final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP
	and NOTE_INSN_LOOP_CONT.
	* insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove.
	* jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP
	and NOTE_INSN_LOOP_CONT.
	* loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop,
	check_dbra_loop, loop_dump_aux): Remove references to removed notes
	and fields.
	* reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs.
	* unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove
	references to removed notes and fields.
	(subtract_reg_term, ujump_to_loop_cont): Remove.

From-SVN: r86544
2004-08-25 09:52:54 +00:00
Nathan Sidwell 4a90aeeb51 tree.h (build_int_cst): New.
.:	* tree.h (build_int_cst): New.
	(build_int_2): Remove.
	* tree.c (build_int_2): Remove.
	(build_int_cst): New.
	(make_vector_type, build_common_tree_nodes,
	build_common_tree_nodes_2): Use build_int_cst.
	* builtins.c (expand_builtin_prefetch, expand_builtin_strstr,
	expand_builtin_strpbrk, expand_builtin_fputs,
	build_string_literal, expand_builtin_printf,
	expand_builtin_sprintf, fold_builtin_lround, fold_builtin_bitop,
	fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii,
	fold_builtin_isdigit, simplify_builtin_strstr,
	simplify_builtin_strpbrk, fold_builtin_fputs,
	simplify_builtin_sprintf): Use build_int_cst.
	* c-common.c (start_fname_decls, fix_string_type,
	c_common_nodes_and_builtins, c_init_attributes,
	shorten_compare): Likewise.
	* c-decl.c (complete_array_type,
	check_bitfield_type_and_width): Likewise.
	* c-lex.c (interpret_integer, lex_charconst): Likewise.
	* c-parse.in (primary): <TYPES_COMPATIBLE_P> Likewise.
	* c-pretty-print.c (pp_c_integer_constant): Likewise.
	* c-typeck.c (really_start_incremental_init, push_init_level,
	set_nonincremental_init_from_string): Likewise.
	* calls.c (load_register_parameters): Likewise.
	* convert.c (convert_to_pointer): Likewise.
	* coverage.c (coverage_counter_alloc, tree_coverage_counter_ref,
	build_fn_info_type, build_ctr_info_value, build_gcov_info):
	Likewise.
	* except.c (init_eh, assign_filter_values, assign_filter_values):
	Likewise.
	* expmed.c (store_fixed_bit_field, extract_bit_field,
	extract_fixed_bit_field, extract_split_bit_field, expand_shift,
	expand_mult_const, expand_mult_highpart_adjust, extract_high_half,
	expand_sdiv_pow2, expand_divmod, make_tree): Likewise.
	* expr.c (convert_move, emit_group_load, emit_group_store,
	expand_assignment, store_constructor, store_field,
	expand_expr_real_1, reduce_to_bit_field_precision): Likewise.
	* fold-const.c (force_fit_type, int_const_binop, fold_convert_const,
	invert_truthvalue, optimize_bit_field_compare,
	decode_field_reference, all_ones_mask_p, constant_boolean_node,
	fold_div_compare, fold, fold_read_from_constant_string,
	fold_negate_const, fold_abs_const, fold_not_const): Likewise.
	* function.c (assign_parm_setup_block): Likewise.
	* stmt.c (shift_return_value, expand_end_case_type,
	estimate_case_costs): Likewise.
	* stor-layout.c (layout_type, initialize_sizetypes,
	set_min_and_max_values_for_integral_type): Likewise.
	* tree-chrec.c (chrec_fold_multiply_poly_poly,
	reset_evolution_in_loop): Likewise.
	* tree-chrec.h (build_polynomial_chrec): Likewise.
	* tree-complex.c (build_replicated_const): Likewise.
	* tree-eh.c (honor_protect_cleanup_actions,
	lower_try_finally_onedest, lower_try_finally_copy,
	lower_try_finally_switch): Likewise.
	* tree-mudflap.c (mf_build_string, mx_register_decls,
	mudflap_register_call, mudflap_enqueue_constant): Likewise.
	* tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref):
	Likewise.
	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
	* tree-ssa-loop-niter.c (number_of_iterations_cond,
	loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type):
	Likewise.

	* config/alpha/alpha.c (alpha_initialize_trampoline,
	alpha_va_start, alpha_gimplify_va_arg_1): Use build_int_cst.
	* config/arm/arm.c (arm_get_cookie_size): Likewise.
	* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/i860/i860.c (i860_va_start): Likewise.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
	* config/mips/mips.c (mips_build_builtin_va_list, mips_va_start,
	mips_gimplify_va_arg_expr): Likewise.
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg,
	add_compiler_branch_island): Likewise.
	* config/s390/s390.c (s390_va_start): Likewise.
	* config/sh/sh.c (sh_va_start): Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
	Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start,
	xtensa_gimplify_va_arg_expr): Likewise.

	* objc/objc-act.c (build_objc_string_object,
	build_objc_symtab_template, init_def_list, init_objc_symtab,
	init_module_descriptor, generate_static_references,
	build_selector_translation_table, get_proto_encoding,
	build_typed_selector_reference, build_selector_reference,
	build_next_objc_exception_stuff,
	build_method_prototype_list_template, generate_descriptor_table,
	generate_protocols, build_protocol_initializer,
	build_ivar_list_template, build_method_list_template,
	build_ivar_list_initializer, generate_ivars_list,
	generate_dispatch_table, generate_protocol_list,
	build_category_initializer, build_shared_structure_initializer,
	generate_shared_structures, handle_impent,
	generate_objc_image_info): Use build_int_cst.
ada:
	* cuintp.c (UI_To_gnu): Use build_int_cst..
	* trans.c (Exception_Handler_to_gnu_sjlj, gnat_to_gnu): Likewise.
	* utils.c (init_gigi_decls): Likewise.
	* utils2.c (build_call_raise): Likewise.
cp:
	* call.c (convert_class_to_reference,
	build_user_type_conversion_1, convert_like_real,
	build_java_interface_fn_ref, build_special_member_call): Use
	build_int_cst.
	* class.c (build_vtbl_initializer): Likewise.
	* cp-gimplify.c (cp_gimplify_expr): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	* decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
	* decl2.c (start_static_initialization_or_destruction,
	generate_ctor_or_dtor_function): Likewise.
	* except.c (build_throw): Likewise.
	* lex.c (cxx_init): Likewise.
	* mangle.c (write_integer_cst): Likewise.
	* rtti.c (build_headof, get_tinfo_decl_dynamic,
	build_dynamic_cast_1, ptr_initializer, ptm_initializer,
	get_pseudo_ti_init): Likewise.
	* search.c (get_dynamic_cast_base_type): Likewise.
	* tree.c (build_shared_int_cst): Likewise.
fortran:
	* trans-array.c (gfc_trans_array_constructor_value): Use
	build_int_cst.
	* trans-const.c (gfc_build_string_const,
	gfc_init_constants, gfc_conv_mpz_to_tree,
	gfc_conv_constant_to_tree): Likewise.
	* trans-decl.c (gfc_get_symbol_decl): Likewise.
	* trans-intrinsic.c (gfc_conv_intrinsic_ibits,
	gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
	* trans-io.c (add_case, set_error_locus, build_dt,
	transfer_expr): Likewise.
	* trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
	gfc_trans_stop, gfc_trans_character_select): Likewise.
	* trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
	* trans.c (gfc_trans_runtime_check): Likewise.
java:
	* boehm.c (get_boehm_type_descriptor): Use build_int_cst.
	* class.c (build_utf8_ref, build_static_field_ref,
	make_field_value, make_method_value, get_dispatch_table,
	make_class_data, emit_symbol_table, emit_catch_table): Likewise.
	* constants.c (get_tag_node,  build_ref_from_constant_pool,
	build_constants_constructor): Likewise.
	* decl.c (java_init_decl_processing): Likewise.
	* expr.c (build_java_array_length_access, build_newarray,
	expand_java_multianewarray, expand_java_pushc, expand_iinc,
	build_java_binop, build_field_ref, expand_java_add_case,
	expand_java_call, build_known_method_ref, build_invokevirtual,
	build_invokeinterface, build_jni_stub): Likewise.
	* java-gimplify.c (java_gimplify_new_array_init): Likewise.
	* jcf-parse.c (get_constant): Likewise.
	* lex.c (do_java_lex): Likewise.
	* parse.y (patch_binop, patch_unaryop, patch_cast,
	build_null_of_type, patch_newarray): Likewise.
	* resource.c (compile_resource_data): Likewise.
	* typeck.c (build_prim_array_type): Likewise.

From-SVN: r86022
2004-08-15 15:45:33 +00:00
Jan Hubicka d836edf84f coverage.c (tree_coverage_counter_ref): Fix computation of the new ARRAY_REF argument.
* coverage.c (tree_coverage_counter_ref): Fix computation of the new
	ARRAY_REF argument.

From-SVN: r85477
2004-08-03 14:05:15 +00:00
Nathan Sidwell 00cf2913f8 gcov-io.h: Allow zero tag as EOF indicator.
* gcov-io.h: Allow zero tag as EOF indicator.
	(gcov_is_eof): Remove.
	(gcov_truncate): Remove.
	* gcov-io.c (gcov_seek): Always SEEK_SET.
	* libgcov.c (gcov_exit): Don't use gcov_truncate.  Write explicit
	EOF tag.
	* coverage.c (read_counts_file): Don't use gcov_is_eof.
	* gcov-dump.c (dump_file): Likewise.
	* gcov.c (read_graph_file, read_count_file): Likewise.

From-SVN: r85291
2004-07-29 08:58:59 +00:00
Roger Sayle 3244e67d15 convert.c (convert_to_real, [...]): Replace calls to build with calls to buildN.
* convert.c (convert_to_real, convert_to_integer,
	convert_to_complex): Replace calls to build with calls to buildN.
	* coverage.c (tree_coverage_counter_ref): Likewise.
	* dojump.c (do_jump): Likewise.
	* dwarf2out.c (loc_descriptor_from_tree): Likewise.
	* emit-rtl.c (component_ref_for_mem_expr,
	set_mem_attributes_minus_bitpos): Likewise.
	* explow.c (update_nonlocal_goto_save_area): Likewise.
	* expmed.c (expand_shift, make_tree, const_mult_add_overflow_p,
	expand_mult_add): Likewise.
	* expr.c (emit_block_move_via_libcall, clear_storage_via_libcall,
	store_constructor, get_inner_reference, expand_expr_real_1,
	try_casesi, try_tablejump): Likewise.
	* function.c (expand_function_start): Likewise.
	* stmt.c (emit_case_bit_tests, expand_end_case_type,
	node_has_low_bound, node_has_high_bound, emit_case_nodes): Likewise.
	* stor-layout.c (place_union_field, layout_type): Likewise.
	* tree.c (substitute_in_expr, tree_fold_gcd): Likewise.
	* varasm.c (copy_constant): Likewise.

From-SVN: r85160
2004-07-25 19:15:50 +00:00
Frank Ch. Eigler 35b6fdcfc2 * Fix for g++/15861
2004-07-15  Frank Ch. Eigler  <fche@redhat.com>

	g++/15861
	* cgraphunit.c (cgraph_build_static_cdtor): Add priority argument.
	* cgraph.h: Update declaration.
	* c-decl.c (build_cdtor): Update call with default priority.
	* coverage.c (create_coverage): Ditto.
	* tree-mudflap.c (mf_init_fndecl): New tree.
	(mudflap_init): Set it.
	(mudflap_register_call): Arrange to call __mf_init before the first
	__mf_register call.
	(mudflap_finish_file): Mark the mudflap static initializer as extra
	high priority, to beat all C++ static constructors.

2004-07-15  Frank Ch. Eigler  <fche@redhat.com>

	g++/15861
	* jcf-parse.c (java_emit_static_constructor): Specify default
	priority.

From-SVN: r84760
2004-07-15 17:33:01 +00:00
Richard Henderson c9b9aa64e9 cgraph.h (cgraph_build_static_cdtor): Declare.
* cgraph.h (cgraph_build_static_cdtor): Declare.
        * cgraphunit.c (cgraph_build_static_cdtor): New.
        * c-objc-common.c (build_cdtor): Use it.
        * coverage.c (create_coverage): Likewise.
        * libfuncs.h (LTI_gcov_init, gcov_init_libfunc): Remove.
        * optabs.c (init_optabs): Don't set gcov_init_libfunc.
java/
        * class.c (registerClass_libfunc): Remove.
        (init_class_processing): Don't set it.
        (emit_register_classes): Take list_p parameter.  Fill it in
        with _Jv_RegisterClass calls.
        * decl.c (java_init_decl_processing): Don't call
        init_resource_processing.
        * jcf-parse.c (java_emit_static_constructor): New.
        (java_parse_file): Call it.
        * resource.c (registerResource_libfunc): Remove.
        (init_resource_processing): Remove.
        (write_resource_constructor): Take list_p parameter.  Fill it in
        with _Jv_RegisterResource calls.
        * java-tree.h: Update prototypes.

From-SVN: r83958
2004-07-01 00:51:12 -07:00
Per Bothner a281759fdf Conditionally compile support for --enable-mapped_location.
* tree-mudflap.c (mf_file_function_line_tree):  Take a location_t
	rather than a pointer to one.  Use expand_location.
	(mf_varname_tree):  Use expand_location.
	* tree-dump.c:  Use expand_location on DECL_SOURCE_LOCATION.
	* coverage.c:  Likewise.
	* print-tree.c:  Likewise.
	* c-aux-info.c (gen_aux_info_record):  Likewise.
	* c-parse.in:  Use SET_EXPR_LOCATION macro.
	* gimple-low.c:  Likewise.
	* tree-mudflap.c:  Likewise.
	* gimplify.c:  Likewise.  Also use EXPR_LOCATION and EXPR_HAS_LOCATION.
	* c-ppoutput.c:  Use new source_location typedef instead of fileline.
	* c-semantics.c:  Use new macros.
	* c-typeck.c:  Likewise.

From-SVN: r83920
2004-06-30 11:11:14 -07:00
Richard Kenner 44de5aeb00 alias.c (adjust_offset_for_component_ref): Use component_ref_field_offset.
* alias.c (adjust_offset_for_component_ref): Use
	component_ref_field_offset.
	* c-decl.c (build_array_declarator): Add news args for ARRAY_REF.
	* c-gimplify.c (gimplify_expr_stmt): Use alloc_stmt_list.
	(gimplify_decl_stmt): Call gimplify_type_sizes for type.
	For decl, call gimplify_one_sizepos and use statement list.
	(gimplify_compound_literal_expr): New arg PRE_P.
	Add statement to PRE_P list and return DECL.
	(c_gimplify_expr, case COMPOUND_LITERAL_EXPR): Add arg to
	gimplify_compound_literal_expr.
	* c-tree.h (getdecls): Deleted.
	* c-typeck.c (build_component_ref): Add operand for COMPONENT_REF.
	(build_array_ref): Add two operands for ARRAY_REF.
	(build_unary_op): Set TREE_INVARIANT and TREE_CONSTANT for
	COMPOUND_LITERAL_EXPR.
	* coverage.c (tree_coverage_counter_ref): Add new operands
	for ARRAY_REF.
	* emit-rtl.c (component_ref_for_mem_expr): Add new operand
	for COMPONENT_REF.
	(set_mem_attributes_minus_bitpos): Use array_ref_low_bound
	and array_ref_element_size.
	(widen_memory_access):Use component_ref_field_offset.
	* explow.c (update_nonlocal_goto_save_area): Add two operands
	for ARRAY_REF.
	* expr.c (array_ref_element_size, array_ref_low_bound): New functions.
	(component_ref_field_offset): Likewise.
	(get_inner_reference): Use them.
	(expand_expr_real_1, case ARRAY_REF): Use array_ref_low_bound.
	* fold-const.c (fold, case EQ_EXPR): Properly handle DECL_SIZE.
	(fold_read_from_constant_string): Use array_ref_low_bound.
	Verify that result is a character type.
	(build_fold_indirect_ref): Add two operands for ARRAY_REF.
	* function.c (expand_function_start): Likewise.
	* gimple-low.c (expand_var_p): Delete duplicated line.
	* gimplify.c: Add static decls for local functions.
	(cgraph.h): Now included.
	(create_tmp_var): Remove check for ARRAY_TYPE.
	(copy_if_shared_r): Look at bounds and sizes of types.
	(build_and_jump): Return alloc_stmt_list instead of build_empty_stmt.
	(gimplify_exit_expr, shortcut_cond_expr): Likewise.
	(gimplify_save_expr, gimple_push_cleanup): Likewise.
	(gimplify_init_constructor): Likewise.
	WANT_VALUE now bool.
	If empty list with no result wanted, return GS_UNHANDLED.
	Add additional operands for ARRAY_REF and COMPONENT_REF.
	(canonicalize_component_ref): Convert to &array[L].
	(gimplify_array_ref_to_plus): Use array_ref_element_size and
	array_ref_lower_bound.
	(build_addr_expr_with_type, build_addr_expr): New functions.
	(gimplify_compound_lval): WANT_LVALUE now bool.
	Major rework to allow handle_component_p and initialize and
	gimplify new operands for ARRAY_REF, ARRAY_RANGE_REF, and
	COMPONENT_REF.
	(gimplify_array_ref): Deleted.
	(gimplify_self_mod_expr): WANT_VALUE now bool.
	(gimplify_modify_expr): Gimplify to_p and from_p later.
	Factor out code into gimplify_modify_expr_rhs and call twice.
	Move variable-size code earlier and handle PLACEHOLDER_EXPR.
	(gimplify_modify_expr_rhs, gimplify_variable_sized_compare): New fns.
	(gimplify_addr_expr, case VIEW_CONVERT_EXPR): New case.
	(gimplify_expr, case ARRAY_REF): Delete special case.
	Instead handle like COMPONENT_REF; also do ARRAY_RANGE_REF,
	IMAGPART, and REALPART the same way.
	(gimplify_expr, case VIEW_CONVERT_EXPR): New case.
	(gimplify_expr): Call gimplify_variable_sized_compare if applicable.
	Call alloc_stmt_list instead of build_empty_stmt.
	Deal with _REF that's volatile.
	(gimplify_type_sizes, gimplify_one_sizepos): New functions.
	(unshare_body, unvisit_body): New functions.
	(gimplify_body): Call them.
	* stmt.c (expand_stack_alloc): Don't expand TYPE_MAX_VALUE.
	* stor-layout.c (get_pending_sizes): Don't change SAVE_EXPR_CONTEXT.
	* tree-alias-common.c (get_alias_var): Also skip ARRAY_RANGE_REF.
	* tree-cfg.c (tree_node_can_be_shared): Treat ARRAY_RANGE_REF
	like ARRAY_REF.
	(verify_expr, case ADDR_EXPR): Use handled_component_p.
	* tree-dfa.c (get_virtual_var): Likewise.
	* tree-dump.c (dequeue_and_dump, case COMPONENT_REF, ARRAY_REF):
	New cases to dump new operands; likewise for ARRAY_RANGE_REF.
	* tree-eh.c (tree_could_trap, case ARRAY_RANGE_REF): Like ARRAY_REF.
	* tree-gimple.c (is_gimple_addr_expr_arg): Add ARRAY_RANGE_REF
	and INDIRECT_REF.
	(get_base_address): Use handled_component_p.
	* tree-gimple.h (gimplify_type_sizes, gimplify_one_sizepos): New.
	* tree-line.c (walk_tree): Walk more things for types and decls.
	* tree-mudflap.c (mf_build_check_statement_for): Add new operands
	for ARRAY_REF and COMPONENT_REF.
	(mx_xform_derefs_1): Clean up usage of decl sizes.
	* tree-nested.c (build_addr): Use handled_component_p.
	(walk_stmts, case CATCH_EXPR): Add missing "break".
	(get_static_chain, get_frame_field): Add new operand for COMPONENT_REF.
	(finalize_nesting_tree_1): Likewise.
	(convert_nonlocal_reference, case ARRAY_RANGE_REF): Like ARRAY_REF
	and process additional operands.
	(convert_local_reference): Likewise.
	* tree-outof-ssa.c (discover_nonconstant_array_refs_r): Treat
	ARRAY_RANGE_REF similarly to ARRAY_REF.
	* tree-pretty-print.c (dump_generic_node, case QUAL_UNION_TYPE): Handle
	like RECORD_TYPE.
	(dump_generic_node, case COMPONENT_REF): Print offset operand.
	(dump_generic_node, case ARRAY_RANGE_REF): Treat like ARRAY_REF
	and print lower bound and element size for both.
	(op_prio, case ARRAY_RANGE_REF): Like ARRAY_REF.
	* tree-sra.c (csc_build_component_ref): Add new operand.
	(scalarize_call_expr): Use get_base_address.
	* tree-ssa-ccp.c (widen_bitfield): Clean up size handling.
	(maybe_fold_offset_to_array_ref): Rework to handle input having an
	ARRAY_REF, refine handling of lower bound, and add new operands
	for ARRAY_REF.
	(maybe_fold_to_component_ref): Add new operand for COMPONENT_REF.
	(maybe_fold_stmt_indirect): Only fold *&B to B if types match.
	(maybe_fold_stmt_addition): Only handle constant lower bound.
	* tree-ssa-operands.c (get_expr_operands): Minor rearrangements.
	Treat ARRAY_REF and ARRAY_RANGE_REF the same; look at extra operands.
	Look at new offset operand of COMPONENT_REF.
	* tree-ssa.c (set_is_used): Use handled_component_p.
	* tree.c (substitute_in_expr, case COMPONENT_REF): Add new operand.
	(stabilize_reference, case COMPONENT_REF): Likewise.
	(stabilize_reference, case ARRAY_RANGE_REF, ARRAY_REF): Similarly.
	(recompute_tree_invariant_for_addr_expr): Completely rework to
	be more precise.  Also set TREE_SIDE_EFFECTS.
	(build1_stat, case ARRAY_EXPR): Don't handle TREE_SIDE_EFFECTS here.
	(build2_stat, build3_stat, build4_stat): For references,
	propagate TREE_THIS_VOLATILE.
	(get_unwidened): Add new operand for COMPONENT_REF.
	(get_narrower): Likewise; use host_integerp for DECL_SIZE.
	* tree.def (COMPONENT_REF): Add new operand.
	(ARRAY_REF, ARRAY_RANGE_REF): Add two new operands.
	* tree.h (array_ref_element_size, array_ref_low_bound): New decls.
	(component_ref_field_offset): Likewise.
	* config/alpha/alpha.c (alpha_va_start): Add new op for COMPONENT_REF.
	(alpha_gimplify_va_arg): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/i860/i860.c (i860_va_start, i860_va_arg): Likewise.
	* config/iq2000/iq2000.c (iq2000_va_arg): Likewise.
	* config/mips/mips.c (mips_va_start, mips_va_arg): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg):
	Likewise.
	* config/s390/s390.c (s390_va_start, s390_gimplify_va_arg): Likewise.
	* config/sh/sh.c (sh_va_start, sh_va_arg): Likewise.
	* config/stormy16/stormy16.c (xstormy1_expand_builin_va_start):
	Likewise.
	(xstormy16_expand_builtin_va_arg): Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start, xtensa_va_arg): Likewise.

	* cp/call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
	(build_new_method_call): Likewise.
	* cp/decl.c (local_variable_p_walkfn): Don't walk into types.
	* cp/decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
	(build_anon_union_vars): Add new operand for COMPONENT_REF.
	* cp/init.c (buld_new): Add new operand for ARRAY_REF.
	* cp/method.c (do_build_copy_constructor): New op for COMPONENT_REF.
	(do_build_assign_ref): Likewise.
	* cp/parser.c (cp_parser_direct_new_declarator): Add new operands
	for ARRAY_REF.
	(cp_parser_direct_declarator): Likewise.
	* cp/pt.c (tsubst): Likewise.
	(tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
 	for COMPONENT_REF.
	* cp/semantics.c (finish_non_static_data_member): Add new operand
	for COMPONENT_REF.
	* cp/typeck.c (build_class_member_access_expr): Likewise.
	(build_class_member_access_expr, finish_class_member_access_expr):
	Likewise.
	(build_ptrmemfunc_access_expr): Likewise.
	(build_array_ref): Add new operands for ARRAY_REF.
	* cp/typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
	* cp/tree.c (count_trees_r, no_linkage_helper): Don't walk in types.

	* fortran/f95-lang.c (LANG_HOOKS_GIMPLE_BEFORE_INLINING): Deleted.
	* fortran/trans-array.c (gfc_conv_descriptor_data): Add operand
	for COMPONENT_REF.
	(gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype): Likewise.
	(gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride): Likewise.
	(gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound): Likewise.
	* fortran/trans-common.c (create_common): Likewise.
	* fortran/trans-expr.c (gfc_conv_component_ref): Likewise.
	* fortran/trans-io.c (set_parameter_value): Likewise.
	(set_parameter_ref, set_string, set_flag, io_result): Likewise.
	(transfer_expr): Likewise.
	* fortran/trans-decl.c (gfc_trans_auto_character_variable):
	Set up to get DECL_SIZE and DECL_SIZE_UNIT gimplified.
	(gfc_simplify_function): New function.
	(gfc_generate_function-code): Properly handle nested functions.
	* fortran/trans.c (gfc_build_array_ref): Add two new operands
	for ARRAY_REF.

	* java/class.c (build_class_ref): Add new operand for COMPONENT_REF.
	(build_static_field_ref): Likewise and add new operands for ARRAY_REF.
	* java/constants.c (build_ref_from_constant_pool): Likewise.
	* java/expr.c (build_java_array_length_access): Likewise.
	(build_get_class, build_field_ref, build_known_method_ref): Likewise.
	(invoke_build_dtable, build_invokevirtual): Likewise.
	(build_invokeinterface, java_expand_expr): Likewise.
	(emit_init_test_initialization): Likewise.
	* java/java-gimplify.c (java_gimplify_new_array_init): Likewise.
	* java/parse.y (make_qualifed_name, build_array_ref): Likewise.

	* objc/ojbc-act.c (generate_static_references): Add additional
	operands to ARRAY_REF.
	(generate_strings, build_method_prototype_list_template): Likewise.
	(generate_protocol_list): Likewise.

From-SVN: r83474
2004-06-21 23:07:05 -04:00
Paolo Bonzini 2f8e398bf4 coverage.c: Remove argument to rest_of_compilation.
gcc/ChangeLog:
2004-06-16  Paolo Bonzini  <bonzini@gnu.org>

	* coverage.c: Remove argument to rest_of_compilation.
	* expr.c (execute_expand, set_save_expr_context, pass_expand): New.
	* passes.c (rest_of_compilation): Remove argument.
	(pass_rest_of_compilation): New.
	(rest_of_handle_final, rest_of_handle_delay_slots,
	rest_of_handle_stack_regs, rest_of_handle_variable_tracking
	rest_of_handle_machine_reorg, rest_of_handle_regrename
	rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2
	rest_of_handle_regmove, rest_of_handle_tracer
	rest_of_handle_if_conversion, rest_of_handle_if_after_combine
	rest_of_handle_web, rest_of_handle_branch_prob
	rest_of_handle_value_profile_transformations, rest_of_handle_cfg
	rest_of_handle_addressof, rest_of_handle_jump_bypass
	rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2):
	Check that the two arguments are actually superfluous.
	* toplev.h (rest_of_compilation): Adjust prototype.
	* tree-optimize.c (register_dump_files): Add properties argument.
	Track validity of passes.  Only initialize dump files for
	tree-based passes.  Store the full set of provided passes in
	the pass.
	(init_tree_optimization_passes): Register pass_expand and
	pass_rest_of_compilation.
	(execute_one_pass): Do not track the presence of required properties
	here.  Set in_gimple_form.  Do not update current_properties.
	(current_properties): Remove.
	(set_save_expr_context): Remove.
	(tree_rest_of_compilation): Do not set in_gimple_form.  Do not
	expand to RTL here, and do not call rest_of_compilation.  Push
	GGC context even before gimplification.
	* tree-pass.h (PROP_rtl, PROP_trees): New flags.
	(pass_expand, pass_rest_of_compilation): Declare.

gcc/java/ChangeLog:
2004-06-16  Paolo Bonzini  <bonzini@gnu.org>

	* java/class.c (emit_register_classes): Remove argument to
	rest_of_compilation.
	* java/resource.c (write_resource_constructor): Likewise.

From-SVN: r83225
2004-06-16 07:25:53 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Serge Belyshev cb83302cce re PR gcov-profile/14944 ([3.4 only] ICE when gcc reads *.gcda file of different version)
Patch from Serge Belyshev.
PR 14944
* coverage.c (read_counts_file): Fix usage of warning () call.
* pretty-print.c (pp_base_format_text): Fix typo in the comment.

From-SVN: r81276
2004-04-28 23:28:59 -07:00
Zack Weinberg f75fbaf754 PR 12267, 12391, 12560, 13129, 14114, 14113
* c-tree.h: Forward declare struct c_binding.  Declare
	c_override_bindings_to_false.  Update prototypes.
	(struct lang_identifier): Update comments.  Change fields to be
	struct c_binding *.
	(IDENTIFIER_SYMBOL_VALUE, IDENTIFIER_TAG_VALUE)
	(IDENTIFIER_LABEL_VALUE, C_DECL_INVISIBLE)
	(KEEP_NO, KEEP_YES, KEEP_MAYBE): Delete.
	(C_DECL_IN_EXTERNAL_SCOPE, C_DECL_DECLARED_BUILTIN): New.
	* c-common.h: Update prototypes.
	* c-decl.c (struct c_scope): Update commentary.  Remove names,
	names_last, parms, parms_last, tags, and shadowed fields.  Add
	bindings and depth fields.
	(scope_freelist): Move to more appropriate location.
	(c_print_identifier): Update for changes to struct lang_identifier.
	(objc_mark_locals_volatile): Update for new bindings structures.
	(global_bindings_p): Honor c_override_global_bindings_to_false.
	(pushlevel): Rename to push_scope; take no arguments; use the
	scope_freelist; initialize scope->depth and check for overflow.
	(poplevel): Rename to pop_scope; totally rewritten for new bindings
	structures.
	(diagnose_mismatched_decls): Use C_DECL_DECLARED_BUILTIN, not
	C_DECL_INVISIBLE, for certain decisions.  Adjust some diagnostics.
	Improve some commentary.  Adjust handling of forward parm decls.
	(merge_decls): Set C_DECL_DECLARED_BUILTIN when appropriate.
	Preserve C_DECL_IN_EXTERNAL_SCOPE.
	(warn_if_shadowing): Correct indentation.  Improve diagnostics.
	(pushdecl): Remove unnecessary assertion.  Short-circuit anonymous
	decls.  Rewrite for new bindings structures.  Improve commentary.
	Eliminate the copy_node call.
	(implicit_decl_warning): Use the "diag" idiom (as seen in
	locate_old_decl) to reduce code duplication; call locate_old_decl
	if appropriate.  Relocate to remove need for forward declaration.
	(implicitly_declare): Adjust for new bindings structures.  Kludge
	around Objective-C not-really-builtin functions.
	(undeclared_variable): Improve diagnostics.  If current_function_decl
	is nonnull but current_function_scope is null, use current_scope.
	Use bind.
	(lookup_tag): Adjust for new bindings structures.  Kludge around
	Objective-C's tag declarations that wind up in the external scope.
	(lookup_name): Adjust for new bindings structures.  Kludge around
	c-common.c's pseudo-typedefs that wind up in the external scope.
	(lookup_name_current_level): Rename lookup_name_in_scope; take a
	second argument indicating the scope to examine; rewrite for
	new bindings structures.
	(c_init_decl_processing): Adjust for renamed functions.  Do not
	initialize current_file_decl, first_builtin_decl, last_builtin_decl.
	First scope pushed is the external scope, not the global scope.
	(builtin_function): Use bind, not pushdecl.  Adjust other bits
	for new data structures.  Keep track of builtins that should be
	made visible automatically.
	(start_decl): Adjust diagnostics.  Remove unnecessary call to
	expand_decl.
	(grokparms): Return 0 if arg_types is error_mark_node.
	(get_parm_info): Rename "void_at_end" argument to "ellipsis", with
	reversed sense.  Rewrite for new bindings structures.  Do not
	leave any decls in the scope, to prevent pop_scope from doing
	contradictory things with them.
	(finish_struct, finish_enum): Remove redundant diagnostics.
	(build_enumerator): Don't cascade diagnostics for error_mark_node.
	Mark location where -pedantic changes the meaning of the program.
	(store_parm_decls_newstyle, store_parm_decls_oldstyle): Load the
	parameter decls into the function's scope structure using bind.
	Warn here about function definitions in the wrong style.
	Adjust diagnostics.
	(store_parm_decls): Correct the determination of whether a
	function was defined with a prototype.
	(c_write_global_declarations): Operate on all file decls and on
	the external scope.  Split body of the loop to...
	(c_write_global_declarations_1): ... this new function, to avoid
	code duplication.
	(truly_local_externals, first_builtin_decl, last_builtin_decl)
	(make_scope, pop_scope, in_parm_level_p, set_block)
	(any_external_decl, record_external_decl, bind_label, getdecls)
	(link_hash_hash, link_hash_eq, merge_translation_unit_decls)
	(c_reset_state): Delete.
	(visible_builtins, c_override_global_bindings_to_false)
	(c_binding, I_SYMBOL_BINDING, I_SYMBOL_DECL, I_TAG_BINDING)
	(I_TAG_DECL, I_LABEL_BINDING, I_LABEL_DECL, file_scope)
	(external_scope, binding_freelist, bind, free_binding_and_advance)
	(push_file_scope, pop_file_scope): New.
	(pushtag, pushdecl_top_level, lookup_label, declare_label)
	(define_label, c_make_fname_decl, finish_decl)
	(mark_forward_parm_decls, build_compound_literal)
	(grokdeclarator, start_function, check_for_loop_decls)
	(identifier_global_value, record_builtin_type): Minor adjustments
	for new bindings structures.  Improve diagnostics and commentary.
	* c-objc-common.c (start_cdtor, finish_cdtor): Adjust calls to
	pushlevel/poplevel respectively.
	(c_objc_common_finish_file): Don't call merge_translation_unit_decls.
	* c-opts.c (c_common_parse_file): Remove spurious ATTRIBUTE_UNUSED.
	Warn about YYDEBUG not being defined only if -dy.  Remove no-longer-
	correct loop over multiple translation units; call fatal_error if
	requested to compile more than one file at once.  (This disables
	IMA temporarily - an up-front error being preferable to a crash.)
	* c-parse.in (pushlevel, poplevel rules): Rename push_scope, pop_scope.
	(all actions): Adjust calls to pushlevel/poplevel.
	(parsing_iso_function_signature): Delete.
	(extdef_1): Fold into extdef.
	(old_style_parm_decls_1): Fold into old_style_parm_decls.  Don't
	warn here about function definitions in the wrong style.
	(after_tyle_declarator, parm_declarator_starttypename)
	(parm_declarator_nostarttypename, notype_declarator): Remove
	commented-out productions.
	(parmlist_1, parmlist_2): Use make_node, not tree_cons, to create
	an empty TREE_LIST node.  Adjust calls to get_parm_info.
	(parmlist_2 : ELLIPSIS): Tag the arg-info block with error_mark_node
	to suppress -Wold-style-definition after this error.
	(c_parse_file): Don't clear the binding stack or call
	finish_fname_decls here.  Correct comment.
	* c-typeck.c (same_translation_unit_p): Export.
	(common_type): Use c_override_global_bindings_to_false, not
	pushlevel/poplevel/declare_parm_level.
	* c-lang.c: Override LANG_HOOKS_CLEAR_BINDING_STACK,
	LANG_HOOKS_PUSHLEVEL, LANG_HOOKS_POPLEVEL, LANG_HOOKS_SET_BLOCK,
	and LANG_HOOKS_GETDECLS with do-nothing stubs.
	* objc/objc-lang.c: Likewise.
	* objc/objc-act.c: Adjust all calls to pushlevel, poplevel,
	get_parm_info.
	(OBJC_VOID_AT_END): Delete; replace all uses
	with void_list_node.
	(generate_forward_declaration_to_string_table): Delete.
	* objc/objc-act.h (OCTI_STRG_DECL, UOBJC_STRINGS_decl): Delete.

	* coverage.c (create_coverage): Don't pushdecl anything.
	* langhooks.c (lhd_clear_binding_stack): Call
	lang_hooks.decls.poplevel, not poplevel.
	* tree.c (list_length): If ENABLE_TREE_CHECKING, abort on a
	circular list rather than going into an infinite loop.

cp:
	* cp-lang.c (c_reset_state): Delete.
	(push_file_scope, pop_file_scope): New stubs.
	* parser.c (c_parse_file): Call sorry() here if called more than once.

testsuite:
	* gcc.dg/Wold-style-definition-1.c, gcc.dg/builtins-30.c
	* gcc.dg/unused-4.c, gcc.dg/noncompile/label-1.c
	* gcc.dg/noncompile/label-lineno-1.c, objc.dg/naming-1.m:
	Adjust error regexps.
	* gcc.dg/Wshadow-2.c, gcc.dg/noncompile/incomplete-3.c
	* gcc.dg/noncompile/undeclared-1.c: New test cases.
	* gcc.dg/decl-5.c, gcc.dg/redecl-1.c: Remove XFAIL.
	* gcc.dg/local1.c: Add explanatory comment.

From-SVN: r79883
2004-03-23 23:47:53 +00:00
Kazu Hirata 245f1bfacf bb-reorder.c, [...]: Replace calls via (*targetm.foo) () with targetm.foo ().
* bb-reorder.c, bt-load.c, c-decl.c, cfgcleanup.c, coverage.c,
	dwarf2asm.c, ifcvt.c, stor-layout.c, varasm.c: Replace calls
	via (*targetm.foo) () with targetm.foo ().

From-SVN: r79750
2004-03-20 16:50:36 +00:00
Roger Sayle ae2bcd98fa alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) () with lang_hooks.foo ().
* alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) ()
	with lang_hooks.foo ().
	* builtins.c (expand_builtin_va_arg): Likewise.
	* c-common.c (fname_as_string, c_common_truthvalue_conversion,
	c_common_type_for_mode, c_common_nodes_and_builtins,
	handle_mode_attribute, handle_vector_size_attribute): Likewise.
	* c-convert.c (convert): Likewise.
	* c-format.c (check_format_types): Likewise.
	* c-objc-common.c (c_tree_printer): Likewise.
	* c-typeck.c (build_unary_op, build_conditional_expr,
	build_binary_op): Likewise.
	* calls.c (try_to_integrate, expand_call,
	emit_library_call_value_1): Likewise.
	* cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p):
	Likewise.
	* cgraphunit.c (record_call_1, cgraph_analyze_function,
	cgraph_expand_function): Likewise.
	* convert.c (convert_to_pointer, convert_to_integer): Likewise.
	* coverage.c (build_fn_info_type, build_ctr_info_type,
	build_gcov_info, create_coverage): Likewise.
	* dbxout.c (dbxout_init): Likewise.
	* diagnostic.c (diagnostic_report_current_function): Likewise.
	* dojump.c (do_jump): Likewise.
	* dwarf2out.c (dwarf2_name): Likewise.
	* except.c (init_eh): Likewise.
	* explow.c (expr_size, int_expr_size): Likewise.
	* expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add):
	Likewise.
	* expr.c (store_expr, store_constructor, safe_from_p,
	expand_expr_real, do_store_flag, try_casesi): Likewise.
	* function.c (push_function_context_to, pop_function_context_from,
	free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type,
	put_var_into_stack, allocate_struct_function, current_function_name):
	Likewise.
	* integrate.c (copy_decl_for_inlining, expand_inline_function):
	Likewise.
	* langhooks.c (lhd_clear_binding_stack, write_global_declarations,
	lhd_print_error_function): Likewise.
	* opts.c (handle_option, decode_options): Likewise.
	* passes.c (open_dump_file): Likewise.
	* print-tree.c (print_node): Likewise.
	* stmt.c (expand_fixup, fixup_gotos, expand_asm_operands,
	expand_decl_cleanup, emit_case_nodes): Likewise.
	* stor-layout.c (variable_size): Likewise.
	* toplev.c (announce_function, wrapup_global_declarations,
	check_global_declarations, compile_file, default_tree_printer,
	process_options, lang_dependent_init, finalize): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.
	* tree-inline.c (remap_decl, remap_block, copy_body_r,
	initialize_inlined_parameters, declare_return_variable,
	inlinable_function_p, expand_call_inline, optimize_inline_calls,
	walk_tree, copy_tree_r): Likewise.
	* tree-optimize.c (tree_rest_of_compilation): Likewise.
	* tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp,
	unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl,
	variably_modified_type_p, dump_tree_statistics): Likewise.
	* varasm.c (assemble_variable, compare_constant, copy_constant,
	force_const_mem, compute_reloc_for_constant, output_constant,
	output_addressed_constants, initializer_constant_valid_p): Likewise.

From-SVN: r79481
2004-03-14 22:26:14 +00:00
Richard Henderson 27ab3e9128 re PR middle-end/11767 (different code behaviour with -fnon-call-exceptions -fprofile-arcs)
PR middle-end/11767
        * coverage.c (coverage_counter_ref): Set MEM_NOTRAP_P.
        * optabs.c (prepare_cmp_insn): Force trapping memories to registers
        before the compare, if flag_non_call_exceptions.
        * g++.dg/other/profile1.C: New.

From-SVN: r78805
2004-03-02 16:46:06 -08:00
J"orn Rennecke 02307675ee coverage.c (get_coverage_counts): Give a different message if flag_guess_branch_prob is set.
* coverage.c (get_coverage_counts): Give a different message
	if flag_guess_branch_prob is set.
	* predict.c (counts_to_freqs): Return an int.
	(estimate_bb_frequencies): If counts_to_freqs returns zero,
	calculate estimates.

From-SVN: r76741
2004-01-27 19:54:42 +00:00
Jan Hubicka 20c361f30e coverage.c (checksum_string): Rename to ...
* coverage.c (checksum_string): Rename to ...
	(coverage_checksum_string): ... this one, Use crc32_string; recognize
	names containing random number and zero the number out in order to get
	match.

From-SVN: r76102
2004-01-18 15:10:23 +00:00
Richard Sandiford 7da1799a2d Update copyright dates after recent commits.
From-SVN: r75425
2004-01-05 09:59:41 +00:00
Richard Sandiford f614987783 re PR c++/12945 (MIPS g++.old-deja/g++.abi/ptrflags.C fails.)
PR target/12945
	* coverage.c (coverage_counter_alloc): Set SYMBOL_FLAG_LOCAL for
	for counter labels.
	* config/mips/mips.c (INTERNAL_SYMBOL_P): Delete.
	(mips_classify_symbol): Always treat SYMBOL_REF_FLAG as indicating
	string constants if TARGET_MIPS16.  Use SYMBOL_REF_DECL to check
	the binding of decl symbols, otherwise check SYMBOL_REF_LOCAL_P.
	(mips_symbol_insns): Don't trust the local/global classification.
	(m16_usym8_4, m16_usym5_4): Same mips16 change as mips_classify_symbol.
	(override_options): Make -mabicalls -fno-unit-at-a-time imply
	-mno-explicit-relocs.
	(mips_encode_section_info): Don't use SYMBOL_REF_FLAG to distinguish
	between local and global symbols.

From-SVN: r75422
2004-01-05 09:37:02 +00:00
Jan Hubicka 24a4a0338a coverage.c (read_counts_file): Better error messages...
* coverage.c (read_counts_file): Better error messages; cause corrupted
	profiles to produce hard errors, not just warnings
	(get_coverage_counts): Similarly.

From-SVN: r75198
2003-12-29 09:29:21 +00:00
Jan Hubicka bbfff586bc coverage.c (get_coverage_counts): Use inform instead of warning about missing profile.
* coverage.c (get_coverage_counts):  Use inform instead of warning
	about missing profile.

From-SVN: r74591
2003-12-13 00:24:39 +00:00
Jason Merrill 1456deafd7 stmt.c (resolve_asm_operand_names): Call check_unique_operand_names here.
* stmt.c (resolve_asm_operand_names): Call check_unique_operand_names
        here.
        (expand_asm_operands): Not here.
        (parse_input_constraint): No longer static.
        * tree.h: Declare it.

        * coverage.c (build_ctr_info_value): Use build_decl to make a
        VAR_DECL.
        (create_coverage): Likewise.
java/
        * parse.y (patch_assignment): Use make_node to create a BLOCK.
        * parse.h (BUILD_PTR_FROM_NAME): Use make_node to create a
        POINTER_TYPE.
cp/
        * tree.c (build_cplus_new): Use build_decl to create a VAR_DECL.
        (build_target_expr_with_type): Likewise.

        * pt.c (instantiate_class_template): Sanity check that our
        enclosing class has been instantiated.

From-SVN: r72255
2003-10-09 01:44:57 -04:00
Richard Henderson f31686a322 Revert DECL_SOURCE_LOCATION -> TREE_LOCUS change.
From-SVN: r71641
2003-09-21 22:09:32 -07:00
Richard Henderson 7e2af53a14 tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.
* tree.h (TREE_LOCUS): Rename from DECL_SOURCE_LOCATION; make const.
	(TREE_FILENAME, TREE_LINENO): Likewise.
	(set_tree_locus, copy_tree_locus, set_tree_file_line): New.
	(TREE_LOCUS_SET_P): New.
	* c-aux-info.c, c-decl.c, c-parse.in, coverage.c, dbxout.c,
	diagnostic.c, dwarf2out.c, dwarfout.c, function.c, integrate.c,
	print-tree.c, stmt.c, toplev.c, tree-dump.c, tree-inline.c,
	tree-optimize.c, tree.c, tree.def, xcoffout.c, config/alpha/alpha.c,
	config/mips/mips.c, doc/c-tree.texi, objc/objc-act.c: Update to match.

ada/
	* trans.c, utils.c: Update for DECL_SOURCE_LOCATION rename and
	change to const.

cp/
	* class.c, cp-tree.h, decl.c, decl2.c, error.c, init.c,
	method.c, optimize.c, pt.c, semantics.c, tree.c: Update for
	DECL_SOURCE_LOCATION rename and change to const.

f/
	* com.c, ste.c: Update for DECL_SOURCE_LOCATION rename and
	change to const.

java/
	* class.c, decl.c, jcf-parse.c, jcf-write.c, parse.y,
	resource.c: Update for DECL_SOURCE_LOCATION rename and change to const.

treelang/
	* treetree.c: Update for DECL_SOURCE_LOCATION rename and
	change to const.

From-SVN: r71636
2003-09-21 16:39:40 -07:00
Mark Mitchell a7e8c268ed re PR c++/3907 (nested template parm collides with member name)
* coverage.c (create_coverage): Do not call pushlevel/poplevel.
	* langhooks-def.h (lhd_do_nothing_iii_return_null_tree): New
	function.
	* langhooks.c (lhd_do_nothing_iii_return_null_tree): Define it.

	PR c++/3907
	* class.c (maybe_note_name_used_in_class): Refine test for whether
	or not we are in a class scope.

	* cp-tree.h (language_function): Remove x_expanding_p.
	(expanding_p): Remove.
	(doing_semantic_analysis_p): Remove.
	(scope_kind): Add sk_function_parms, sk_class,
	sk_namespace.
	(innermost_scope_kind): New method.
	* call.c (cxx_type_promotes_to): Use type_decays_to.
	* cp-lang.c (LANG_HOOKS_PUSHLEVEL): Redefine.
	(LANG_HOOKS_POPLEVEL): Likewise.
	* decl.c (cp_binding_level): Remove parm_flag, template_parms_p,
	template_spec_p, namespace_p, is_for_scope, is_try_scope, and
	is_catch_scope.  Add kind and explicit_spec_p.
	(cxx_scope_descriptor): Use a lookup table.
	(find_class_binding_level): Use "kind" field in binding_level, not
	the various flags.
	(pop_binding_level): Likewise.
	(innermost_nonclass_level): Likewise.
	(toplevel_bindings_p): Likewise.
	(namespace_bindings_p): Likewise.
	(template_parm_scope_p): Likewise.
	(innermost_scope_kind): New method.
	(current_tmpl_spec_kind): Use "kind" field in binding_level, not
	the various flags.
	(pushlevel): Remove check for doing_semantic_analysis_p.
	(begin_scope): Simplify.
	(add_decl_to_level): Use "kind" field in binding_level, not
	the various flags.
	(push_local_binding): Likewise.
	(pop_label): Remove check for doing_semantic_analysis_p.
	(poplevel): Use "kind" field in binding_level, not
	the various flags.
	(set_block): Remove check for doing_semantic_analysis_p.
	(pushlevel_class): Use "kind" field in binding_level, not
	the various flags.
	(poplevel_class): Likewise.
	(initial_push_namespace_scope): Likewise.
	(maybe_push_to_top_level): Likewise.
	(set_identifier_type_value_with_scope): Likewise.
	(pop_everything): Likewise.
	(maybe_process_template_type_declaration): Likewise.
	(pushtag): Likewise.
	(pushdecl): Likewise.
	(pushdecl_with_scope): Likewise.
	(check_previous_goto_1): Likewise.
	(define_label): Likewise.
	(finish_case_label): Likewise.
	(lookup_tag): Likewise.
	(unqualified_namespace_lookup): Likewise.
	(lookup_name_real): Likewise.
	(lookup_name_current_level): Likewise.
	(lookup_type_current_level): Likewise.
	(record_builtin_type): Likewise.
	(cp_make_fname_decl): Likewise.
	(maybe_inject_for_scope_var): Likewise.
	(cp_finish_decl): Remove check for doing_semantic_analysis_p.
	(start_function): Use begin_scope, not pushlevel.
	(finish_function): Use "kind" field in binding_level, not
	the various flags.
	(start_method): Use begin_scope, not pushlevel.
	(make_label_decl): Do not check expanding_p.
	(save_function-data): Do not set expanding_p.
	(cxx_push_function_context): Do not clear expanding_p.
	* semantics.c (cxx_expand_function_start): Do not set expanding_p.

	PR c++/3907
	* g++.dg/parse/template12.C: New test.

	* g++.dg/abi/bitfield11.C: New test.
	* g++.dg/abi/bitfield12.C: Likewise.

From-SVN: r71393
2003-09-15 00:59:28 +00:00
Kaveh R. Ghazi 703ad42b4b alias.c [...]: Remove unnecessary casts.
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c
	c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in
	c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c
	collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c
	cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c
	cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c
	dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c
	fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c
	gcse.c genattr.c genattrtab.c genautomata.c genconditions.c
	genemit.c genextract.c genoutput.c genrecog.c gensupport.c
	ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c
	integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c
	loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c
	postreload.c prefix.c print-tree.c protoize.c ra-build.c
	ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c
	regmove.c regrename.c reload.c reload1.c reorg.c resource.c
	sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c
	simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c
	tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c
	varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary
	casts.

From-SVN: r69587
2003-07-19 14:47:15 +00:00
Kazu Hirata 4ed432168c c-format.c: Fix comment formatting.
* c-format.c: Fix comment formatting.
	* c-typeck.c: Likewise.
	* coverage.c: Likewise.
	* cppcharset.c: Likewise.
	* cpplib.c: Likewise.
	* dbxout.c: Likewise.
	* gcov-io.h: Likewise.
	* toplev.c: Likewise.

From-SVN: r69276
2003-07-12 22:49:48 +00:00
Nathan Sidwell 330d2e2ade gcov-io.h: Update documentation.
* gcov-io.h: Update documentation.
	(GCOV_UNSIGNED2STRING): New.
	(GCOV_TAG_FUNCTION_LENGTH, GCOV_TAG_BLOCKS_LENGTH,
	GCOV_TAG_ARCS_LENGTH, GCOV_TAG_COUNTER_LENGTH,
	GCOV_TAG_SUMMARY_LENGTH): Adjust.
	(GCOV_TAG_BLOCKS_NUM, GCOV_TAG_ARCS_NUM,
	GCOV_TAG_COUNTER_NUM): New.
	(GCOV_BLOCK_SIZE): Number of words.
	(gcov_var): Adjust buffer type.
	* gcov-io.c (gcov_write_bytes, gcov_read_bytes): Rename to ...
	(gcov_write_words, gcov_read_words): ... here. Take a 4-byte word
	count, not byte count.
	(gcov_open): Adjust overread init.
	(gcov_allocate, gcov_write_unsigned, gcov_write_counter,
	gcov_write_string, gcov_write_tag, gcov_write_length,
	gcov_write_tag_length): Adjust.
	(gcov_read_unsigned, gcov_read_counter, gcov_read_string): Adjust.
	(gcov_sync, gcov_seek): Adjust.
	* gcov-dump.c (print_usage): Show gcc version only.
	(dump_file): Use GCOV_UNSIGNED2STRING.
	(tag_blocks, tag_arcs, tag_counters): Use GCOV_TAG_*_NUM macros.
	* gcov.c (print_version): Show gcc version only.
	(read_graph_file): Use GCOV_UNSIGNED2STRING. Use
	GCOV_TAG_*_NUM macros.
	(read_count_file): Use GCOV_UNSIGNED2STRING. Use
	GCOV_TAG_COUNTER_LENGTH.
	* coverage.c (read_counts_file): Use GCOV_UNSIGNED2STRING.
	Use GCOV_TAG_COUNTER_NUM.
	* libgcov.c (gcov_version): Use GCOV_UNSIGNED2STRING.
	(__gcov_merge_single, __gcov_merge_delta): Use GCOV_CHECK.

From-SVN: r69188
2003-07-10 14:13:01 +00:00
Nathan Sidwell 160e2e4f23 gcov-io.h: Update documentation.
* gcov-io.h: Update documentation.
	(GCOV_GRAPH_SUFFIX, GCOV_GRAPH_MAGIC): Rename to GCOV_NOTE_SUFFIX,
	GCOV_NOTE_MAGIC.
	(GCOV_DATA_SUFFIX, GCOV_NOTE_SUFFIX): Update.
	(GCOV_DATA_MAGIC, GCOV_NOTE_MAGIC): Make non-palindromic.
	(struct gcov_var): Change buffer's type. Add endian flag.
	(gcov_open): Remove mode in libgcov.
	(gcov_magic): Prototype.
	* gcov-io.c (from_file): New.
	(gcov_open): Clear endian flag.
	(gcov_magic): New.
	(gcov_write_bytes, gcov_read_bytes): Return gcov_unsigned_t
	pointers.
	(gcov_write_unsigned, gcov_write_counter, gcov_write_string,
	gcov_write_tag, gcov_write_length, gcov_write_tag_length): Update.
	(gcov_read_unsigned, gcov_read_counter, gcov_read_string): Update.
	* gcov-iov.c (main): Correct cast.
	* coverage.c (read_counts_file): Use gcov_magic. Remove endianness
	conversion.
	(gcov_begin_output): Use GCOV_NOTE_MAGIC.
	(coverage_init): Use GCOV_NOTE_SUFFIX.
	* libgcov.c (gcov_version_mismatch): Remove endianness conversion.
	Rename to gcov_version, and return flag.
	(gcov_exit): Use gcov_version.
	(__gcov_init): Use gcov_version.
	* Makefile.in (coverageexts): Update.
	* gcov.c (print_version): Remove endianness conversion.
	(create_file_names): Use GCOV_NOTE_SUFFIX.
	(read_graph_file): Use gcov_magic.
	(read_count_file): Likewise.
	* gcov-dump.c (dump_file): Remove endianness conversion, use
	gcov_magic.

From-SVN: r69137
2003-07-09 12:12:29 +00:00
Nathan Sidwell dd486eb27c gcov-io.h: Add a local time stamp.
* gcov-io.h: Add a local time stamp.
	(struct gcov_info): Add stamp field.
	(gcov_truncate): New.
	* coverage.c (read_counts_file): Skip the stamp.
	(coverage_begin_output): Write the stamp.
	(build_gcov_info): Declare and init the stamp.
	(coverage_finish): Only unlink data file, if stamp is zero.
	* gcov-dump.c (dump_file): Dump the stamp.
	* gcov.c (bbg_stamp): New.
	(release_structures): Clear bbg_stamp.
	(read_graph_file): Read stamp.
	(read_count_file): Check stamp.
	* libgcov.c (gcov_exit): Check stamp and truncate if needed.

From-SVN: r69006
2003-07-06 14:51:48 +00:00
Andreas Jaeger 159b3be1f3 collect2.h: Convert prototypes to ISO C90.
* collect2.h: Convert prototypes to ISO C90.
	* collect2.c: Likewise.
	* conflict.c: Likewise.
	* coverage.c: Likewise.
	* convert.h: Likewise.
	* convert.c: Likewise.

From-SVN: r68669
2003-06-29 14:07:06 +02:00
Kazu Hirata 71c0e7fc96 basic-block.h: Fix comment formatting.
* basic-block.h: Fix comment formatting.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-format.c: Likewise.
	* coverage.c: Likewise.
	* cpplib.h: Likewise.
	* cpppch.c: Likewise.
	* dbxout.c: Likewise.
	* diagnostic.c: Likewise.
	* dwarf2out.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gcc.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* profile.c: Likewise.
	* real.h: Likewise.
	* sched-deps.c: Likewise.

From-SVN: r68369
2003-06-23 15:27:37 +00:00
Nathan Sidwell 1f9cc6db1b tree.h (expand_function_end): Remove all parameters.
* tree.h (expand_function_end): Remove all parameters.
	* function.c (expand_function_end): Remove all parameters.
	Use input_location. Never expand_end_bindings.
	* c-decl.c (c_expand_body_1): Adjust expand_function_end call.
	* coverage.c (create_coverage): Likewise.

	* ada/utils.c (end_subprog_body): Adjust expand_function_end
	call.

	* cp/semantics.c (genrtl_finish_function): Adjust
	expand_function_end call.

	* f/com.c (finish_function): Adjust expand_function_end call.

	* java/class.c (push_class): Use a location_t to save place.
	(emit_register_classes): Set input_location. Adjust
	expand_function_end call.
	* java/resource.c (write_resource_constructor): Likewise.
	* java/decl.c (end_java_method): Adjust expand_function_end call.
	* java/parse.y (source_end_java_method): Likewise.

	* treelang/treetree.c (tree_code_create_function_wrapup): Adjust
	expand_function_end call.

From-SVN: r68255
2003-06-20 09:08:23 +00:00
Nathan Sidwell ee6b0296b8 tree.h (init_function_start): Remove filename and line paramters.
* tree.h (init_function_start): Remove filename and line paramters.
	* function.c (init_function_start): Remove filename and line
	parameters. Use DECL_SOURCE_LOCATION.
	* c-decl.c (store_parm_decls): Adjust init_function_start call.
	(c_expand_body_1): Likewise.
	* coverage.c (create_coverage): Likewise.

	* ada/utils.c (begin_subprog_body): Adjust init_function_start
	call.

	* cp/decl.c (start_function): Adjust init_function_start call.
	* cp/method.c (use_thunk): Likewise.
	* cp/semantics.c (genrtl_start_function): Likewise.

	* f/com.c (stor_parm_decls): Adjust init_function_start call.

	* java/class.c (emit_register_classes): Adjust init_function_start
	call.
	* java/decl.c (complete_start_java_method): Likewise.
	* java/resource.c (write_resource_constructor): Likewise.

	* objc/objc-act.c (build_tmp_function_decl): Set line number to
	zero.
	(hack_method_prototype): Adjust init_function_start call.

	* treelang/treetree.c (tree_code_create_function_initial): Adjust
	init_function_start call.

From-SVN: r67953
2003-06-14 17:33:32 +00:00
Kazu Hirata 6356f89288 ChangeLog: Follow spelling conventions.
* ChangeLog: Follow spelling conventions.
	* ChangeLog.2: Likewise.
	* c-decl.c: Likewise.
	* cfgloop.h: Likewise.
	* cgraph.c: Likewise.
	* coverage.c: Likewise.
	* cppcharset.c: Likewise.
	* cpphash.h: Likewise.
	* cpplex.c: Likewise.
	* cpplib.c: Likewise.
	* dbxout.c: Likewise.
	* df.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* explow.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gengtype.c: Likewise.
	* ggc.h: Likewise.
	* opts.c: Likewise.
	* real.c: Likewise.
	* reload.c: Likewise.
	* stmt.c: Likewise.

From-SVN: r67849
2003-06-12 19:01:08 +00:00
Nathan Sidwell 7d63a2fae0 gcov-io.h (gcov_write_bytes, [...]): Remove here.
* gcov-io.h (gcov_write_bytes, gcov_read_bytes): Remove here.
	(GCOV_TAG_*) Force type to gcov_unsigned_t.
	(GCOV_CHECK, GCOV_CHECK_READING, GCOV_CHECK_WRITING): New.
	(struct gcov_var): Remove modified. Add start, length, offset,
	overread. Have buffer array for libgcov.
	(gcov_sync, gcov_seek): Definitions moved to gcov-io.c.
	(gcov_position, gcov_rewrite, gcov_is_eof): Adjust.
	* gcov-io.c (gcov_open): Set mode, do not read anything.
	(gcov_close): Write final block.
	 (gcov_write_block, gcov_allocate): New.
	(gcov_write_bytes): Make static. Write or allocate buffer.
	(gcov_write_unsigned, gcov_write_counter): Buffer can never be
	null.
	(gcov_write_string): Adjust.
	(gcov_write_tag)
	(gcov_write_length): Adjust. Flush the block.
	(gcov_write_tag_length): Buffer can never be null.
	(gcov_read_bytes): Make static. Read in block.
	(gcov_sync): Moved here. Adjust.
	(gcov_seek): Moved here. Adjust.
	* coverage.c (read_counts_file): Adjust.
	* gcov-dump.c (print_prefix): Add position parameter.
	(flag_dump_positions): New flag.
	(options, main, print_usage): Add it.
	(dump_file, tag_blocks, tag_arcs, tag_lines, tag_counters,
	tag_summary): Adjust.
	* gcov.c (read_graph_file, read_count_file): Adjust.
	* libgcov.c (gcov_exit): Adjust.

From-SVN: r66805
2003-05-14 16:01:20 +00:00
Nathan Sidwell 6d70e6bee0 coverage.h (coverage_counter_alloc): New function.
* coverage.h (coverage_counter_alloc): New function.
	* function.h (struct function): Remove arc_profile flag.
	* coverage.c (fn_ident): Remove.
	(fn_b_ctrs, no_coverage): New.
	(get_coverage_counts): Use current_function_funcdef_no.
	(coverage_counter_alloc): New.
	(coverage_counter_ref): Adjust.
	(coverage_begin_output): Check no_coverage. Use
	current_function_funcdef_no.
	(coverage_end_function): Likewise.
	(create_coverage): Set no_coverage. Set DECL_UNINLINEABLE rather
	than clearing flag_inline_functions. Do not clear arc_profile
	flag.
	* function.c (prepare_function_start): Do not set arc_profile
	flag.
	* profile.c (instrument_edges): Return number of instrumented
	edges. Use a for loop.
	(branch_prob): Call coverage_counter_alloc. Make BB_TO_GCOV_INDEX
	local to here and simplify. Use profile_arc_flag not arc_profile
	flag.
	(find_spanning_tree): Reformat.
	* toplev.c (rest_of_compilation): Use profile_arc_flags and
	flag_test_coverage rather than arc_profile flag.

From-SVN: r66695
2003-05-11 19:21:32 +00:00
Nathan Sidwell 9b514d2586 defaults.h (GCOV_TYPE_SIZE): Remove.
* defaults.h (GCOV_TYPE_SIZE): Remove.
	* gcov-io.h (gcov_type): Set to specific mode int on target.
	(gcov_unsigned_t, gcov_position_t): New.
	(GCOV_TYPE_NODE): New.
	(GCOV_TAG_SUMMARY_LENGTH): Adjust.
	(GCOV_COUNTERS_SUMMABLE): New.
	(gcov_ctr_summary, gcov_sumary, gcov_fn_info, gcov_merge_fn,
	gcov_ctr_info, gcov_info): Adjust types.
	(gcov_var): Adjust types.
	(gcov_write_unsigned, gcov_write_tag,
	gcov_write_length, gcov_write_tag_length, gcov_write_summary,
	gcov_read_unsigned, gcov_read_summary): Adjust gcov types.
	(gcov_position, gcov_sync, gcov_seek): Adjust gcov types.
	* gcov-io.c (gcov_write_unsigned, gcov_write_tag,
	gcov_write_length, gcov_write_tag_length, gcov_write_summary,
	gcov_read_unsigned, gcov_read_summary): Adjust gcov types.
	* libgcov.c (gcov_crc32, gcov_version_mismatch, gcov_exit,
	__gcov_init, __gcov_merge_add): Adjust gcov types.
	* coverage.c (ctr_merge_functions): Constify.
	(ctr_names): New.
	(read_counts_file): Adjust gcov types. Only summarize & merge
	summable counters.
	(coverage_counter_ref): Use GCOV_TYPE_NODE.
	(build_fn_info_type, build_fn_info_value, build_ctr_info_type,
	build_ctr_info_value, build_gcov_info): Adjust types.
	* profile.c (branch_prob): Adjust gcov types.
	* gcov_dump (dump_file): Adjust gcov types.

From-SVN: r66668
2003-05-10 19:02:21 +00:00