Commit Graph

1858 Commits

Author SHA1 Message Date
Daniel Berlin 0a05048550 Makefile.def: Remove libbanshee.
Toplevel:

2004-09-09  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.def: Remove libbanshee.
	* Makefile.tpl: Ditto.
	* configure.in: Ditto.
	* Makefile.in: Regen.
	* configure: Ditto.

gcc/

2004-09-09  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.in: Remove libbanshee, tree-alias-*.
	Remove tree-alias-common.h dependencies.
	* common.opt: Remove -ftree-points-to.
	* configure.ac: Remove libbanshee.
	* flags.h: Remove pta_type, flag_tree_points_to.
	* gengtype.c (open_base_files): Remove tree-alias-type.h.
	* opts.c (OPT_ftree_points_to): Remove.
	* toplev.c: Remove tree-alias-common.h, flag_tree_points_to.
	* tree-dfa.c: Remove tree-alias-common.h
	* tree-into-ssa.c: Ditto.
	* tree-outof-ssa.c: Ditto.
	* tree-ssa-copyrename.c: Ditto.
	* tree-ssa-live.c: Ditto.
	* tree-optimize.c: Ditto.
	* tree-ssa.c: Ditto.
	Remove pass_build_pta, pass_del_pta.
	* tree-pass.h: Ditto.
	* tree-ssa-alias.c: Remove tree-alias-common.h.
	(struct alias_stats_d):	Remove pta_queries, pta_resolved.
	(pass_may_alias): Remove PROP_pta requirement.
	(may_alias_p): Remove pta_queries, pta_resolved, use of andersens.
	(get_tmt_for): Ditto.
	(dump_alias_stats): Ditto.
	* doc/passes.texi: Remove blurb about points-to analysis.
	* fortran/Make-lang.in: Remove tree-alias-*.o.

From-SVN: r87253
2004-09-09 20:53:41 +00:00
Nathan Sidwell b2d59f6f77 Makefile.in (gengtype): Use $(BUILD_ERRORS).
* Makefile.in (gengtype): Use $(BUILD_ERRORS).
	(gengtype.o): Depend on errors.h.
	* genattrtab.c (strcmp_check): Use gcc_assert and gcc_unreachable.
	(attr_rtx_1, attr_printf, attr_copy_rtx, evaluate_eq_attr,
	attr_alt_subset_p, attr_alt_subset_of_compl_p,
	attr_alt_intersection, attr_alt_union, optimize_attrs, gen_insn,
	write_test_expr, write_attr_value, write_eligible_delay,
	make_internal_attr, make_numeric_value): Likewise.
	* genautomata.c (regexp_name, get_str_vect,
	gen_presence_absence_set, automaton_decl_hash,
	automaton_decl_eq_p, insn_decl_hash, insn_decl_eq_p, decl_hash,
	decl_eq_p, process_regexp, loop_in_regexp, check_loops_in_regexps,
	process_regexp_cycles, reserv_sets_cmp, set_unit_reserv,
	test_unit_reserv, it_is_empty_reserv_sets,
	reserv_sets_are_intersected, reserv_sets_shift, reserv_sets_or,
	reserv_sets_and, output_cycle_reservs, get_free_state,
	intersected_state_reservs_p, states_union, remove_arc,
	copy_insn_regexp, transform_1, transform_2, transform_3,
	regexp_transform_func, store_alt_unit_usage,
	check_regexp_units_distribution, process_seq_for_forming_states,
	process_alts_for_forming_states, make_automaton,
	form_arcs_marked_by_insn, create_composed_state,
	set_out_arc_insns_equiv_num, partition_equiv_class,
	process_insn_equiv_class, set_insn_equiv_classes,
	units_to_automata_heuristic_distr, form_regexp,
	longest_path_length, output_dfa_max_issue_rate, add_vect,
	out_state_arcs_num, add_vect_el, output_trans_table,
	output_state_alts_table, output_dead_lock_vect,
	output_max_insn_queue_index_def,
	output_min_insn_conflict_delay_func,
	output_internal_insn_latency_func, output_print_reservation_func,
	output_cpu_unit_reservation_p, output_state_arcs,
	make_insn_alts_attr, make_internal_dfa_insn_code_attr,
	make_default_insn_latency_attr,
	form_important_insn_automata_lists): Likewise.
	* genemit.c (gen_exp, output_add_clobbers,
	output_added_clobbers_hard_reg_p): Likewise.
	* genextract.c (print_path, main): Likewise.
	* genflags.c (gen_macro): Likewise.
	* gengenrtl.c: Include errors.h
	(type_from_format, accessor_from_format): Likewise.
	* gengtype.c (get_file_basename, output_mangled_typename,
	walk_type, write_types_process_field,
	write_types_local_process_field): Likewise.
	* genmodes.c (complete_mode): Likewise.
	* genopinit.c (gen_insn): Likewise.
	* genoutput.c (output_insn_data, check_constraint_len,
	constraint_len): Likewise.
	* genpreds.c (add_mode_tests):Likewise.
	* gen-protos.c (add_hash): Likewise.
	* genrecog.c (find_operand, find_matching_operand,
	validate_pattern, add_to_sequence, maybe_both_true,
	nodes_identical_1, merge_trees, write_switch, write_cond,
	write_action, is_unconditional, make_insn_sequence,
	debug_decision_2): Likewise.
	* gensupport.c (is_predicable, collect_insn_data,
	alter_predicate_for_insn, maybe_eval_c_test): Likewise.

From-SVN: r87236
2004-09-09 13:22:38 +00:00
Giovanni Bajo 1e128c5f7b targhooks.c (default_unwind_emit, [...]): Use gcc_assert, gcc_unreachable & internal_error instead of abort.
* targhooks.c (default_unwind_emit, default_scalar_mode_supported_p):
	Use gcc_assert, gcc_unreachable & internal_error instead of abort.
	* timevar.c (timevar_push, timevar_pop, timevar_start,
	timevar_stop): Likewise.
	* toplev.c (default_pch_valid_p): Likewise.
	* tracer.c (tail_duplicate): Likewise.
	* tree-alias-common.c (get_alias_var_decl,
	get_values_from_constructor, create_alias_var, delete_alias_vars,
	empty_points_to_set, same_points_to_set, ptr_may_alias_var):
	Likewise.
	* tree.c (tree_size, make_node_stat, copy_node_stat,
	build_int_cst_wide, integer_all_onesp, list_length, chainon,
	tree_node_structure, type_contains_placeholder_p, substitute_in_expr,
	substitute_placeholder_in_expr, tabilize_reference_1, build0_stat,
	build1_stat, build2_stat, build3_stat, build4_stat, is_attribute_p,
	lookup_attribute, type_hash_canon, host_integerp, iterative_hash_expr,
	build_method_type_directly, decl_type_context, get_callee_fndecl,
	get_set_constructor_bits, build_vector_type_for_mode, int_cst_value,
	tree_fold_gcd): Likewise.
	* tree-cfg.c (create_bb, make_ctrl_stmt_edges, make_exit_edges,
	make_cond_expr_edges, group_case_labels, tree_merge_blocks,
	cleanup_control_expr_graph, find_taken_edge,
	find_taken_edge_switch_expr, phi_alternatives_equal,
	is_ctrl_altering_stmt, disband_implicit_edges, set_bb_for_stmt,
	stmt_for_bsi, tree_find_edge_insert_loc, bsi_insert_on_edge_immediate,
	tree_split_edge, tree_verify_flow_info, thread_jumps,
	tree_redirect_edge_and_branch, tree_flow_call_edges_add): Likewise.
	* tree-chrec.c (chrec_fold_poly_cst, chrec_fold_plus_poly_poly,
	chrec_fold_multiply_poly_poly): Likewise.
	* tree-complex.c (extract_component, expand_complex_division,
	expand_complex_comparison, expand_complex_operations_1,
	build_replicated_const, expand_vector_operations_1): Likewise.
	* tree-data-ref.c (tree_fold_bezout, build_classic_dist_vector,
	build_classic_dir_vector): Likewise.
	* tree-dfa.c (compute_immediate_uses_for_phi,
	compute_immediate_uses_for_stmt, create_var_ann, create_stmt_ann,
	create_tree_ann, collect_dfa_stats, get_virtual_var): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.
	* tree-eh.c (record_stmt_eh_region, add_stmt_to_eh_region,
	record_in_finally_tree, replace_goto_queue_1,
	maybe_record_in_goto_queue, verify_norecord_switch_expr,
	do_return_redirection): Likewise.
	* tree-if-conv.c (tree_if_convert_stmt, tree_if_convert_cond_expr,
	add_to_dst_predicate_list, find_phi_replacement_condition,
	replace_phi_with_cond_modify_expr, get_loop_body_in_if_conv_order):
	Likewise.
	* tree-inline.c (remap_decl, remap_type, remap_decls, copy_body_r,
	initialize_inlined_parameters, declare_return_variable,
	estimate_num_insns_1, expand_call_inline, expand_calls_inline,
	optimize_inline_calls, copy_tree_r): Likewise.
	* tree-into-ssa.c (rewrite_initialize_block_local_data, rewrite_stmt,
	ssa_rewrite_stmt, rewrite_into_ssa): Likewise.
	* tree-iterator.c (alloc_stmt_list, tsi_link_before, tsi_link_after,
	tsi_split_statement_list_after, tsi_split_statement_list_before):
	Likewise.
	* tree-mudflap.c (mf_varname_tree): Likewise.
	* tree-nested.c (create_tmp_var_for, lookup_field_for_decl,
	lookup_tramp_for_decl, convert_all_function_calls): Likewise.
	* tree-optimize.c (tree_rest_of_compilation): Likewise.
	* tree-outof-ssa.c (create_temp, eliminate_build, eliminate_phi,
	coalesce_abnormal_edges, coalesce_ssa_name, eliminate_virtual_phis,
	free_temp_expr_table, add_dependance, finish_expr, rewrite_trees):
	Likewise.
	* tree-phinodes.c (resize_phi_node, add_phi_arg,
	remove_all_phi_nodes_for): Likewise.
	* tree-pretty-print.c (op_prio, print_call_name): Likewise.
	* tree-profile.c (tree_gen_interval_profiler, tree_gen_pow2_profiler,
	tree_gen_one_value_profiler, tree_gen_const_delta_profiler): Likewise.
	* tree-sra.c (type_can_instantiate_all_elements, sra_hash_tree,
	sra_elt_eq, sra_walk_expr, instantiate_missing_elements,
	generate_one_element_ref, generate_element_copy,
	generate_element_zero, scalarize_copy, scalarize_init,
	scalarize_ldst): Likewise.
	* tree-ssa-alias.c (delete_alias_info, group_aliases, may_alias_p,
	add_may_alias, add_pointed_to_expr, add_pointed_to_var,
	collect_points_to_info_r, get_tmt_for, get_ptr_info): Likewise.
	* tree-ssa.c (walk_use_def_chains, check_phi_redundancy): Likewise.
	* tree-ssa-ccp.c (dump_lattice_value, get_default_value, get_value,
	set_lattice_value, likely_value, ccp_visit_phi_node, visit_assignment,
	widen_bitfield, ccp_fold_builtin): Likewise.
	* tree-ssa-copy.c (may_propagate_copy, merge_alias_info,
	replace_exp_1, propagate_tree_value): Likewise.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Likewise.
	* tree-ssa-dce.c (set_control_dependence_map_bit,
	find_control_dependence, find_pdom, mark_operand_necessary,
	mark_stmt_if_obviously_necessary,
	mark_control_dependent_edges_necessary, remove_dead_stmt): Likewise.
	* tree-ssa-dom.c (dom_opt_initialize_block_local_data,
	simplify_switch_and_lookup_avail_expr, cprop_into_successor_phis,
	eliminate_redundant_computations, avail_expr_eq): Likewise.
	* tree-ssa-dse.c (fix_stmt_v_may_defs): Likewise.
	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p,
	duplicate_blocks): Likewise.
	* tree-ssa-loop-im.c (for_each_index, set_level,
	is_call_clobbered_ref): Likewise.
	* tree-ssa-loop-ivopts.c (dump_use, divide, stmt_after_ip_normal_pos,
	stmt_after_increment, set_iv, contains_abnormal_ssa_name_p,
	find_interesting_uses_outer_or_nonlin, add_derived_ivs_candidates,
	peel_address, ptr_difference_cost, may_replace_final_value,
	determine_use_iv_cost, rewrite_use_nonlinear_expr, rewrite_use_outer,
	rewrite_use, rewrite_uses): Likewise.
	* tree-ssa-loop-manip.c (rewrite_into_loop_closed_ssa,
	check_loop_closed_ssa_use): Likewise.
	* tree-ssanames.c (make_ssa_name): Likewise.
	* tree-ssa-operands.c (finalize_ssa_defs, finalize_ssa_uses,
	finalize_ssa_v_must_defs, finalize_ssa_stmt_operands,
	get_stmt_operands, get_expr_operands, get_asm_expr_operands,
	get_indirect_ref_operands, add_stmt_operand): Likewise.
	* tree-ssa-pre.c (value_exists_in_set_bitmap,
	value_remove_from_set_bitmap, bitmap_insert_into_set, insert_into_set,
	phi_translate, valid_in_set, compute_antic,
	find_or_generate_expression, create_expression_by_pieces, insert_aux,
	create_value_expr_from, eliminate): Likewise.
	* tree-ssa-propagate.c (cfg_blocks_get): Likewise.
	* tree-ssa-threadupdate.c (remove_last_stmt_and_useless_edges):
	Likewise.
	* tree-tailcall.c (independent_of_stmt_p, adjust_return_value,
	eliminate_tail_call): Likewise.
	* tree-vectorizer.c (vect_create_index_for_array_ref,
	vect_align_data_ref, vect_create_data_ref,
	vect_create_destination_var, vect_get_vec_def_for_operand,
	vect_finish_stmt_generation, vect_transform_stmt,
	vect_transform_loop_bound, vect_transform_loop,
	vect_analyze_operations): Likewise.
	* tree-vn.c (vn_compute, set_value_handle, get_value_handle):
	Likewise.
	* tree-flow-inline.h (var_ann, get_var_ann, get_def_from_ptr,
	get_use_op_ptr, immediate_use, phi_ssa_name_p, bsi_start,
	bsi_after_labels, bsi_last): Likewise.
	* tree-ssa-live.c (var_union, change_partition_var,
	create_ssa_var_map, calculate_live_on_entry, root_var_init,
	type_var_init, add_coalesce, sort_coalesce_list, pop_best_coalesce):
	Likewise.
	* tree-ssa-live.h (partition_is_global, live_entry_blocks,
	tpa_find_tree): Likewise.
	(register_ssa_partition_check): Declare.
	(register_ssa_partition): use it.
	* tree-ssa-live.c: Include errors.h.
	(register_ssa_partition_check): New.
	* tree-ssa-operands.c: Include errors.h.
	* Makefile.in (tree-ssa-operands.o): Depend on errors.h.

Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>

From-SVN: r87223
2004-09-09 07:54:12 +00:00
Daniel Berlin 599eabdb42 Makefile.in (tree-loop-linear.o): Added.
2004-09-08  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.in (tree-loop-linear.o): Added.
	(OBJS-common): Add tree-loop-linear.o
	* common.opt: New flag, ftree-loop-linear.
	* timevar.def: New timevar, TV_TREE_LOOP_LINEAR.
	* tree-flow.h: Add prototype for linear_transform_loops.
	* tree-optimize.c: Add linear transform after vectorization.
	* tree-pass.h: Add struct pass_linear_transform.
	* tree-ssa-loop.c: Add pass_linear_transform.
	* tree-loop-linear.c: New file.
	* lambda-code.c: gcc_assertify.
	(gcc_loop_to_lambda_loop): Handle all exit tests.
	Handle case where we have (invariant >= induction var).
	(find_induction_var_from_exit_cond): Ditto.

From-SVN: r87190
2004-09-08 15:28:56 +00:00
Andreas Tobler faaaf610bf Makefile.in (builtins.o): Depend on tree-mudflap.h.
[gcc/ChangeLog]
2004-09-08  Andreas Tobler  <toa@pop.agri.ch>

        * Makefile.in (builtins.o): Depend on tree-mudflap.h.
        * builtins.c: Include tree-mudflap.h.

From-SVN: r87175
2004-09-08 06:04:15 +00:00
Ziemowit Laski 6408ef3386 Makefile.in (c-parse.o): Depend on $(C_COMMON_H).
[gcc/ChangeLog]
2004-09-07  Ziemowit Laski  <zlaski@apple.com>

	* Makefile.in (c-parse.o): Depend on $(C_COMMON_H).
	* c-parse.in: Include c-common.h instead of objc-act.h.
	(ivar_decl_list, ivar_decls, ivar_decl, ivars, ivar_declarator,
	myparms, myparm): Remove %type declarations.
	(methodtype, optparms, OBJC_TYPE_QUAL, objc_quals, objc_qual,
	objc_typename, objc_try_catch_stmt, optellipsis): Add %type
	declarations.
	(objc_inherit_code, objc_public_flag): Remove.
	(typespec_nonreserved_nonattr): Call
	objc_get_protocol_qualified_type() instead of get_static_reference()
	and get_protocol_reference().
	(stmt_nocomp): Call grokparm() on @catch parameter.
	(objcdef): Move semantic action to objc_finish_implementation().
	(classdef): Move semantic action to objc_start_class_interface(),
	objc_continue_interface(), objc_finish_interface(),
	objc_start_class_implementation(), objc_continue_implementation(),
	objc_start_category_interface() and
	objc_start_category_implementation().
	(protocoldef): Move semantic actions to objc_start_protocol() and
	objc_finish_interface().
	(ivar_decl_list): Remove nonterminal.
	(visibility_spec): Move semantic actions to objc_set_visibility().
	(ivar_decls): Remove assignment to $$.
	(ivar_decl): Rephrase in terms of component_decl; call
	objc_add_instance_variable().
	(ivars, ivar_declarator): Remove nonterminals.
	(opt_semi): New nonterminal.
	(methodtype): Remove semantic actions.
	(methoddef): Move semantic actions to objc_set_method_type(),
	objc_start_method_definition() and objc_finish_method_definition().
	(methodproto): Move semantic actions to objc_set_method_type() and
	objc_add_method_declaration().
	(methoddecl): Use objc_typename instead of typename; move semantic
	actions to objc_build_method_signature().
	(optarglist, myxdecls, mydecl, myparms, myparm): Remove nonterminals.
	(optparmlist): Express in terms of optparms and optellipsis.
	(optparms, optellipsis, objc_qual, objc_quals, objc_typename): New
	nonterminals.
	(keyworddecl): Use objc_typename instead of typename.
	(rid_to_yy): Mark RID_IN, RID_OUT, RID_INOUT, RID_BYCOPY, RID_BYREF
	and RID_ONEWAY as returning OBJC_TYPE_QUAL to yyparse().

[gcc/objc/ChangeLog]
2004-09-07  Ziemowit Laski  <zlaski@apple.com>

	* Make-lang.in (objc/objc-parse.o): Depend on $(C_COMMON_H) instead of
	objc/objc-act.h.
	(objc/objc-act.o): Depend on $(HASHTAB_H).
	* objc-act.c: Include hashtab.h; in ObjC++ mode, include cp-tree.h and
	objcp-decl.h instead of c-tree.h.
	(build_module_descriptor, get_class_ivars, synth_id_with_class_suffix,
	error_with_ivar, gen_method_decl, gen_declaration, setup_string_decl,
	build_protocol_template): Adjust prototypes.
	(build_module_initializer_routine, start_class, continue_class,
	finish_class, start_method_def, objc_start_function, start_protocol,
	build_method_decl, objc_add_method, add_instance_variable,
	build_ivar_reference, is_ivar, is_private, get_super_receiver,
	build_selector_table_decl, objc_push_parm, objc_get_parm_info,
	gen_type_name, gen_type_name_0, start_var_decl, finish_var_decl,
	create_field_decl): New prototypes.
	(objc_expand_function_end, comp_method_with_proto, objc_expr_last,
	gen_declaration_1, gen_declarator, is_complex_decl, adorn_decl,
	define_decl, create_builtin_decl, gen_declspecs): Remove prototypes.
	(TYPE_ID): Rename to OBJECT_TYPEDEF_NAME.
	(CLASS_TYPEDEF_NAME): New.
	(TAG_EXECCLASS): Change from a global variable to a #define.
	(TAG_RETURN_STRUCT): Delete.
	(TAG_GNUINIT): New, holds '__objc_gnu_init' name.
	(objc_inherit_code, objc_public_flag): New, moved from c-parse.in.
	(string_descriptor): New struct.
	(string_htab): New hash table.
	(string_hash, string_eq): New prototypes.
	(generate_struct_by_value_array): Call create_field_decl() instead of
	create_builtin_decl().
	(objc_init): Do not initialize objc_ellipsis_node or TAG_EXECCLASS;
	In ObjC++ mode, call cxx_init() instead of c_objc_common_init().
	(objc_finish_file): In ObjC++, call instantiate_pending_templates()
	and cp_finish_file().
	(define_decl, get_static_reference, get_protocol_reference,
	create_builtin_decl): Remove functions.
	(objc_start_class_interface, objc_start_category_interface,
	objc_start_protocol, objc_continue_interface, objc_finish_interface,
	objc_start_class_implementation, objc_start_category_implementation,
	objc_continue_implementation, objc_finish_implementation,
	objc_set_visibility, objc_set_method_type,
	objc_build_method_signature, objc_add_method_declaration,
	objc_start_method_definition, objc_add_instance_variable,
	objc_get_protocol_qualified_type, create_field_decl,
	start_var_decl, finish_var_decl): New functions.
	(setup_string_decl): Simplify since it is only called once.
	(synth_module_prologue): Call build_class_template(); predefine 'id'
	and 'Class' as typedefs; rename 'temp_type' to 'type'; disable debug
	hooks for duration of function; fix GNU runtime messenger signatures
	to correspond to reality; forward-declare '__objc_exec_class' for the
	GNU runtime; call build_selector_table_decl(); in ObjC++ mode, generate
	'extern "C" { ... }' wrappers around synthesized declarations; call
	build_protocol_template() and build_category_template().
	(string_hash, string_eq): New functions.
	(objc_build_string_object): Check metaclass correctness only once;
	store string literals in hash table.
	(objc_build_constructor): Do not convert initializer elements;
	adjust for ObjC++ impedance mismatch.
	(build_objc_symtab_template): Call create_field_decl() instead of
	create_builtin_decl().
	(init_objc_symtab): Add missing conversion to initializer element.
	(build_metadata_decl): Call start_var_decl() instead of define_decl().
	(generate_objc_symtab_decl): Do not call build_category_template();
	call start_var_decl() and finish_var_decl() instead of start_decl()
	and finish_decl().
	(build_module_descriptor): Call create_field_decl() instead of
	grokfield(); call start_var_decl() and finish_var_decl() instead of
	start_decl() and finish_decl(); always mark module descriptor as
	used; move GNU runtime-specific functionality to
	build_module_initializer_routine().
	(build_module_initializer_routine): New function, broken off of
	build_module_descriptor().
	(objc_static_init_needed_p, objc_generate_static_init_call): New
	functions.
	(generate_static_references, generate_strings,
	build_selector_translation_table, generate_descriptor_table,
	generate_ivars_list, generate_dispatch_table, generate_category): Call
	start_var_decl() and finish_var_decl() instead of start_decl() and
	finish_decl(); build a type directly instead of via groktypename().
	(build_selector_reference_decl, build_selector_table_decl,
	build_class_reference_decl, build_protocol_reference,
	generate_objc_image_info): Call start_var_decl() instead of
	build_decl().
	(build_selector_reference): For GNU runtime, do not call
	build_selector_reference_decl().
	(build_selector, build_typed_selector_reference): Always convert
	result to the selector type.
	(add_objc_string): Cast return value to 'char *'.
	(build_method_prototype_template, build_selector_template,
	build_method_template): Use actual selector type for fields
	pointing to selectors.
	(finish_objc): For GNU runtime, call
	build_module_initializer_routine() after build_module_descriptor().
	(generate_protocol_list, generate_shared_structures): Call
	start_var_decl() and finish_var_decl() instead of start_decl() and
	finish_decl(); build a type directly instead of via
	groktypename().
	(synth_id_with_class_suffix): Return a string.
	(get_arg_type_list): For instance methods, use the instance type for
	'self'; do not call groktypename_in_parm_context().
	(build_objc_string_decl): Squash redeclaration errors in ObjC++.
	(objc_is_class_name): Use OBJC_TYPE_NAME instead of TYPE_NAME;
	handle RECORD_TYPEs in ObjC as well as ObjC++.
	(objc_is_id): New function.
	(objc_is_object_ptr): Return the canonical type node.
	(objc_get_class_ivars): Simplify using get_class_ivars().
	(get_class_ivars): Remove second parameter; create a fresh copy
	of the ivar list for each call; do not check for existence of
	super class.
	(objc_eh_runtime_type): Mark #ifndef OBJCPLUS.
	(objc_init_exceptions): When using SJLJ-style exceptions, require
	the use of '-fobjc-exceptions' flag; do not require it for DWARF-style
	exceptions.
	(objc_build_exc_ptr, next_sjlj_build_try_catch_finally): Use
	objc_object_type instead of objc_id_type.
	(objc_begin_catch_clause): Convert the incoming PARM_DECL into
	a VAR_DECL before placing it in the appropriate scope; do not
	call define_decl(); adjust call to c_begin_compound_stmt();
	use objc_object_type instead of objc_id_type.
	(build_next_objc_exception_stuff): Call create_field_decl() instead
	of create_builtin_decl(); construct type directly instead of calling
	groktypename(); use OBJC_VOID_AT_END to mark end of function parameters.
	(build_private_template): Adjust call to get_class_ivars(); build
	a type directly instead of via groktypename().
	(build_protocol_template, build_method_prototype_list_template,
	build_method_prototype_template, build_category_template,
	build_selector_template, build_class_template, build_super_template,
	build_ivar_template, build_ivar_list_template,
	build_method_list_template, build_method_template):
	Call create_field_decl() instead of grokfield().
	(objc_method_parm_type): Do not call groktypename().
	(generate_descriptor_table): Call start_var_decl() and
	finish_var_decl() instead of start_decl() and finish_decl().
	(generate_method_descriptors, build_protocol_initializer,
	generate_dispatch_tables, build_category_initializer,
	build_shared_structure_initializer): Do not call groktypename().
	(generate_protocols): Call start_var_decl() and finish_var_decl()
	instead of start_decl() and finish_decl(); do not call groktypename().
	(error_with_ivar): Remove last parameter.
	(check_ivars): Do not iterate ovar CLASS_RAW_IVARS lists in addition
	to CLASS_IVARS lists; adjust calls to error_with_ivar().
	(generate_ivar_lists): Convert one of the initializer elements; do
	not call groktypename().
	(get_arg_type_list, start_method_def, gen_method_def): Account for
	new representation of variable arguments and '...' in Objective-C
	methods; add Objective-C++ impedance matching code.
	(is_objc_type_qualifier): Remove function.
	(adjust_type_for_id_default): Simplify; there is no longer a need to
	wade through declspecs.
	(lookup_interface, start_class, continue_class,
	finish_class, start_method_def, start_protocol, build_method_decl,
	objc_add_method, add_instance_variable, build_ivar_reference,
	is_ivar, is_private, get_super_receiver, objc_build_finally_epilogue):
	Make into static functions.
	(receiver_is_class_object): Use new IS_CLASS() macro.
	(objc_build_message_expr): Tweak ObjC++ message argument handling;
	call objc_finish_message_expr() instead of finish_message_expr().
	(finish_message_expr): Rename to objc_finish_message_expr(); use
	OBJC_TYPE_NAME and OBJC_SET_TYPE_NAME macros instead of TYPE_NAME.
	call gen_type_name() instead of gen_declaration(); call objc_is_id()
	instead of using IS_ID and IS_CLASS; Use objc_class_name instead of
	calling get_identifier("Class"); handle CONVERT_EXPRs in receiver.
	(build_objc_method_call, warn_with_method): Do not call groktypename().
	(build_ivar_reference): Call convert() instead of clobbering in a
	type.
	(hash_init): Initialize string_htab hash table.
	(add_instance_variable): Simplify parameter list; do not call grokfield();
	do not populate CLASS_IVARS list.
	(start_class): Check for the existence of super class, if one was specified.
	(continue_class): Use CLASS_RAW_IVARS rather than CLASS_IVARS; do not
	call build_class_template(); adjust call to get_class_ivars(); call
	build_decl(), pushdecl() and finish_decl() instead of define_decl().
	(finish_class): Call build_decl(), pushdecl() and finish_decl() instead
	of define_decl().
	(add_protocols): Use PROTOCOL_BINFO_ELTS for the tree vector size.
	(start_protocol): Do not call build_protocol_template(); use
	PROTOCOL_BINFO_ELTS for the tree vector size.
	(encode_type_qualifiers): Do not handle the 'const' qualifier here.
	(encode_pointer): Encode 'const char *' as 'r*', for backwards
	compatibility.
	(encode_array): Use HOST_WIDE_INT_PRINT_DEC instead of "%ld".
	(encode_type): Handle the 'const' qualifier here.
	(objc_parmlist): New global variable, sued by objc_push_parm and
	objc_get_parm_info().
	(objc_push_parm, objc_get_parm_info): New functions.
	(objc_expr_last): Remove function.
	(synth_self_and_ucmd_args): For instance methods, use the instance
	type for 'self'; call objc_push_parm() instead of push_parm_decl().
	(start_method_def): Do not call push_scope(), declare_parm_level(),
	pop_scope(), push_parm_decl(), store_parm_decls() or objc_expr_last();
	just use objc_push_parm() and objc_get_parm_info().
	(comp_method_with_proto): Remove function.
	(objc_types_are_equivalent): Strip away indirections before comparing
	underlying types.
	(comp_proto_with_proto): Do not call groktypename(); types are no
	longer in raw declspec format.
	(objc_start_function): New function.
	(really_start_method): Call comp_proto_with_proto() instead of
	comp_method_with_proto(); call objc_start_function() instead of
	hand-crafting a function declarator.
	(continue_method_def, objc_expand_function_end): Remove functions.
	(get_super_receiver): Call objc_get_current_scope() instead of
	get_current_scope(); reference 'super_class' field (instead of
	'class').
	(finish_method_def): Rename to objc_finish_method_definition() and
	add a function decl parameter; move method encoding call from
	objc_expand_function_end().
	(is_complex_decl, adorn_decl, gen_declarator, gen_declspecs,
	gen_declaration_1): Remove functions.
	(tmpbuf, RAW_DECLSPEC): Remove.
	(gen_declaration): Remove second parameter; simplify to deal
	with TYPE_P nodes instead of raw declspecs.
	(gen_type_name, gen_type_name_0): New functions.
	(gen_method_decl): Remove second parameter; call gen_type_name()
	instead of gen_declaration_1().
	(dump_interface): Adjust calls to gen_declaration() and
	gen_method_decl(); do not allocate a separate string buffer.
	(init_objc): Allocate a larger string buffer to accommodate
	dump_interface(); adjust call to build_module_descriptor();
	add call to build_module_initializer_routine() for the GNU
	runtime.
	(generate_classref_translation_entry): Do not call start_decl(); call
	finish_var_decl() instead of finish_decl(); call convert() instead of
	build_c_cast().
	* objc-act.h (CLASS_OWN_IVARS): Remove accessor.
	(CLASS_BINFO_ELTS): Reduce from 6 to 5, now that CLASS_OWN_IVARS is
	gone.
	(OCTI_GNU_INIT_DECL, GNU_INIT_decl): New.
	(OCTI_ELLIPSIS_NODE, objc_ellipsis_node): Remove.
	(OCTI_ID_ID, id_type, objc_id_id): Rename to OCTI_ID_NAME,
	objc_object_type and objc_object_name, respectively.
	(OCTI_CLS_REF, OCTI_CLASS_NAME, objc_class_reference,
	objc_class_name): New.
	(IS_CLASS): New macro.
	(IS_ID, IS_SUPER): Robustify.
	(OCTI_EXECCLASS_DECL, execclass_decl): New.
	(finish_file, start_class, continue_class, finish_class,
	start_method_def, continue_method_def, finish_method_def,
	start_protocol, finish_protocol, objc_build_throw_stmt,
	objc_build_try_catch_finally_stmt, objc_build_synchronized_prologue,
	objc_build_synchronized_epilogue, objc_build_try_prologue,
	objc_build_try_epilogue, objc_build_catch_stmt, objc_build_catch_epilogue,
	objc_build_finally_prologue, objc_build_finally_epilogue,
	is_ivar, is_private, is_public, add_instance_variable, objc_add_method,
	get_super_receiver, objc_clear_super_receiver, get_class_ivars_from_name,
	get_class_reference, get_static_reference, get_object_reference,
	build_message_expr, finish_message_expr, build_selector_expr,
	build_ivar_reference, build_keyword_decl, build_method_decl,
	build_protocol_expr, build_objc_string_object, objc_declare_alias,
	objc_declare_class, objc_declare_protocols, objc_comptypes,
	objc_check_decl, build_encode_expr): Remove prototypes.
	(imp_count, cat_count): Make GGC-aware.
	(OBJC_SET_TYPE_NAME): New macro.

From-SVN: r87168
2004-09-08 00:49:44 +00:00
H.J. Lu e64dc64724 re PR bootstrap/17313 (fixinc.sh isn't parallel build safe)
2004-09-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/17313
	* Makefile.in (specs.ready): Depend on cc1$(exeext).

From-SVN: r87133
2004-09-06 16:58:14 -07:00
Zack Weinberg 93f8bd9e6e Makefile.in (rtl.o, bitmap.o): Correct dependencies, remove unnecessary commands.
* Makefile.in (rtl.o, bitmap.o): Correct dependencies, remove
	unnecessary commands.

From-SVN: r87122
2004-09-06 18:37:21 +00:00
Mohan Embar c802a85924 Makefile.in (rtl.o): Remove -DGENERATOR_FILE.
* Makefile.in (rtl.o): Remove -DGENERATOR_FILE.
	(bitmap.o): Likewise.

From-SVN: r87118
2004-09-06 14:48:43 +00:00
Paolo Bonzini 9f8628bacd Unify the management of RTL and tree-level dump files.
2004-09-06  Paolo Bonzini  <bonzini@gnu.org>

	Unify the management of RTL and tree-level dump files.

	* cfgexpand.c (tree_expand_cfg): Fix incorrect comment.
	Don't print function name to the dump file, the pass manager
	would do this for us. Add code from the top of
	rest_of_compilation, up to the initial RTL dump.
	* passes.c (rest_of_handle_jump): Call fixup_tail_calls and
	close the DFI_sibling dump file.
	(rest_of_compilation): Don't do that here.  Remove code up to the
	initial RTL dump.
	(init_optimization_passes): Remove.
	(pass_rest_of_compilation): Change pass name to NULL.
	* toplev.c (lang_dependent_init): Do not use an empty dump file prefix.
	Do not call init_optimization_passes.
	* toplev.h (init_optimization_passes): Remove.

	* graph.c (print_rtl_graph_with_bb, clean_graph_dump_file,
	finish_graph_dump_file): Remove SUFFIX parameter.
	* graph.h (print_rtl_graph_with_bb, clean_graph_dump_file,
	finish_graph_dump_file): Likewise.

	* tree-pass.h (struct tree_opt_pass): Add `letter' field.
	* cfgexpand.c (pass_expand): Adjust.
	* gimple-low.c (pass_lower_cf, pass_remove_useless_vars): Adjust.
	* passes.c (pass_rest_of_compilation): Adjust.
	* predict.c (pass_profile): Adjust.
	* tree-alias-common.c (pass_build_pta, pass_del_pta): Adjust.
	* tree-cfg.c (pass_build_cfg, pass_remove_useless_stmts,
	pass_split_crit_edges, pass_warn_function_return): Adjust.
	* tree-complex.c (pass_lower_vector_ssa, pass_pre_expand): Adjust.
	* tree-dfa.c (pass_referenced_vars): Adjust.
	* tree-eh.c (pass_lower_eh): Adjust.
	* tree-if-conv.c (pass_build_ssa): Adjust.
	* tree-into-ssa.c (pass_build_ssa): Adjust.
	* tree-mudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust.
	* tree-nomudflap.c (pass_mudflap_1, pass_mudflap_2): Adjust.
	* tree-nrv.c (pass_nrv): Adjust.
	* tree-optimize.c (pass_gimple, pass_all_optimizations,
	pass_cleanup_cfg_post_optimizing, pass_free_datastructures,
	pass_init_datastructures): Adjust.
	* tree-outof-ssa.c (pass_del_ssa): Adjust.
	* tree-profile.c (pass_tree_profile): Adjust.
	* tree-sra.c (pass_sra): Adjust.
	* tree-ssa-alias.c (pass_may_alias): Adjust.
	* tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Adjust.
	* tree-ssa-copyrename.c (pass_rename_ssa_copies): Adjust.
	* tree-ssa-dce.c (pass_dce, pass_cd_dce): Adjust.
	* tree-ssa-dom.c (pass_dominator): Adjust.
	* tree-ssa-dse.c (pass_dse): Adjust.
	* tree-ssa-forwprop.c (pass_forwprop): Adjust.
	* tree-ssa-if-conv.c (pass_if_conversion): Adjust.
	* tree-ssa-loop-ch.c (pass_ch): Adjust.
	* tree-ssa-loop.c (pass_loop, pass_loop_init, pass_lim,
	pass_loop_done, pass_complete_unroll, pass_iv_canon,
	pass_iv_optimize, pass_vectorize): Adjust.
	* tree-ssa-phiopt.c (pass_phiopt): Adjust.
	* tree-ssa-pre.c (pass_pre, pass_fre): Adjust.
	* tree-ssa.c (pass_redundant_phi, pass_early_warn_uninitialized,
	pass_late_warn_uninnitialized): Adjust.
	* tree-tailcall.c (pass_tail_recursion, pass_tail_calls): Adjust.

	* Makefile.in (tree-dump.o): Add new dependencies.
	* cgraph.c (cgraph_remove_node): TDF_all -> TDF_tree_all.
	* cgraphunit.c (cgraph_preserve_function_body_p, cgraph_optimize):
	Likewise.
	* toplev.c (dump_file_name): New.
	* tree-dump.c (dump_enable_all): Add LETTER parameter.
	(struct dump_file_info): Add NUM and LETTER fields.
	(dump_files): Adjust and add RTL dump files.
	(dump_register): Add NUM and LETTER fields.
	(get_dump_file_name, dump_initialized_p, enable_rtl_dump_file): New.
	(dump_begin): Use get_dump_file_name.
	(dump_switch_p_1): Adjust call to dump_enable_all.
	* tree-dump.h (dump_register): Adjust prototype.
	* tree-optimize.c (register_one_dump_file): Take dump file index.
	Support flags for RTL dumps.
	(register_dump_files): Fill in NUM field of struct dump_file_info.
	Track properties both when the gate is executed and when it is not.
	(execute_todo): Dump RTL.  Add PROPERTIES parameter.
	(execute_one_pass): Pass properties to execute_todo.  Handle VCG
	dumps of RTL.
	* tree-pass.h (dump_file_name): New.
	* tree.h (TDF_TREE, TDF_RTL, get_dump_file_name, dump_initialized_p):
	New.

	* Makefile.in (passes.o): Add new dependencies.
	* passes.c (struct dump_file_info, enum dump_file_index,
	dump_file_tbl, init_optimization_passes): Remove.
	(open_dump_file, close_dump_file): Use tree-dumping infrastructure.
	(rest_of_handle_new_regalloc, rest_of_handle_old_regalloc): Use
	dump_enabled_p.
	(finish_optimization_passes): Update finish_graph_dump_file loop.
	(enable_rtl_dump_file): Remove.
	* tree-dump.c (dump_files): Adjust and add RTL dump files.
	(enable_rtl_dump_file): Add here.
	* tree.h (enum tree_dump_index): Add RTL dump file indices.
	* doc/invoke.texi (Debugging options): Document new RTL debugging
	options.  Update.

From-SVN: r87113
2004-09-06 10:08:17 +00:00
Zdenek Dvorak 8b11a64cd9 tree-ssa-loop-ivopts.c: New file.
* tree-ssa-loop-ivopts.c: New file.
	* Makefile.in (tree-ssa-loop-ivopts.c): Add.
	* cfgloop.h (target_avail_regs, target_res_regs, target_small_cost,
	target_pres_cost, target_spill_cost): Declare.
	* cfgloopanal.c (avail_regs, res_regs, small_cost, pres_cost,
	spill_cost): Renamed to ...
	(target_avail_regs, target_res_regs, target_small_cost,
	target_pres_cost, target_spill_cost): ... and exported.
	(init_set_costs, global_cost_for_size): Work with renamed variables.
	* common.opt (flag_ivopts): New flag.
	* expr.c (expand_expr_real_1): Handle SSA_NAME case.  Handle
	REF_ORIGINAL.
	* gimplify.c (struct gimplify_ctx): Add into_ssa field.
	(internal_get_tmp_var, gimplify_modify_expr, gimplify_expr): Support
	generating SSA form.
	(force_gimple_operand): New function.
	* timevar.def (TV_TREE_LOOP_IVOPTS): New timevar.
	* tree-cfg.c (stmt_bsi): New function.
	* params.def (PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND,
	PARAM_IV_MAX_CONSIDERED_USES): New.
	* tree-flow.h (stmt_bsi, tree_ssa_iv_optimize, split_loop_exit_edge,
	bsi_insert_on_edge_immediate_loop. standard_iv_increment_position,
	ip_end_pos, ip_normal_pos, force_gimple_operand): Declare.
	* tree-gimple.c (is_gimple_formal_tmp_var): Accept ssa names.
	* tree-nested.c (build_addr): Export.
	* tree-optimize.c (init_tree_optimization_passes): Add
	pass_iv_optimize.
	* tree-pass.h (pass_iv_optimize): Declare.
	* tree-ssa-loop-im.c (for_each_index): Handle REALPART_EXPR and
	IMAGPART_EXPR.
	* tree-ssa-loop-manip.c (create_iv): Force the base to be acceptable
	as a phi node argument.
	(split_loop_exit_edge, bsi_insert_on_edge_immediate_loop,
	ip_end_pos, ip_normal_pos, standard_iv_increment_position): New
	functions.
	* tree-ssa-loop-niter.c (zero_p, unsigned_type_for): Export.
	* tree-ssa-loop.c (tree_ssa_loop_ivopts, gate_tree_ssa_loop_ivopts,
	pass_iv_optimize): New pass.
	* tree-ssa-operands.c (get_indirect_ref_operands): Handle REF_ORIGINAL.
	* tree-ssanames.c (release_ssa_name): Allow calling with var = NULL.
	* tree.c (build_int_cst_type, cst_and_fits_in_hwi): New functions.
	* tree.h (REF_ORIGINAL): New macro.
	(build_int_cst_type, unsigned_type_for, zero_p,
	cst_and_fits_in_hwi, build_addr): Declare.
	* doc/invoke.texi (-fivopts): Document.
	(PARAM_IV_CONSIDER_ALL_CANDIDATES_BOUND,
	PARAM_IV_MAX_CONSIDERED_USES): Document.
	* doc/passes.texi: Document induction variable optimizations pass.

	* gcc.dg/tree-ssa/loop-2.c: New test.
	* gcc.dg/tree-ssa/loop-3.c: New test.
	* gcc.dg/tree-ssa/loop-4.c: New test.
	* gcc.dg/tree-ssa/loop-5.c: New test.

From-SVN: r87100
2004-09-05 09:25:37 +00:00
Devang Patel 40923b202d Tree level if-conversion for vectorizer.
* Makefile.in (OBJS-common): Add tree-if-conv.o
        (tree-if-conv.o): New rule.
        * cfgloop.c (flow_loop_exit_edges_find): Set EDGE_LOOP_EXIT flag.
        (get_loop_body_in_bfs_order): New.
        * cfgloop.h (get_loop_body_in_bfs_order): New.
        * tree-flow.h (enum move_pos): Move here from ..
        * tree-ssa-loop-im.c (enum move_pos): here.
        (movement_possibility): Make externally visible.
        * tree-optimize.c (init_tree_optimization_passes): New entry for
        if conversion pass.
        * tree-pass.h (pass_if_conversion): New.
        * tree-ssa-operands.c (get_expr_operands): Handle COND_EXPR.
        * tree-if-conv.c: New file.
        * doc/passes.texi: Document tree if-conversion pass.
        * doc/tree-ssa.texi: Same.

        testsuite:

        * gcc.dg/tree-ssa/ifc-20040816-1.c: New test.
        * gcc.dg/tree-ssa/ifc-20040816-2.c: New test.

From-SVN: r87073
2004-09-03 20:27:01 -07:00
H.J. Lu 443728bba4 re PR target/14925 (libunwind enabled gcc generates incompatible libgcc_s.so.1)
2004-09-03  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/14925:
	Makefile.in (LIB2ADDEHSTATIC): New.
	(LIB2ADDEHSHARED): New.
	(LIBUNWIND): New.
	(LIBUNWINDDEP): New.
	(SHLIBUNWIND_LINK): New.
	(SHLIBUNWIND_INSTALL): New.
	(libgcc.mk): Pass LIB2ADDEHSTATIC, LIB2ADDEHSHARED, LIBUNWIND,
	LIBUNWINDDEP, SHLIBUNWIND_LINK and SHLIBUNWIND_INSTALL.
	(clean): Remove libunwind*
	(stage1-start): Remove and copy stage1/libunwind*.
	(stage2-start): Remove and copy stage2/libunwind*.
	(stage3-start): Remove and copy stage3/libunwind*.
	(stage4-start): Remove and copy stage4/libunwind*.
	(stageprofile-start): Remove and copy stageprofile/libunwind*.
	(stagefeedback-start): Remove and copy stagefeedback/libunwind*.

	* config.gcc (ia64*-*-linux*): Always add t-libunwind to
	tmake_file. Add t-libunwind-elf and ia64/t-glibc-libunwind to
	tmake_file if --with-system-libunwind isn't used.

	* config/ia64/t-glibc-libunwind: New file.
	* config/t-libunwind-elf: Likewise.
	* unwind-compat.c: Likewise.
	* unwind-compat.h: Likewise.
	* unwind-dw2-fde-compat.c: Likewise.

	* config/ia64/t-glibc (LIB2ADDEH): Updated.
	* config/ia64/t-hpux (T_CFLAGS): Add -DUSE_LIBUNWIND_EXCEPTIONS.

	* config/ia64/unwind-ia64.c: Include "unwind-compat.h". Define
	aliases if needed.
	* unwind-dw2-fde-glibc.c: Likewise.
	* unwind-dw2.c: Likewise.

	* config/t-libunwind (LIB2ADDEH): Updated.
	(LIB2ADDEHSTATIC): New.
	(T_CFLAGS): Add -DUSE_LIBUNWIND_EXCEPTIONS.
	(TARGET_LIBGCC2_CFLAGS): Set to -DUSE_GAS_SYMVER.

	* configure.ac: Change --enable-libunwind-exceptions to
	--with-system-libunwind. Don't define USE_LIBUNWIND_EXCEPTIONS.
	* configure: Regenerated.
	* config.in: Updated.

	* doc/install.texi (ia64-*-linux): Require libunwind 0.98 or
	above and mention --with-system-libunwind.
	(ia64-*-hpux*): Mention --enable-libunwind-exceptions is
	removed in gcc 3.4.3 and later.

	* gcc.c (init_spec): Add -lunwind to -lgcc_s if
	USE_LIBUNWIND_EXCEPTIONS is defined.

	* mklibgcc.in: Support libunwind.

From-SVN: r87066
2004-09-03 17:15:42 -07:00
Richard Henderson 1f6d3a0807 re PR middle-end/9997 (Coelesce stack slots for disjoint scopes.)
PR middle-end/9997
        * cfgexpand.c (LOCAL_ALIGNMENT): Provide default.
        (STACK_ALIGNMENT_NEEDED, FRAME_GROWS_DOWNWARD): Likewise.
	(struct stack_var, EOC, stack_vars, stack_vars_alloc, stack_vars_num,
        stack_vars_sorted, stack_vars_conflict, stack_vars_conflict_alloc,
        frame_phase, get_decl_align_unit, add_stack_var, triangular_index,
        resize_stack_vars_conflict, add_stack_var_conflict,
        stack_var_conflict_p, add_alias_set_conflicts, stack_var_size_cmp,
        union_stack_vars, partition_stack_vars, dump_stack_var_partition,
        expand_one_stack_var_at, expand_stack_vars, expand_one_stack_var,
        expand_one_static_var, expand_one_hard_reg_var,
        expand_one_register_var, expand_one_error_var, defer_stack_allocation,
        expand_one_var, expand_used_vars_for_block, clear_tree_used): New.
        (expand_used_vars): Rewrite.
        * Makefile.in (cfgexpand.o): Update dependencies.

From-SVN: r87064
2004-09-03 16:50:11 -07:00
Jan Beulich 7f148c2ff9 Makefile.in (LIB2ADDEHDEP): Add unwind.h and unwind-pe.h.
* Makefile.in (LIB2ADDEHDEP): Add unwind.h and unwind-pe.h.
        * mklibgcc.in (libgcc_dep): New, covering general dependencies, but
        not unwind code specific ones.
        (libgcc2_c_dep): Replace general dependencies with use of libgcc_dep.
        Remove unwind code specific dependencies.
        (libgcov_c_dep): Replace general dependencies with use of libgcc_dep.
        Remove gbl-ctors.h.
        Add libgcc_dep to output generated for LIB2ADD, LIB2ADDEH, and
        LIB2ADD_ST. Add LIB2ADDEHDEP to output generated for LIB2ADDEH.

From-SVN: r87026
2004-09-02 22:26:27 -07:00
Jan Hubicka 0772402279 gimplify.c (gimplify_compound_lval): Move "stack" varray out of GGC.
* gimplify.c (gimplify_compound_lval): Move "stack" varray out of
	GGC.

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

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

From-SVN: r86974
2004-09-02 18:32:49 +00:00
Zdenek Dvorak 6d9901e75f Makefile.in (rtl-profile.o, [...]): Add GCC_H dependency.
* Makefile.in (rtl-profile.o, value-prof.o): Add GCC_H dependency.
	* common.opt (fspeculative-prefetching): New.
	* flags.h (flag_speculative_prefetching_set): Declare.
	* gcov-io.c (gcov_write_counter, gcov_read_counter): Allow negative
	values.
	* opts.c (flag_sepculative_prefetching_set): New variable.
	(common_handle_option): Handle -fspeculative-prefetching.
	* passes.c (rest_of_compilation): Ditto.
	* profile.c (instrument_values, compute_value_histograms, branch_prob):
	Use vectors instead of arrays.
	* toplev.c (process_options): Handle -fspeculative-prefetching.
	* rtl-profile.c: Include ggc.h.
	(rtl_gen_interval_profiler, rtl_gen_pow2_profiler,
	rtl_gen_one_value_profiler_no_edge_manipulation,
	rtl_gen_one_value_profiler, rtl_gen_const_delta_profiler): Type of
	argument changed.
	* tree-profile.c (tree_gen_interval_profiler, tree_gen_pow2_profiler,
	tree_gen_one_value_profiler, tree_gen_const_delta_profiler): Type of
	argument changed.
	* value-prof.c: Include ggc.h.
	(NOPREFETCH_RANGE_MIN, NOPREFETCH_RANGE_MAX): New
	macros.
	(insn_prefetch_values_to_profile, find_mem_reference_1,
	find_mem_reference_2, find_mem_reference, gen_speculative_prefetch,
	speculative_prefetching_transform): New.
	(value_profile_transformations): Call speculative_prefetching_transform.
	(insn_values_to_profile): Call insn_prefetch_values_to_profile.
	(insn_divmod_values_to_profile, rtl_find_values_to_profile,
	tree_find_values_to_profile, find_values to profile): Use vectors
	instead of arrays.
	(free_profiled_values): Removed.
	* value-prof.h (struct histogram_value): Renamed to
	struct histogram_value_t.
	(histogram_value, histogram_values): New types.
	(find_values_to_profile): Declaration changed.
	(free_profiled_values): Removed.
	(struct profile_hooks): Type of argument of the hooks changed to
	histogram_value.
	* doc/invoke.texi (-fspeculative-prefetching): Document.

From-SVN: r86930
2004-09-01 20:58:55 +00:00
Jakub Jelinek a5d8b097a4 * Makefile.in (bb-reorder.o): Add several dependencies.
From-SVN: r86913
2004-09-01 19:12:34 +02:00
Paolo Bonzini 71b5d516bc Made fixincludes a toplevel build module.
toplevel:
2004-08-31  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.def (build_modules): Add fixincludes.
	(dependencies): Make gcc depend on fixincludes.
	* configure.in (build_tools): Add fixincludes.
	(build_configdirs): Always include build_libs.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

contrib:
2004-08-04  Paolo Bonzini  <bonzini@gnu.org>

	* gcc_update: Add fixincludes.

fixincludes:
2004-08-31  Paolo Bonzini  <bonzini@gnu.org>

	* .cvsignore: New.
	* Makefile.in: From gcc/fixinc/Makefile.in, making it fully
	autoconfiscated.
	* configure.ac: New.
	* config.h.in: Generate.
	* configure: Generate.
	* aclocal.m4: New.
	* fixlib.h: Remove inclusions of gcc files.
	* system.h: New.

	Other files copied from gcc/fixinc.

gcc:
2004-08-31  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in (build_subdir): New substitution.
	(fixinc.sh): Simplify heavily since fixincludes is already built.
	(stmp-fixinc): Depend on specs.ready.
	(install-mkheaders): Use new location of fixincludes.
	(clean): Do not descend into fixinc.
	(FORBUILD): Replace with ../$(build_subdir).
	* configure.ac (build_subdir): Substitute.
	(FORBUILD): Do not set.
	(all_outputs): Remove fixinc/Makefile.
	(default commands): Do not create links in fixinc.
	* mkfixinc.sh: New, from fixinc/mkfixinc.sh without
	the fixincludes configuration steps and substituting
	@FIXINCL@ in fixinc.in.
	* fixinc.in: New, from fixinc/fixincl.sh.

	* fixinc/*: Removed.

From-SVN: r86824
2004-08-31 09:27:00 +00:00
Diego Novillo 750628d8bc Makefile.in (OBJS-common): Add tree-ssa-propagate.o
* Makefile.in (OBJS-common): Add tree-ssa-propagate.o
	(tree-ssa-propagate.o): New rule.
	(GTFILES): Add tree-ssa-propagate.c.
	* tree-flow.h (struct stmt_ann_d): Remove field
	in_ccp_worklist.
	* tree-ssa-propagate.c: New file.
	* tree-ssa-propagate.h: New file.
	* tree-ssa-ccp.c: Re-write to use the routines from
	tree-ssa-propagate.c.

From-SVN: r86711
2004-08-29 02:16:02 -04:00
Daniel Berlin 36d59cf798 [multiple changes]
2004-08-26  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.in (lambda-code.o): New.
	(lambda-trans.o): Ditto.
	(TREE_DATA_REF_H): Ditto.
	(LAMBDA_H): Ditto.
	(lambda-mat.o): Use LAMBDA_H.
	(tree-data-ref.o): Ditto.
	* lambda-code.c: New file.  Lambda code generation algorithm.
	* lambda-trans.c: Ditto. Lambda transformation matrix support.
	* lambda.h: Add lambda loop structures.
	Add lambda loopnest structures.
	Add lambda body vector structure.
	Add lambda linear expression structures.
	Add prototypes for functions in new files.
	* lambda-mat.c: Include tree.h

2004-08-26  Daniel Berlin <dberlin@dberlin.org>
	    Sebastian Pop  <pop@cri.ensmp.fr>

	* tree-data-ref.h: Include lambda.h
	(free_dependence_relation): Declared here.
	(free_dependence_relations): Ditto.
	(free_data_refs): Ditto.
	* tree-data-ref.c (free_dependence_relation): New function.
	(free_dependence_relations): Ditto.
	(free_data_refs): Ditot.
	(analyze_all_data_dependences): Free datarefs and dependence_relations.
	(build_classic_dist_vector): Store in the dependence_relations the
	information. Each arc in the dependence_relations graph is labelled
	with the distance and direction vectors.
	(build_classic_dir_vector): Ditto.
	(compute_rw_wr_ww_dependences): Renamed again compute_all_dependences.
	Now computes again the whole dependence graph including read-read
	relations.
	(compute_data_dependences_for_loop): Now dependence_relations contains
	all the data, and thus it doesn't need to initialize the classic_dir
	and classic_dist vectors.
	(analyze_all_data_dependences): Adjusted for using the new interface of
	compute_data_dependences_for_loop.  Remove the statistics dump.

Co-Authored-By: Sebastian Pop <pop@cri.ensmp.fr>

From-SVN: r86627
2004-08-26 17:10:50 +00:00
James E Wilson c61225e74f Fix linux make profiledbootstrap.
* Makefile.in (STAGEFEEDBACK_FLAGS_TO_PASS): Remove
-freorder-blocks-and-partition.

From-SVN: r86521
2004-08-24 14:38:35 -07:00
Zdenek Dvorak 82b85a85c8 tree-ssa-loop-ivcanon.c: New file.
* tree-ssa-loop-ivcanon.c: New file.
	* tree-ssa-loop-manip.c (create_iv): New function.
	* Makefile.in (tree-ssa-loop-ivcanon.o): Add.
	(tree-ssa-loop.o, tree-ssa-loop-manip.o): Add SCEV_H dependency.
	* cfgloop.c (mark_single_exit_loops): New function.
	(verify_loop_structure): Verify single-exit loops.
	* cfgloop.h (struct loop): Add single_exit field.
	(LOOPS_HAVE_MARKED_SINGLE_EXITS): New constant.
	(mark_single_exit_loops): Declare.
	(tree_num_loop_insns): Declare.
	* cfgloopmanip.c (update_single_exits_after_duplication): New function.
	(duplicate_loop_to_header_edge): Use it.
	* common.opt (fivcanon): New flag.
	* timevar.def (TV_TREE_LOOP_IVCANON, TV_COMPLETE_UNROLL): New timevars.
	* tree-cfg.c (tree_find_edge_insert_loc): Return newly created block.
	(bsi_commit_edge_inserts_1): Pass null to tree_find_edge_insert_loc.
	(bsi_insert_on_edge_immediate): New function.
	* tree-flow.h (bsi_insert_on_edge_immediate,
	canonicalize_induction_variables, tree_unroll_loops_completely,
	create_iv): Declare.
	* tree-optimize.c (init_tree_optimization_passes): Add
	pass_iv_canon and pass_complete_unroll.
	* tree-pass.h (pass_iv_canon, pass_complete_unroll): Declare.
	* tree-scalar-evolution.c (get_loop_exit_condition,
	get_exit_conditions_rec, number_of_iterations_in_loop,
	scev_initialize): Use single_exit information.
	* tree-ssa-loop-niter.c (number_of_iterations_cond): Record
	missing assumptions.
	(loop_niter_by_eval):  Return number of iterations as unsigned
	int.
	* tree-ssa-loop.c (tree_ssa_loop_init): Mark single exit loops.
	(tree_ssa_loop_ivcanon, gate_tree_ssa_loop_ivcanon, pass_iv_canon,
	tree_complete_unroll, gate_tree_complete_unroll, pass_complete_unroll):
	New passes.
	(tree_ssa_loop_done): Call free_numbers_of_iterations_estimates.
	* tree-ssanames.c (make_ssa_name): Allow creating ssa name before
	the defining statement is ready.
	* tree-vectorizer.c (vect_create_iv_simple): Removed.
	(vect_create_index_for_array_ref, vect_transform_loop_bound):
	Use create_iv.
	(vect_transform_loop_bound): Use single_exit information.
	(vect_analyze_loop_form): Cleanup bogus tests.
	(vectorize_loops): Do not call flow_loop_scan.
	* tree.h (may_negate_without_overflow_p): Declare.
	* fold-const.c (may_negate_without_overflow_p): Split out from ...
	(negate_expr_p): ... this function.
	(tree_expr_nonzero_p): Handle overflowed constants correctly.
	* doc/invoke.texi (-fivcanon): Document.
	* doc/passes.texi: Document canonical induction variable creation.

	* gcc.dg/tree-ssa/loop-1.c: New test.

From-SVN: r86516
2004-08-24 20:48:23 +00:00
Zack Weinberg 9e995780d4 rtl.def: Wrap MD-only codes in #ifdef GENERATOR_FILE.
* rtl.def: Wrap MD-only codes in #ifdef GENERATOR_FILE.
	* gengtype.c: Don't include rtl.h.  Define enum rtx_code and
	rtx_name, rtx_format arrays by direct reference to rtl.def,
	first undefining GENERATOR_FILE.  Define enum insn_note and
	note_insn_name array by direct reference to insn-notes.def.
	(adjust_field_rtx_def): Remove local definition of rtx_name.
	Use symbolic names for insn notes.
	* Makefile.in (gengtype.o): Update dependencies.

From-SVN: r86499
2004-08-24 17:00:54 +00:00
Nathan Sidwell d46cd2be37 Makefile.in (PROTO_OBJS): Add errors.o.
* Makefile.in (PROTO_OBJS): Add errors.o.
	* protoize.c (fancy_abort): Remove.
	* mips-tfile.c (fancy_abort): Add parameters.

From-SVN: r86471
2004-08-24 08:52:38 +00:00
Andreas Tobler 4505f099ef Makefile.in (HOOKS_H): Add dependency on MACHMODE_H.
2004-08-24  Andreas Tobler  <a.tobler@schweiz.ch>

	* Makefile.in (HOOKS_H): Add dependency on MACHMODE_H.
	(host-default.o): Add dependency on HOOKS_H.
	* config/x-linux: Likewise.
	* config/x-solaris: Likewise.
	* config/i386/x-mingw32: Likewise.
	* config/rs6000/x-darwin: Likewise.

From-SVN: r86468
2004-08-24 09:31:33 +02:00
Nathan Sidwell b3d1f5b404 Makefile.in (BUILD_ERRORS): Set to build-errors.
* Makefile.in (BUILD_ERRORS): Set to build-errors.
	(errors.o): New target for host.
	(build-errors.o): New target for build.
	(genobjs): Replace errors.o with build-errors.
	(gengenrtl$(buildexeext)): Add $(BUILD_ERRORS).
	(GCOV_OBJS, GCOV_DUMP_OBJS): Add errors.o.
	(fix-headers$(build_exeext)): Add $(BUILD_ERRORS).
	(fix-header.o): Add errors.h
	* collect2.c (fancy_abort): Add parameters.
	* collect2.h (fancy_abort): Don't declare.
	* errors.h (fancy_abort): Don't declare.
	* errors.c: Include either bconfig.h or config.h.
	(fancy_abort): Trim filename.
	* fix-header.c (v_fatal, fatal): Remove.
	(progname): Remove definition.
	(main): Set progname here.
	* gcc.c (fancy_abort): Add parameters.
	* gcc.h (fancy_abort): Remove declaration.
	* gcov.c (fancy_abort): Remove.
	* rtl.h (fancy_abort): Don't declare.
	(abort): Don't define.
	* tree.h (fancy_abort): Don't declare.
	(abort): Don't define.
	* system.h (fancy_abort): Declare.
	(abort): Define to fancy_abort.
	* fixinc/Makefile.in (ALLOBJ): Add ../build-errors.o
	* java/jv-scan.c (fancy_abort): Add.

From-SVN: r86424
2004-08-23 11:57:02 +00:00
Nathan Sidwell 89b0433e3a tree.h (TYPE_CACHED_VALUES_P): New.
* tree.h (TYPE_CACHED_VALUES_P): New.
	(TYPE_CACHED_VALUES): New.
	(TYPE_ORIG_SIZE_TYPE): Adjust.
	* tree.def (INTEGER_CST): Update documentation.
	* tree.c: Inlcude params.h.
	(build_int_cst): Cache small values.
	(build_type_copy): Do not copy the value cache.
	* c-common.c (c_common_nodes_and_builtins): Add comment, remove
	unneeded zeroing.
	* c-typeck.c (build_c_cast): Add comment about OVERFLOW setting.
	* expmed.c (const_mult_add_overflow_p): Clear type copy's value
	cache.
	* fold-const.c (force_fit_type): Copy value when setting
	overflows.
	(int_const_binop): Likewise.
	* stor-layout.c: Include params.h
	(set_sizetype): Create values cache.
	(fixup_unsigned_type): Set UNSIGNED_P before caching any values.
	* params.def (PARAM_INTEGER_SHARE_LIMIT): New.
	* params.h (INTEGER_SHARE_LIMIT): New.
	* Makefile.in (tree.o, stor-layout.o): Depend on PARAMS_H.

	* cp/decl.c (finish_enum): Do not copy value node early, copy
	later.
	* cp/lex.c (cxx_init): Force null_node to be unique.

	* java/parse.h (JAVA_RADIX10_FLAG): Rename to ...
	(JAVA_NOT_RADIX10_FLAG): ... here.  Invert meaning.
	* java/lex.c (do_java_lex): Adjust.
	(error_if_numeric_overflow): Likewise.

From-SVN: r86247
2004-08-19 10:36:07 +00:00
Steven Bosscher bd454efdcf basic-block.h (struct edge_def): Remove crossing_edge.
* basic-block.h (struct edge_def): Remove crossing_edge.
	(EDGE_CROSSING): New define.
	(EDGE_ALL_FLAGS): Update.
	* bb-reorder.c (find_traces_1_round, better_edge_p,
	find_rarely_executed_basic_blocks_and_cr, fix_up_fall_thru_edges,
	find_jump_block, fix_crossing_conditional_branches,
	fix_crossing_unconditional_branches, add_reg_crossing_jump_notes):
	Replace all occurences of crossing_edge with an edge flag check
	or set/reset.
	* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
	try_crossjump_bb): Likewise.
	* cfglayout.c (fixup_reorder_chain): Likewise.
	* cfgrtl.c (force_nonfallthru_and_redirect,
	commit_one_edge_insertion): Likewise.

	* Makefile.in (cfganal.o): Depend on TIMEVAR_H.
	* tree-flow.h (compute_dominance_frontiers): Move prototype...
	* basic-block.h:  ...here.
	* tree-cfg.c (compute_dominance_frontiers_1,
	compute_dominance_frontiers): Move from here...
	* cfganal.c: ...to here.  Include timevar.h.

From-SVN: r86228
2004-08-19 00:32:41 +00:00
Zack Weinberg 4b179e927c * Makefile.in (RTL_BASE_H): Update.
From-SVN: r86213
2004-08-18 22:41:53 +00:00
Steven Bosscher 0516f6fe82 Makefile.in (OBJS-common): Add postreload-gcse.c.
* Makefile.in (OBJS-common): Add postreload-gcse.c.
	Add new postreload-gcse.o.
	* cse.c (SAFE_HASH): Define as wrapper around safe_hash.
	(lookup_as_function, insert, rehash_using_reg, use_related_value,
	equiv_constant): Use SAFE_HASH instead of safe_hash.
	(exp_equiv_p): Export.  Add for_gcse argument when comparing
	for GCSE.
	(lookup, lookup_for_remove, merge_equiv_classes, find_best_addr,
	find_comparison_args, fold_rtx, cse_insn): Update callers.
	(hash_rtx): New function derived from old canon_hash and bits
	from gcse.c hash_expr_1.
	(canon_hash_string): Rename to hash_rtx_string.
	(canon_hash, safe_hash): Make static inline.  Call hash_rtx.
	* cselib.c (hash_rtx): Rename to cselib_hash_rtx.
	(cselib_lookup): Update this caller.
	* gcse.c (modify_mem_list_set, canon_modify_mem_list_set):
	Make static.
	(hash_expr): Call hash_rtx.
	(ldst_entry): Likewise.
	(expr_equiv_p): Call exp_equiv_p.
	(struct unoccr, hash_expr_1, hash_string_1, lookup_expr,
	reg_used_on_edge, reg_set_between_after_reload_p,
	reg_used_between_after_reload_p, get_avail_load_store_reg,
	is_jump_table_basic_block, bb_has_well_behaved_predecessors,
	get_bb_avail_insn, hash_scan_set_after_reload,
	compute_hash_table_after_reload,
	eliminate_partially_redundant_loads, gcse_after_reload,
	get_bb_avail_insn, gcse_after_reload_main): Remove.
	* postreload-gcse.c: New file, reincarnating most of the above.
	* rtl.h (exp_equiv_p, hash_rtx): New prototypes.
	(gcse_after_reload_main): Update prototype.
	* timevar.def (TV_GCSE_AFTER_RELOAD): New timevar.
	* passes.c (rest_of_handle_gcse2): Use it.

From-SVN: r86206
2004-08-18 20:53:59 +00:00
Caroline Tice 9fb3243411 Hot/cold partitioning update patch.
Hot/cold partitioning update patch.  The problems that this patch
attemptd to address/fix are:

- Fix places where adding in_unlikely_executed_text to the enum data
  type "in_section"  threw off switch case statements.
- Make it work correctly (by turning it off) for functions where user
  specifies "__attribute__ section"
- Make it work correctly (by turning it off) for linkonce sections
- Make it work correctly with -ffunction-sections flag
- Make it output correct cold section labels
- Undo some changes to original assembly code generation
- Turn off hot/cold partitioning in the presence of DWARF debugging (for
  the moment)
- Turn off hot/cold partitioning for architectures that do not support
  named sections
- Use variables rather than constants for cold section labels and names (to
  work correctly with -ffunction-sections, among other things)


2004-08-18  Caroline Tice  <ctice@apple.com>

        * Makefile.in (STAGEFEEDBACK_FLAGS_TO_PASS) Add
        "-freorder-blocks-and-partition" to the flags used in second
        stage of profiledbootstrap.
        * bb-reorder.c (push_to_next_round_p): Add new variable,
        next_round_is_last; set and use variable to make sure, when
        partitioning, that the last trace construction round consists
        of all (and only) cold basic blocks.
        (rotate_loop): Don't copy blocks that end in a section
        crossing jump.
        (copy_bb): Correctly initialize "partition" of duplicated bb.
        (add_unlikely_executed_notes): Add a comment.
        (find_rarely_executed_basic_blocks_and_crossing_edges): Modify
        to make sure, if function contains hot blocks, that the
        successors of ENTRY_BLOCK_PTR are hot; also, only look for
        crossing edges if the architecture supports named sections.
        (mark_bb_for_unlikely_executed_section): Modify to always
        insert the NOTE_INSN_UNLIKELY_EXECUTED_CODE immediately after
        the basic block note insn.
        (fix_crossing_unconditional_branches): Remove extra space.
        (fix_edges_for_rarely_executed_code): Modify to only do
        partitioning work if the architecture supports named sections.
        (reorder_basic_blocks): Modify to only add
        NOTE_INSN_UNLIKELY_EXECUTED_CODE notes if the architecture
        supports named sections.
        * c-common.c (handle_section_attribute): Initialize new global
        variable, user_defined_section_attribute, to true if user has
        specified one.
        * cfgcleanup.c (try_forward_edges): Modify to not attempt to
        forward edges that cross section boundaries.
        * cfglayout.c (fixup_reorder_chain): Modify to only fix up
        partitioning information if the architecture supports named
        sections.
        * cfgrtl.c (target.h): Add statement to include this.
        (rtl_split_block): Make sure newly created bb gets correct
        partition.
        (try_redirect_by_replacing_jump): Make sure redirection isn't
        attempting to cross section boundaries.
        (force_nonfallthru_and_redirect): Only do partition fix up if
        architecture supports named sections.
        (rtl_split_edge): Make sure newly created bb ends up in
        correct partition.
        (commit_one_edge_insertion): Remove code that incorrectly
        updated basic block partition; Make sure partition fix up only
        happens if architecture supports named sections and it's not
        already done.
        (rtl_verify_flow_info_1): Fix if-condition on test/error
        condition that fallthru edges are not allowed to cross section
        boundaries.
        * defaults.h (NORMAL_TEXT_SECTION_NAME): Remove this.
        * final.c (final_scan_insn): Remove redundant test from if-statement;
        change calls to text_section into calls to function_section; add code
        to only to partitioning fix up if architecture supports named
        sections.
        * ifcvt.c (find_if_case_1): Make sure newly created bb has correct
        partition.
        (if_convert): Add targetm.have_named_sections to test.
        * output.h (unlikely_section_label): Extern declaration for new global
        variable.
        (unlikely_text_section_name): Likewise.
        * opts.c (decode_options): If both partitioning and DWARF debugging
        are turned on, issue a warning that this doesn't work, and change
        partitiong to basic block reordering (without hot/cold partitions).
        * passes.c (rest_of_handle_final): Re-set new global variable,
        user_defined_section_attribute, to false.
        (rest_of_compilation): Change options for calling partitioning
        function: Don't call if the user defined the section attribute, and
        don't call if DECL_ONE_ONLY is true for the current function.
        * predict.c (choose_function_section): Return immediately if we
        are doing hot/cold partitioning (i.e. let the basic block partitioning
        determine where the function belongs).
        * reg-stack.c (emit_swap_insn): Add condition to step over
        NOTE_INSN_UNLIKELY_EXECUTED_CODE notes.
        * toplev.c (user_defined_section_attribute): New global variable.
        * toplev.h (user_defined_section_attribute): Extern declaration for new
        global variable.
        * varasm.c (unlikely_section_label): New global variable.
        (unlikely_text_section_name): New global variable.
        (unlikely_text_section): Add code to initialize unlikely_text_section_name
        if necessary; modify to use unlikely_text_section_name and
        unlikely_section_label; also to use named_section properly.
        (in_unlikely_text_section):  Modify to work correctly with named_section
        and to use unlikely_text_section_name.
        (named_section):  Add code to work properly with cold section.
        (function_section): Clean up if-statement.
        * config/darwin.c (darwin_asm_named_section): Return to original code,
        removing use of SECTION_FORMAT_STRING.
        * config/arm/pe.h (switch_to_section):  Add case for
        in_unlikely_executed_text to switch statement.
        * config/i386/cygming.h (switch_to_section): Likewise.
        * config/i386/darwin.h (NORMAL_TEXT_SECTION_NAME): Remove.
        (SECTION_FORMAT_STRING): Likewise.
        * config/mcore/mcore.h (switch_to_section): Likewise.
        * config/rs6000/darwin.h (NORMAL_TEXT_SECTION_NAME): Remove.

From-SVN: r86189
2004-08-18 09:22:08 -07:00
Dorit Naishlos 79fe1b3bd0 tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees.
* tree-vectorizer.c: New File: loop vectorization on SSAed GIMPLE trees.
        * tree-vectorizer.h: New File: Same.
        * Makefile.in (tree-vectorizer.c, tree-vectorizer.h): Add new files.
        * common.opt (ftree-vectorize): New flag to enable vectorization.
        * timevar.def (TV_TREE_VECTORIZATION): New dump file for vectorization
        pass.
        * tree-data-ref.h (init_data_ref): Additional argument.
        (array_base_name_differ_p): Moved to tree-data-ref.c.
        * tree-data-ref.c (array_base_name_differ_p): Revised.
        (initialize_data_dependence_relation): Call array_base_name_differ_p
        with an extra argument.
        (analyze_all_data_dependences): Same.
        (init_data_ref): Additional argument is_read to set DR_IS_READ.
        * tree-ssa-phiopt.c (empty_block_p): Expose for usage out of this file.
        * tree-flow.h (vectorize_loops, empty_block_p): Add declaration.
        * tree-optimize.c (pass_vectorize): Schedule the vectorization pass.
        * tree-pass.h (tree_opt_pass pass_vectorize): Declare the new
        vectorization pass.
        * tree-ssa-loop.c (tree_ssa_loop_init): Call scev_initialize.
        (tree_ssa_loop_done): Call scev_finalize.
        (tree_vectorize): Define the new vectorization pass.
        * defaults.h (UNITS_PER_SIMD_WORD): Allow targets to specify the size of
        the vector they support (until support for multiple vector sizes is
        added to the vectorizer).
        * config/i386/i386.h (UNITS_PER_SIMD_WORD): Define.
        * config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Define.
        * invoke.texi (fdump-tree-vect, ftree-vectorize): Add
        documentation.

From-SVN: r86131
2004-08-17 16:17:14 +00:00
Zack Weinberg 45c8116dff Makefile.in (BUILD_PREFIX, [...]): Delete.
* Makefile.in (BUILD_PREFIX, BUILD_PREFIX_1): Delete.
	(BUILD_RTL, BUILD_PRINT, BUILD_ERRORS, BUILD_VARRAY): Update.
	(genobjs): Add build-rtl.o, build-print-rtl.o, build-varray.o.
	(genobjs static pattern rule): Remove %.c dependency.
	($(BUILD_PREFIX_1)rtl.o, print-rtl.o, $(BUILD_PREFIX_1)varray.o):
	Rename rules; delete commands; fix dependencies.
	(mostlyclean): Do not delete temporary source copies.
	* configure.ac: Delete all references to BUILD_PREFIX and
	BUILD_PREFIX_1.
	* configure: Regenerate.

	* print-rtl.c: Include bconfig.h #ifdef GENERATOR_FILE.
	Do not include tree.h, real.h, flags.h, hard-reg-set.h, or
	basic-block.h #ifdef GENERATOR_FILE.  Surround some more code
	with #ifndef GENERATOR_FILE so that nothing from those headers
	is used.

	* rtl.c, varray.c: Include bconfig.h #ifdef GENERATOR_FILE.

From-SVN: r86083
2004-08-16 23:05:04 +00:00
Adam Nemet 4d73e20b4e * Makefile.in (LIBS): Move $(LIBIBERTY) after $(BANSHEELIB).
From-SVN: r86082
2004-08-16 22:13:27 +00:00
Ziemowit Laski 9a4d6480b8 Makefile.in (C_PRETTY_PRINT_H): Add c-pretty-print.h.
[gcc/ChangeLog]
2004-08-15  Ziemowit Laski  <zlaski@apple.com>

       * Makefile.in (C_PRETTY_PRINT_H): Add c-pretty-print.h.
       (c-lang.o): Depend on c-objc-common.h.
       (c-objc-common.o): Depend on $(C_PRETTY_PRINT_H) and
       c-objc-common.h; remove duplicate $(C_TREE_H) dependency.
       * c-lang.c: Include c-objc-common.h.
       (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
       LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
       LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
       LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
       LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
       LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
       LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
       LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
       LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
       LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
       LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
       LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
       LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
       LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
       LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
       LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
       LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
       LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
       LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
       LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
       LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
       LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
       LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
       LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
       Move to c-objc-common.h.
       * c-objc-common.c: Include c-objc-common.h.
       * c-objc-common.h: New file.

[gcc/objc/ChangeLog]
2004-08-15  Ziemowit Laski  <zlaski@apple.com>

       * Make-lang.in (objc/objc-lang.o): Depend on $(C_PRETTY_PRINT_H),
       $(DIAGNOSTIC_H), c-objc-common.h and gtype-objc.h, but not on toplev.h.
       (objc/objc-parse.o): Do not depend on gtype-objc.h.
       * objc-act.c: Do not include gtype-objc.h.
       (finish_file): Rename to objc_finish_file().
       * objc-act.h (finish_file): Update copyright notice; remove prototype.
       * objc-lang.c: Update copyright notice; include diagnostic.h,
       c-objc-common.h, c-pretty-print.h and gtype-objc.h; do not include
       toplev.h.
       (finish_file): New hook routine.
       (LANG_HOOKS_FINISH, LANG_HOOKS_INIT_OPTIONS,
       LANG_HOOKS_INITIALIZE_DIAGNOSTICS, LANG_HOOKS_HANDLE_OPTION,
       LANG_HOOKS_MISSING_ARGUMENT, LANG_HOOKS_POST_OPTIONS,
       LANG_HOOKS_GET_ALIAS_SET, LANG_HOOKS_SAFE_FROM_P,
       LANG_HOOKS_EXPAND_EXPR, LANG_HOOKS_MARK_ADDRESSABLE,
       LANG_HOOKS_PARSE_FILE, LANG_HOOKS_TRUTHVALUE_CONVERSION,
       LANG_HOOKS_FINISH_INCOMPLETE_DECL, LANG_HOOKS_UNSAFE_FOR_REEVAL,
       LANG_HOOKS_STATICP, LANG_HOOKS_SET_DECL_ASSEMBLER_NAME,
       LANG_HOOKS_NO_BODY_BLOCKS, LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL,
       LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_FUNCTION_ENTER_NESTED,
       LANG_HOOKS_FUNCTION_LEAVE_NESTED, LANG_HOOKS_DUP_LANG_SPECIFIC_DECL,
       LANG_HOOKS_DECL_UNINIT, LANG_HOOKS_RTL_EXPAND_STMT,
       LANG_HOOKS_COMMON_ATTRIBUTE_TABLE, LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE,
       LANG_HOOKS_TREE_INLINING_CANNOT_INLINE_TREE_FN,
       LANG_HOOKS_TREE_INLINING_DISREGARD_INLINE_LIMITS,
       LANG_HOOKS_TREE_INLINING_ANON_AGGR_TYPE_P,
       LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING,
       LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS,
       LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN,
       LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, LANG_HOOKS_TYPE_FOR_MODE,
       LANG_HOOKS_TYPE_FOR_SIZE, LANG_HOOKS_SIGNED_TYPE,
       LANG_HOOKS_UNSIGNED_TYPE, LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE,
       LANG_HOOKS_INCOMPLETE_TYPE_ERROR, LANG_HOOKS_TYPE_PROMOTES_TO,
       LANG_HOOKS_REGISTER_BUILTIN_TYPE, LANG_HOOKS_WRITE_GLOBALS):
       Move to c-objc-common.h.

From-SVN: r86037
2004-08-15 21:47:32 +00:00
Richard Henderson 201312c254 Makefile.in (insn-preds.o): Depend on TREE_H.
* Makefile.in (insn-preds.o): Depend on TREE_H.
        * genpreds.c (write_insn_preds_c): Include tree.h.
        * config/alpha/alpha.c (reg_or_0_operand, reg_or_6bit_operand,
        reg_or_8bit_operand, cint8_operand, add_operand, sext_add_operand,
        const48_operand, and_operand, or_operand, mode_width_operand,
        mode_mask_operand, mul8_operand, const0_operand,
        hard_fp_register_operand, hard_int_register_operand,
        reg_or_cint_operand, some_operand, some_ni_operand, input_operand,
        samegp_function_operand, direct_call_operand, small_symbolic_operand,
        global_symbolic_operand, call_operand, symbolic_operand,
        dtp16_symbolic_operand, dtp32_symbolic_operand,
        gotdtp_symbolic_operand, tp16_symbolic_operand, tp32_symbolic_operand,
        gottp_symbolic_operand, alpha_comparison_operator,
        alpha_zero_comparison_operator, alpha_swapped_comparison_operator,
        signed_comparison_operator, alpha_fp_comparison_operator,
        divmod_operator, fix_operator, aligned_memory_operand,
        unaligned_memory_operand, reg_or_unaligned_mem_operand,
        any_memory_operand, reg_not_elim_operand, normal_memory_operand,
        reg_no_subreg_operand, addition_operation): Move to predicates.md.
        (reg_or_const_int_operand): Remove.  Replace all users with
        reg_or_cint_operand.
        (tls_symbolic_operand_1): Export.  Don't check mode or for CONST.
        (resolve_reload_operand): Split out of aligned_memory_operand.
        * config/alpha/alpha-protos.h: Update for exports.
        * config/alpha/alpha.h (PREDICATE_CODES): Remove.
        * config/alpha/alpha.md: Include predicates.md.
        * config/alpha/predicates.md: New file.

From-SVN: r85953
2004-08-13 12:11:35 -07:00
Daniel Berlin 9bcc9490cb Makefile.in (BOOT_CFLAGS): Remove accidental addition of -dU.
2004-08-13  Daniel Berlin  <dberlin@dberlin.org>

	* Makefile.in (BOOT_CFLAGS): Remove accidental addition of -dU.

From-SVN: r85943
2004-08-13 15:29:58 +00:00
Zack Weinberg e543e219eb genpreds.c: Add capability to generate predicate bodies as well as function prototypes.
* genpreds.c: Add capability to generate predicate bodies as
	well as function prototypes.  Write function prototypes for
	the generic predicates too.
	(process_define_predicate, write_tm_preds_h, write_insn_preds_c)
	(write_predicate_subfunction, mark_mode_tests, add_mode_tests)
	(write_match_code, write_predicate_expr, write_one_predicate_function)
	(parse_option): New functions.
	(output_predicate_decls): Delete.
	(main): Read the machine description, process DEFINE_PREDICATE or
	DEFINE_SPECIAL_PREDICATE patterns, write tm-preds.h or insn-preds.c
	as appropriate.

	* genrecog.c (struct decision_test): Replace index with
	struct pred_data pointer.
	(next_index): Remove, unused.
	(pred_table, preds, special_mode_pred_table): Delete.
	(compute_predicate_codes, process_define_predicate): New functions.
	(validate_pattern, add_to_sequence, write_switch): Update for
	new data structures.
	(main): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE.
	Check both error_count and have_error.

	* gensupport.c (in_fname, first_predicate): New globals.
	(define_pred_queue, define_pred_tail): New RTL-pattern queue.
	(predicate_table, last_predicate, old_pred_table)
	(old_special_pred_table): New statics.
	(hash_struct_pred_data, eq_struct_pred_data, lookup_predicate)
	(add_predicate, init_predicate_table): New functions.
	(process_rtx): Handle DEFINE_PREDICATE and DEFINE_SPECIAL_PREDICATE.
	(init_md_reader_args_cb): Use the global in_fname.  No need to zero
	it or max_include_len.  Call init_predicate_table.
	(read_rtx): Run the predicate queue after the attribute queue
	but before all the others.
	* gensupport.h (in_fname, struct pred_data, first_predicate)
	(lookup_predicate, add_predicate, FOR_ALL_PREDICATES): Declare.
	* rtl.def (MATCH_CODE, MATCH_TEST, DEFINE_PREDICATE)
	(DEFINE_SPECIAL_PREDICATE): New RTL codes.
	* dummy-conditions.c: Don't include bconfig.h, system.h,
	coretypes.h, tm.h, or system.h.  Do include stddef.h.
	Duplicate declaration of struct c_test from gensupport.h.

	* Makefile.in (OBJS-common): Add insn-preds.o.
	(STAGESTUFF, .PRECIOUS): Add insn-preds.c.
	(insn-preds.c, insn-preds.o): New rules.
	(s-preds): Also generate insn-preds.c.
	(dummy-conditions.o, genpreds$(build_exeext), genpreds.o):
	Update dependencies.
	(print-rtl.o, print-rtl1.o): Correct dependencies.

	* recog.h: Delete prototypes of predicate functions.

	* doc/md.texi (Predicates): New section with complete
	documentation of operand/operator predicates.  Remove some
	incomplete documentation of predicates from other places.
	* doc/tm.texi (Misc): Move SPECIAL_MODE_PREDICATES next to
	PREDICATE_CODES; indicate that both are deprecated in favor
	of define_predicate/define_special_predicate.

	* config/ia64/ia64.c: All predicate function definitions moved
	to ia64.md, except
	(small_addr_symbolic_operand, tls_symbolic_operand): Delete.
	(ia64_expand_load_address, ia64_expand_move):
	Check SYMBOL_REF_TLS_MODEL directly, don't use tls_symbolic_operand.

	* config/ia64/ia64.md: All predicates now defined here.
	(symbolic_operand): Is now a special predicate.

	* config/ia64/ia64.h: Declare ia64_section_threshold.
	(PREDICATE_CODES): Delete.

From-SVN: r85855
2004-08-12 07:49:00 +00:00
Daniel Berlin 9897565322 lambda.h: Add matrix type, and prototypes for remainder of matrix and vector functions.
2004-08-10  Daniel Berlin <dberlin@dberlin.org>

	* lambda.h: Add matrix type, and prototypes for remainder of
	matrix and vector functions.
	(lambda_vector_mult_const): New function.
	(lambda_vector_negate): Ditto.
	(lambda_vector_add): Ditto.
	(lambda_vector_add_mc): Ditto.
	(lambda_vector_copy): Ditto.
	(lambda_vector_zerop): Ditto.
	(lambda_vector_equal): Ditto.
	(lambda_vector_min_nz): Ditto.
	(lambda_vector_first_nz): Ditto.
	(lambda_vector_matrix_mult): Ditto.
	* lambda-mat.c: New file.
	* Makefile.in (lambda-mat.o): New.

From-SVN: r85767
2004-08-10 20:43:05 +00:00
Jeff Law 56b043c808 Makefile.in (OBJC-common): Add tree-ssa-threadupdate.c
* Makefile.in (OBJC-common): Add tree-ssa-threadupdate.c
        (tree-ssa-threadupdate.o): Add dependencies.
        * tree-ssa-threadupdate.c: New file.
        * tree-flow.h (incoming_edge_threaded): New flag in block annotation.
        (rewrite_vars_out_of_ssa): Remove prototype.
        (cleanup_tree_cfg): Returns a bool.
        * tree.h (thread_through_all_blocks): Prototype.
        * tree-outof-ssa.c  (SSANORM_*): Move into here.
        (remove_ssa_form): Now static.
        (rewrite_vars_out_of_ssa): Kill.
        * tree-ssa-live.c (register_ssa_partitions_for_vars): Kill.
        * tree-ssa-live.h (SSANORM_*): Moved into tree-outof-ssa.c.
        (remove_ssa_form, register_partitions_for_vars): Kill declarations.
        * tree-cfg.c (cleanup_tree_cfg): Return a value indicating if
        anything was changed.
        * tree-phinodes.c (add_phi_arg): Get the block for the PHI
        from the PHI's annotation rather than the edge associated with
        the new argument.
        * tree-ssa-dom.c (redirection_edges): Kill.
        (redirect_edges_and_update_ssa_graph): Kill.
        (tree_ssa_dominator_optimize): Do not reset forwardable flag
        for blocks anymore.  Do not initialize redirection_edges.
        Call thread_through_all_blocks.  Simplify code for cleanup
        of the CFG and iterating.  No longer call cleanup_tree_cfg
        outside the iteration loop.
        (thread_across_edge): No longer mess with forwardable blocks.

From-SVN: r85721
2004-08-09 13:13:07 -06:00
Steven Bosscher 27fb79ad58 timevar.def (TV_CPROP1, [...]): New timers.
* timevar.def (TV_CPROP1, TV_CPROP2, TV_PRE, TV_HOIST, TV_LSM):
	New timers.
	* gcse.c: Include timevar.h.
	(const_prop_count, copy_prop_count): Rename to global_const_prop_count
	and global_copy_prop_count.
	(local_const_prop_count, local_copy_prop_count): New static globals.
	(gcse_main): Set the right timevar for each pass.
	(cprop_jump): Increment global_const_prop_count when a constant is
	propagated.  Add "GLOBAL" to dump output.
	(cprop_insn): Increment global_const_prop_count when a constant is
	propagated, or global_copy_prop_count when a copy is propagated.
	(do_local_cprop): Likewise for local_const_prop_count and
	local_copy_prop_count.
	(one_cprop_pass): Initialize const/cprop counters to zero.
	Print out results of local and global const/cprop separately.
	(bypass_block): Break over-length line.

From-SVN: r85718
2004-08-09 16:58:42 +00:00
Paolo Bonzini 7efcb746da Makefile.in (GTFILES): Remove stmt.c
2004-08-09  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in (GTFILES): Remove stmt.c
	(stmt.o): Do not depend on gt-stmt.h.
	* emit-rtl.c (emit_line_note): Do not call
	set_file_and_line_for_stmt.
	* expr.c (expand_expr_real_1) <SWITCH_EXPR>: Let expand_case
	do everything.
	* function.c (free_after_parsing): Do not free STMT field.
	(allocate_struct_function): Do not call init_stmt_for_function.
	(assign_stack_temp_for_type): Do not accept values of keep
	other than 0 or 1.
	(init_temp_slots): Do not initialize removed variables.
	* function.h (struct function): Remove STMT, X_TARGET_TEMP_SLOT_LEVEL
	and X_VAR_TEMP_SLOT_LEVEL fields.
	* rtl.h (set_file_and_line_for_stmt): Remove.
	* stmt.c (struct nesting, ALLOC_NESTING, POPSTACK,
	struct stmt_status, cond_stack, case_stack, nesting_stack,
	nesting_depth, emit_locus, set_file_and_line_for_stmt,
	same_case_target_p, init_stmt_for_function, emit_nop,
	expand_start_cond, expand_start_elseif, expand_start_else,
	expand_elseif, expand_end_cond): Remove.
	(preserve_subexpressions_p): Remove references to CFUN->STMT.
	(expand_start_case, expand_end_case_type): Remove, merge into...
	(expand_case): ... this one, including other bits from
	expand_expr_real_1.  Inline same_case_target_p.  Turn members
	of CASE_STACK into local variables.
	(emit_case_bit_tests): Inline same_case_target_p.
	(add_case_node): Add HEAD argument, return new head of the list,
	do not handle default label here.
	* tree.h (expand_start_cond, expand_end_cond, expand_start_else,
	expand_start_elseif, current_nesting_level, expand_start_case,
	expand_end_case_type, expand_end_case, add_case_node,
	init_stmt_for_function, expand_elseif): Remove prototypes.
	(expand_case): Add prototype.

From-SVN: r85712
2004-08-09 07:14:17 +00:00
Zdenek Dvorak c913f08ae7 tree-ssa-loop-manip.c: New file.
* tree-ssa-loop-manip.c: New file.
	* Makefile.in (tree-ssa-loop-manip.o): Add.
	* tree-flow.h (rewrite_into_loop_closed_ssa, verify_loop_closed_ssa):
	Declare.
	* tree-ssa-loop.c (tree_loop_optimizer_init): Create loop closed ssa
	form.
	(tree_ssa_loop_done): Verify loop closed ssa form.
	* tree-ssa-loop-im.c (move_computations): Update loop closed ssa form.

From-SVN: r85613
2004-08-05 21:33:21 +00:00
Zack Weinberg 7e7ec48e73 Makefile.in (RTL_BASE_H, RTL_H): Correct.
* Makefile.in (RTL_BASE_H, RTL_H): Correct.
	(BUILD_RTL): Remove $(BUILD_PREFIX) from ggc-none.o.
	(genobjs): Add errors.o, ggc-none.o, and min-insn-modes.o.
	(read-rtl.o, gensupport.o, genconfig.o, genflags.o, gencodes.o)
	(genconstants.o, genemit.o, genopinit.o, genrecog.o, genextract.o)
	(genpeep.o, genattr.o, genattrtab.o, genautomata.o, genoutput.o)
	(genconditions.o): Depend on $(RTL_BASE_H) not $(RTL_H).
	(ggc-none.o, errors.o): Move rule to generators section;
	correct dependencies.
	(min-insn-modes.o): Move rule to generators section; remove
	unnecessary explicit command; correct dependencies.
	(print-rtl.o, print-rtl1.o): Correct dependencies.
	($(BUILD_PREFIX_1)errors.o. $(BUILD_PREFIX_1)ggc-none.o): Delete rule.
	(mostlyclean): Update.

	* errors.c: Include bconfig.h not config.h.  Correct comment.
	* gengtype.c, genpreds.c: Don't define NO_GENRTL_H.
	* ggc-none.c: Include bconfig.h; not config.h or tm.h.
	* print-rtl.c: Don't include tm_p.h.

	* rtl.h: Move forward-decl of struct function down where it's
	needed.  Include genrtl.h #ifndef GENERATOR_FILE, not
	#ifndef NO_GENRTL_H.  Remove unnecessary #ifdef BUFSIZ statements.

From-SVN: r85574
2004-08-04 20:55:08 +00:00
Bernardo Innocenti f408614568 Makefile.in (C_PRAGMA_H): New variable to track dependencies of c-pragma.h.
* Makefile.in (C_PRAGMA_H): New variable to track dependencies
	of c-pragma.h.
	* c-pragma.h (c_lex, c_lex_with_flags): Change returntype to
	enum cpp_ttype.
	* c-lex.c: Likewise.

From-SVN: r85174
2004-07-26 02:29:41 +02:00
Jakub Jelinek 5aa33bdb4f Makefile.in (site.exp): Add HOSTCC and HOSTCFLAGS to site.exp.
* Makefile.in (site.exp): Add HOSTCC and HOSTCFLAGS to site.exp.
testsuite/
	* README.compat: Add RUN_ALL_COMPAT_TESTS documentation.
	* lib/compat.exp: Replace ^$tmpdir/? in testcase names with tmpdir-.
	* gcc.dg/compat/struct-layout-1.exp: New testsuite driver.
	* gcc.dg/compat/struct-layout-1_generate.c: New testcase generator.
	* gcc.dg/compat/generate-random.c: New file.
	* gcc.dg/compat/generate-random.h: Likewise.
	* gcc.dg/compat/generate-random_r.c: Likewise.
	* gcc.dg/compat/struct-layout-1.h: Likewise.
	* gcc.dg/compat/struct-layout-1_x1.h: Likewise.
	* gcc.dg/compat/struct-layout-1_x2.h: Likewise.
	* gcc.dg/compat/struct-layout-1_y1.h: Likewise.
	* gcc.dg/compat/struct-layout-1_y2.h: Likewise.
	* gcc.dg/compat/struct-layout-1_main.c: New test.
	* gcc.dg/compat/struct-layout-1_x.c: New file.
	* gcc.dg/compat/struct-layout-1_y.c: New file.
	* gcc.dg/compat/struct-layout-1_test.h: New file.

From-SVN: r85098
2004-07-24 00:36:47 +02:00
Zack Weinberg 30678c3e48 print-rtl.c (print_rtx <case 'b'>): Don't attempt to print bitmap contents if GENERATOR_FILE is defined.
* print-rtl.c (print_rtx <case 'b'>): Don't attempt to print
	bitmap contents if GENERATOR_FILE is defined.
	* Makefile.in (BUILD_RTL): Remove $(BUILD_PREFIX)bitmap.o.
	($(BUILD_PREFIX_1)bitmap.o): Delete rule.

From-SVN: r85095
2004-07-23 21:15:45 +00:00
Joseph Myers d592f1c398 implement-c.texi: New file.
* doc/implement-c.texi: New file.
	* doc/extend.texi (C Implementation): Move to there.
	* doc/gcc.texi: Include implement-c.texi.
	* Makefile.in (TEXI_GCC_FILES): Add implement-c.texi.

From-SVN: r85058
2004-07-22 21:12:20 +01:00
Paolo Bonzini 26277d4179 tree-cfg.c (gimplify_val): Move from tree-complex.c.
2004-07-22  Paolo Bonzini  <bonzini@gnu.org>

	* tree-cfg.c (gimplify_val): Move from tree-complex.c.
	(gimplify_build1): Move from tree-complex.c do_unop.
	(gimplify_build2): Move from tree-complex.c do_binop.
	(gimplify_build3): New.
	* tree-complex.c (gimplify_val, do_unop, do_binop): Remove.
	Adjust throughout to call the functions above.
	* tree-flow.h: Declare the functions above.
	* tree-nested.c (gimplify_val): Rename to...
	(tsi_gimplify_val): ... this.

	* Makefile.in (tree_complex.o): Update dependencies.
	(stor-layout.o): Depend on regs.h.
	* c-common.c (handle_vector_size_attribute): Update for
	vector types without corresponding vector modes.
	* expr.c (expand_expr): Treat VECTOR_CST's like CONSTRUCTORS if
	a corresponding vector mode is not available.
	* print-tree.c (print_node): Print nunits for vector types
	* regclass.c (have_regs_of_mode): New.
	(init_reg_sets_1): Initialize it and use it instead
	of allocatable_regs_of_mode.
	* regs.h (have_regs_of_mode): Declare it.
	* stor-layout.c (layout_type): Pick a mode for vector types.
	* tree-complex.c (build_word_mode_vector_type, tree_vec_extract,
	build_replicated_const, do_unop, do_binop, do_plus_minus,
	do_negate, expand_vector_piecewise, expand_vector_parallel,
	expand_vector_addition, expand_vector_operations_1,
	expand_vector_operations, tree_lower_operations,
	pass_lower_vector_ssa, pass_pre_expand): New.
	(expand_complex_operations, pass_lower_complex): Remove.
	* tree-optimize.c (init_tree_optimization_passes): Adjust
	pass ordering for changes in tree-complex.c.
	* tree-pass.h: Declare new passes.
	* tree.c (finish_vector_type): Remove.
	(make_vector_type): New.
	(build_vector_type_for_mode, build_vector_type): Rewritten.
	* tree.def (VECTOR_TYPE): Document where the number of
	subparts is stored.
	* tree.h (TYPE_VECTOR_SUBPARTS): Use TYPE_PRECISION field.
	(make_vector): Remove declaration.

From-SVN: r85039
2004-07-22 08:20:40 +00:00