Commit Graph

18 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
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
Andrew MacLeod 4c124b4c6f tree-ssa-operands.h (struct ssa_operand_iterator_d): New.
2004-08-25  Andrew MacLeod  <amacleod@redhat.com>

	* tree-ssa-operands.h (struct ssa_operand_iterator_d): New.  SSA operand
	iterator controlling structure.
	(SSA_OP_USE, SSA_OP_DEF, SSA_OP_VUSE, SSA_OP_VMAYUSE, SSA_OP_VMAYDEF,
	SSA_OP_VMUSTDEF, SSA_OP_VIRTUAL_USES, SSA_OP_VIRTUAL_DEFS,
	SSA_OP_ALL_USES, SSA_OP_ALL_DEFS, SSA_OP_ALL_OPERANDS): New.  Operand
	iterator flags.
	(FOR_EACH_SSA_TREE_OPERAND): New.  Iterate over operands as trees.
	(FOR_EACH_SSA_USE_OPERAND): New.  Iterate over operands as uses.
	(FOR_EACH_SSA_DEF_OPERAND): New.  Iterate over operands as defs.
	(FOR_EACH_SSA_MAYDEF_OPERAND): New.  Iterate over V_MAY_DEFs.
	* tree-ssa-operands.c (NULL_DEF_OPERAND_P, NULL_USE_OPERAND_P): New.
	Empty operand pointers.
	* tree-flow-inline.h (op_iter_done): New.  Return true if finished.
	(op_iter_next_use): New.  Return next use_operand_p.
	(op_iter_next_def): New.  Return next def_operand_p.
	(op_iter_next_tree): New.  Return next operands as a tree.
	(op_iter_init): New.  Initialize an iterator structure.
	(op_iter_init_use): New.  Initialize structure and get the first use.
	(op_iter_init_def): New.  Initialize structure and get the first def.
	(op_iter_init_tree): New.  Initialize structure and get the first tree.
	(op_iter_next_maydef): New.  Return next V_MAY_DEF operands.
	(op_iter_init_maydef): New.  Initialize structure and get the first
	V_MAY_DEF operands.
	* tree-cfg.c (tree_duplicate_bb): Use new operand iterator.
	* tree-dfa.c (compute_immediate_uses_for_stmt,
	redirect_immediate_uses): Use new operand iterator.
	(v_may_defs_disappeared_p, v_must_defs_disappeared_p): Delete.
	(mark_new_vars_to_rename): Use new operand iterator.  Count virtual
	operands instead of using *_disappeared_p routines.
	* tree-into-ssa.c (mark_def_sites, ssa_mark_def_sites, rewrite_stmt,
	ssa_rewrite_stmt): Use new operand iterator.
	* tree-outof-ssa.c (check_replaceable, find_replaceable_in_bb,
	rewrite_trees): Use new operand iterator.
	* tree-pretty-print.c (dump_vops): Use new operand iterator.
	* tree-sra.c (mark_all_v_defs): Use new operand iterator.
	* tree-ssa-alias.c (compute_points_to_and_addr_escape,
	dump_points_to_info): Use new operand iterator.
	* tree-ssa-ccp.c (cp_lattice_meet, visit_stmt, initialize,
	replace_uses_in, replace_vuse_in, likely_value, set_rhs): Use new
	operand iterator.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary,
	propagate_necessity): Use new operand iterator.
	* tree-ssa-dom.c (cprop_into_stmt, optimize_stmt): Use operand iterator.
	(register_definitions_for_stmt): Use new operand iterator.  Take stmt as
	a parameter instead of a stmt_ann_t.
	* tree-ssa-live.c (create_ssa_var_map, calculate_live_on_entry,
	build_tree_conflict_graph): Use new operand iterator.
	* tree-ssa-loop-im.c (determine_max_movement, single_reachable_address,
	rewrite_mem_refs): Use new operand iterator.
	* tree-ssa-loop-manip.c (find_uses_to_rename_stmt,
	check_loop_closed_ssa_use): Use new operand iterator.
	* tree-ssa.c (verify_ssa, replace_immediate_uses): Use operand iterator.
	* tree-ssanames.c (release_defs): Use new operand iterator.
	* tree-vectorizer.c (vect_create_data_ref): Use new operand iterator.

From-SVN: r86583
2004-08-25 21:21:19 +00:00
Richard Henderson 17ad5b5ec2 tree.h (struct tree_decl): Add gimple_formal_temp.
* tree.h (struct tree_decl): Add gimple_formal_temp.
        (DECL_GIMPLE_FORMAL_TEMP_P): New.
        * gimplify.c (pop_gimplify_context): Clear it.
        (lookup_tmp_var): Set it, if is_formal.
        (gimplify_init_constructor): Use rhs_predicate_for for COMPLEX.
        Use is_gimple_val for VECTOR.  Simplify return value.
        (gimplify_save_expr): Use and set DECL_GIMPLE_FORMAL_TEMP_P.
        (gimplify_expr): Likewise.
        * tree-gimple.c (is_gimple_formal_tmp_rhs): Rename from
        is_gimple_tmp_rhs for clarity.  Update all callers.
        (is_gimple_reg_rhs): Simplify logic.
        (is_gimple_formal_tmp_var): Rename from is_gimple_tmp_var for
        clarity; use DECL_GIMPLE_FORMAL_TEMP_P.
        (is_gimple_formal_tmp_reg): Similarly.
        * tree-gimple.h: Update decls.
        * tree-ssa-copyrename.c (copy_rename_partition_coalesce): Use
        DECL_IGNORED_P, not DECL_ARTIFICIAL.  Tidy formatting.
        * tree-ssa-live.c (var_union, type_var_init): Likewise.
java/
        * java-gimplify.c (java_gimplify_expr): Move '2' handling into
        default case.  Treat '<' similarly.  Update for
        is_gimple_formal_tmp_var name change.
testsuite/
        * gcc.dg/20040206-1.c: XFAIL.

From-SVN: r86176
2004-08-18 00:46:33 -07:00
Nathanael Nerode dffc9ae5a9 tree-ssa-copyrename.c (copy_rename_partition_coalesce): Check for arificial variables, not is_gimple_tmp_var.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce):
	Check for arificial variables, not is_gimple_tmp_var.
	* tree-ssa-live.c (var_union): Likewise.

From-SVN: r86057
2004-08-16 15:19:31 +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
Richard Henderson 312bc27819 tree-ssa-live.c (create_ssa_var_map): Avoid defined-but-not-used variables due to conditional compilation.
* tree-ssa-live.c (create_ssa_var_map): Avoid defined-but-not-used
        variables due to conditional compilation.

From-SVN: r85053
2004-07-22 11:04:42 -07:00
Richard Henderson 727a31fab8 gimple-low.c (expand_var_p): Don't look at TREE_ADDRESSABLE...
* gimple-low.c (expand_var_p): Don't look at TREE_ADDRESSABLE,
        TREE_THIS_VOLATILE, may_aliases, or optimization level.
        (remove_useless_vars): Dump debugging info.
        (expand_used_vars): Move ...
        * cfgexpand.c (expand_used_vars): ... here.  Make static.
        * tree-flow-inline.h (set_is_used): New.
        (set_default_def): Use get_var_ann.
        * tree-flow.h: Update decls.
        * tree-ssa-live.c (mark_all_vars_used_1, mark_all_vars_used): New.
        (create_ssa_var_map): Use it.
        * tree-ssa.c (set_is_used): Remove.

From-SVN: r85034
2004-07-21 19:48:27 -07:00
Andrew MacLeod d00ad49ba1 tree-cfg.c (tree_make_forwarder_block): Use SET_PHI_RESULT.
2004-06-16  Andrew MacLeod  <amacleod@redhat.com>

	* tree-cfg.c (tree_make_forwarder_block):  Use SET_PHI_RESULT.
	* tree-flow-inline.h (get_use_op_ptr):  Return a use_operand_p.
	(get_use_from_ptr, get_def_from_ptr):  New.  Return operand pointers.
	(get_def_op_ptr):  Return a def_operand_p instead of a 'tree *'.
	(get_v_may_def_result_ptr):  Return a def_operand_p.
	(get_v_may_def_op_ptr, get_vuse_op_ptr):   Return a use_operand_p.
	(get_v_must_def_op_ptr):  Return a def_operand_p.
	(get_phi_result_ptr):  New.  Return a pointer to the result of a PHI.
	(get_phi_arg_def_ptr):  New.  Return a pointer to an argument of a PHI.
	(phi_element_for_edge):  Remove.
	* tree-flow.h (propagate_value, replace_exp):  Change prototype.
	(propagate_tree_value):  Add new prototype.
	(phi_element_for_edge):  Remove prototype.
	* tree-into-ssa.c (mark_def_sites):  Use new operand types.
	(prepare_operand_for_rename):  Split into two functions.
	(prepare_use_operand_for_rename):  Prepare use operands.
	(prepare_def_operand_for_rename):  Prepare def operands.
	(rewrite_stmt):  Use new operand types.
	(rewrite_operand):  Use new operand types, change parameter type.
	* tree-outof-ssa.c (replace_variable):  Split into two functions.
	(replace_use_variable):  Rewrite uses.
	(replace_def_variable):  Rewrite defs.
	(rewrite_trees, rewrite_vars_out_of_ssa):  Use new operand types.
	* tree-phinodes.c (make_phi_node, resize_phi_node):  Use new types.
	(add_phi_arg, remove_phi_arg_num):  Use new operand types.
	* tree-ssa-ccp.c (substitute_and_fold):  Use new operand types.
	(ccp_fold, replace_uses_in):  Use new operand types.
	* tree-ssa-copy.c (replace_ssa_names):  Rename to replace_ssa_names_ann
	and no longer set the value, change parameter type.
	(replace_exp_1):  Use new operand types.
	(propagate_value):  Change parameter type, use new operand types.
	(propagate_tree_value):  Propagate_value without SSA operands.
	(replace_exp, cprop_operand, cprop_into_stmt):  Use new operand types.
	(cprop_into_successor_phis):  Use new operand types.
	* tree-ssa-dom.c (thread_across_edge):  Use new operand types.
	(eliminate_redundant_computations):  Use new operand types.
	* tree-ssa-dse.c (fix_phi_uses):  Use new operand_types.
	(fix_stmt_v_may_defs):  Use new operand_types.
	* tree-ssa-live.c (create_ssa_var_map):  Use new operand_types.
	(build_tree_conflict_graph):  Use new operand_types.
	* tree-ssa-loop.c (duplicate_blocks):  Use PHI_ARG_DEF_FROM_EDGE.
	* tree-ssa-operands.c (struct freelist_d):  Remove.
	(check_optype_freelist, add_optype_freelist):  Remove.
	(allocate_def_optype, allocate_use_optype, allocate_v_may_def_optype,
	allocate_vuse_optype, allocate_v_must_def_optype):  Call ggc_alloc.
	(free_uses, free_defs, free_vuses, free_v_may_defs, free_v_must_defs):
	Call ggc_free instead of add_optype_freelist.
	(init_ssa_operands, fini_ssa_operands):  Remove free list code.
	(finalize_ssa_defs, finalize_ssa_uses):  Set new use/def operands.
	* tree-ssa-operands.h (struct def_optype_d):  Change underlying type.
	(struct use_optype_d):  Change underlying type.
	(def_operand_p, use_operand_p):  New types for pointers to operands.
	(USE_OP, DEF_OP, V_MAY_DEF_RESULT, V_MAY_DEF_OP, VUSE_OP,
	V_MUST_DEF_OP):  Use new pointer type instead of dereferencing directly.
	(USE_FROM_PTR, DEF_FROM_PTR):  New macros to "dereference" operand
	pointer types.
	(SET_USE, SET_DEF):  New macros to set operands from their pointer.
	(SET_USE_OP, SET_DEF_OP, SET_V_MAY_DEF_RESULT, SET_V_MAY_DEF_OP,
	SET_VUSE_OP, SET_V_MUST_DEF_OP): New SET routines for operands.
	(PHI_RESULT_PTR, PHI_RESULT, SET_PHI_RESULT):  Macros to manage the
	PHI result as an operand.
	(PHI_ARG_DEF_PTR, PHI_ARG_DEF, SET_PHI_ARG_DEF, PHI_ARG_DEF_FROM_EDGE,
	PHI_ARG_DEF_PTR_FROM_EDGE):  Macros to manage the PHI arguments.
	* tree-ssa-pre.c (eliminate):  Call propagate_tree_value.
	* tree-tailcall.c (independent_of_stmt_p, propagate_through_phis):  Use
	PHI_ARG_DEF_FROM_EDGE.
	* tree.h (PHI_RESULT):  Renamed to PHI_RESULT_TREE.
	(PHI_ARG_DEF):  Renamed to PHI_ARG_DEF_TREE.

From-SVN: r83298
2004-06-17 18:13:20 +00:00
Steven Bosscher 1719288464 tree.h (PHI_CHAIN): New.
* tree.h (PHI_CHAIN): New.
	* (tree-cfg.c, tree-dfa.c, tree-flow-inline.h, tree-into-ssa.c,
	tree-outof-ssa.c, tree-phinodes.c, tree-pretty-print.c,
	tree-ssa-alias.c, tree-ssa-ccp.c, tree-ssa-dom.c, tree-ssa-dse.c,
	tree-ssa-live.c, tree-ssa-loop.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
	tree-ssa.c, tree-tailcall.c): Use PHI_CHAIN instead of TREE_CHAIN
	when traversing a list of PHI_NODEs.

From-SVN: r83273
2004-06-16 23:03:34 +00:00
Diego Novillo 95a3742c48 Makefile.in (tree-ssanames.o): Depend on TREE_FLOW_H.
* Makefile.in (tree-ssanames.o): Depend on TREE_FLOW_H.
	* tree-flow.h (ssa_names, num_ssa_names, ssa_name): Declare.
	(highest_ssa_version): Remove.
	* tree-outof-ssa.c (new_temp_expr_table): Replace
	highest_ssa_version with num_ssa_names.
	(dump_replaceable_exprs): Likewise.
	(rewrite_vars_out_of_ssa): Likewise.
	* tree-ssa-ccp.c (initialize): Likewise
	* tree-ssa-copyrename.c (rename_ssa_copies): Likewise.
	* tree-ssa-dce.c (tree_dce_init): Likewise.
	* tree-ssa-dom.c (tree_ssa_dominator_optimize): Likewise.
	* tree-ssa-live.c (create_ssa_var_map): Likewise.
	(dump_var_map): Likewise.
	* tree-ssa.c (verify_ssa): Likewise.
	(kill_redundant_phi_nodes): Likewise.
	Do not build a local array of SSA_NAMEs.  Use the ssa_names table.
	* tree-ssanames.c: Include tree-flow.h
	(ssa_names): New varray.
	(init_ssa_names): Initialize ssa_names.
	Reserve the first slot of the ssa_names table.
	(make_ssa_name): Push the newly created SSA_NAME into ssa_names.
	Assign version numbers using num_ssa_names.

From-SVN: r82950
2004-06-10 18:37:05 -04:00
Brian Booth a32b97a20d tree-ssa.texi: Remove references to VDEF and add descriptions of V_MAY_DEF and V_MUST_DEF.
* doc/tree-ssa.texi: Remove references to VDEF and add descriptions
	of V_MAY_DEF and V_MUST_DEF.
	* tree-dfa.c (dfa_stats_d): Add num_v_must_defs and rename
	num_vdefs to num_v_may_defs.
	(compute_immediate_uses_for_stmt): Rename occurences of vdef
	to v_may_def.
	(redirect_immediate_uses): Ditto.
	(dump_dfa_stats): Ditto. Also added code to dump num_v_must_defs.
	(collect_dfa_stats_r): Rename occurences of vdef to v_may_def.
	Also add code to sum up the number of v_must_defs.
	(vdefs_disappeared_p): Replace with...
	(v_may_defs_disappeared_p): This.
	(v_must_defs_disappeared_p): New function.
	(mark_new_vars_to_rename): Rename occurences of vdef to v_may_def.
	Also add code to mark new variables found in V_MUST_DEFs for
	renameing.
	* tree-flow.h (stmt_ann_d): Add v_must_def_ops and replace
	vdef_ops to v_may_def_ops.
	(get_vdef_ops): Replace with...
	(get_v_may_def_ops): This.
	* tree-flow-inline.h (get_vdef_ops): Replace with...
	(get_v_may_def_ops): This.
	(get_v_must_def_ops): New function.
	(get_vdef_result_ptr): Replace with...
	(get_v_may_def_result_ptr): This.
	(get_vdef_op_ptr): Ditto with...
	(get_v_may_def_op_ptr); This.
	(get_v_must_def_op_ptr): New function.
	* tree-into-ssa.c (mark_def_sites): Rename occurences of vdef
	to v_may_def. Also add code to mark statements with
	V_MUST_DEFs as definition sites.
	(rewrite_stmt): Rename occurences of vdef to v_may_def. Also
	add code to register new V_MUST_DEFs made by the statement.
	* tree-outof-ssa.c (VIRTUAL_PARTITION): Update comments.
	(check_replaceable): Rename occurences of vdef to v_may_def. Also
	add check for V_MUST_DEFs.
	(find_replaceable_in_bb): Ditto.
	* tree-pretty-print.c (dump_vops): Rename occurences of vdef
	to v_may_def. Also add code to dump V_MUST_DEFs.
	* tree-sra.c (mark_all_vdefs): Replace with...
	(mark_all_v_may_defs): This.
	(mark_all_v_must_defs): New function.
	(create_scalar_copies): Replace call to mark_all_vdefs with
	calls to mark_all_v_may_defs and mark_all_v_must_defs.
	(scalarize_structures): Rename occurences of vdef to v_may_def.
	Also add a check for V_MUST_DEFs.
	(scalarize_modify_expr): Rename occurences of vdef to v_may_def.
	* tree-ssa-alias.c (global_var): Update comment.
	(compute_may_aliases): Ditto.
	(compute_points_to_and_addr_escape): Rename occurences of vdef
	to v_may_def. Also add code to mark variables in V_MUST_DEF
	operands as being written to.
	(group_aliases): Update comment.
	(maybe_create_global_var): Ditto.
	* tree-ssa.c (verify_ssa): Rename occurences of vdef to v_may_def.
	Also add a check for V_MUST_DEFs on GIMPLE registers.
	(replace_immediate_uses): Rename occurences of vdef to v_may_def.
	* tree-ssa-ccp.c (visit_stmt): Rename occurences of vdef
	to v_may_def. Also add code to mark all V_MUST_DEF operands
	VARYING.
	(initialize): Ditto.
	(set_rhs): Rename occurences of vdef to v_may_def. Also add
	code to update SSA_NAMEs in V_MUST_DEFs.
	* tree-ssa-copy.c (cprop_into_stmt): Rename occurences of vdef
	to v_may_def.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Rename
	occurences of vdef to v_may_def. Also add code to mark statements
	with V_MUST_DEFs as necessary.
	(propagate_necessity): Rename occurences of vdef to v_may_def.
	* tree-ssa-dom.c (redirect_edges_and_update_ssa_graph): Rename
	occurences of vdef to v_may_def. Also add code to mark operands
	in V_MUST_DEFs for renaming.
	(eliminate_redundant_computations): Rename occurences of vdef
	to v_may_def.
	(record_equivalences_from_stmt): Rename occurences of vdef
	to v_may_def. Also add code to record VUSEs for V_MUST_DEFs.
	(optimize_stmt): Remove unnesessary variable vdefs. Update
	comment.
	(register_definitions_for_stmt): Rename occurences of vdef
	to v_may_def. Also add code to register definitions made with
	V_MUST_DEFs.
	* tree-ssa-dse.c (fix_stmt_vdefs): Replace with...
	(fix_stmt_v_may_defs): This.
	(fix_phi_uses): Rename occurences of vdef to v_may_def.
	(dse_optimize_stmt): Ditto.
	* tree-ssa-live.c (create_ssa_var_map): Rename occurences of vdef
	to v_may_def. Also add code to mark V_MUST_DEF operands as being
	used in virtual operators.
	* tree-ssa-loop.c (mark_defs_for_rewrite): Rename occurences of
	vdef to v_may_def. Also add code to mark V_MUST_DEF operands for
	renaming.
	* tree-ssa-operands.c (opf_kill_def): New flag for killing
	definitions.
	(build_vdefs): Renamed to...
	(build_v_may_defs): This.
	(build_v_must_defs): New variable.
	(voperands_d): Add v_must_def_ops and replace vdef_ops with
	v_may_def_ops.
	(append_vdef): Replace with...
	(append_v_may_def): This.
	(append_v_must_def): New function.
	(NUM_FREE): Increment for V_MUST_DEF
	(optype_freelist): Increment its size for V_MUST_DEF
	(allocate_vdef_optype): Replace with...
	(allocate_v_may_def_optype): This.
	(allocate_v_must_def_optype): New function.
	(free_vdefs): Replace with...
	(free_v_may_defs): This.
	(free_v_must_defs): New function.
	(remove_vdefs): Replace with...
	(remove_v_may_defs): This.
	(remove_v_must_defs): New function.
	(init_ssa_operands): Rename occurences of vdef to v_may_def. Also
	add code to initialize build_v_must_defs.
	(finalize_ssa_vdefs): Replace with...
	(finalize_ssa_v_may_defs): This.
	(finalize_ssa_vuses): Rename occurences of vdef to v_may_def.
	(finalize_ssa_v_must_defs): New function.
	(finalize_ssa_stmt_operands): Replace call to finalize_ssa_vdefs
	with calls to finalize_ssa_v_may_defs and finalize_ssa_v_must_defs.
	(verify_start_operands): Rename occurences of vdef to v_may_def.
	Also add check for build_v_must_defs.
	(get_stmt_operands): Rename occurences of vdef to v_may_def.
	Also add code to handle V_MUST_DEFs and to use opf_kill_def for
	killing definitions.
	(get_expr_operands): Update comment and use opf_kill_def for
	killing definitions.
	(add_stmt_operand): Replace code that appends VDEFs with code
	that appends V_MUST_DEFs when opf_kill_def is set and V_MAY_DEFs
	otherwise.
	(add_call_clobber_ops): Update comments.
	* tree-ssa-operands.h (vdef_optype_d): Replace with...
	(v_may_def_optype_d): This.
	(v_must_def_optype_d): New structure.
	(VDEF_OPS): Replace with...
	(V_MAY_DEF_OPS): This.
	(STMT_VDEF_OPS): Same with...
	(STMT_V_MAY_DEF_OPS): This.
	(NUM_VDEFS): And...
	(NUM_V_MAY_DEFS): This.
	(VDEF_RESULT_PTR): As well as...
	(V_MAY_DEF_RESULT_PTR): This.
	(VDEF_RESULT): Same goes for...
	(V_MAY_DEF_RESULT): This.
	(VDEF_OP_PTR): And...
	(V_MAY_DEF_OP_PTR): This.
	(VDEF_OP): And...
	(V_MAY_DEF_OP): This.
	(V_MUST_DEF_OPS): New macro.
	(STMT_V_MUST_DEF_OPS): Ditto.
	(NUM_V_MUST_DEFS): Ditto.
	(V_MUST_DEF_OP_PTR): Ditto.
	(V_MUST_DEF_OP): Ditto.
	(remove_vdefs): Replace signature with...
	(remove_v_may_defs): This.
	(remove_v_must_defs): New function signature.
	* tree-ssa-pre.c (subst_phis): Replace call to remove_vdefs
	with calls to remove_v_may_defs and remove_v_must_defs.
	(process_left_occs_and_kills): Rename occurences of vdef to v_may_def.
	Also add code that marks left occurences of operands in V_MUST_DEFs.
	* tree-tailcall.c (find_tail_calls): Rename occurences of vdef
	to v_may_def. Also add check for V_MUST_DEFs.
	(eliminate_tail_call):Rename occurences of vdef to v_may_def.

testsuite:

	* gcc.dg/tree-ssa/20031015-1.c: Scan for
	V_MAY_DEF instead of VDEF.
	* gcc.dg/tree-ssa/20040517-1.c: Ditto.

From-SVN: r82947
2004-06-10 21:41:08 +00:00
Kazu Hirata 9cf737f89f bb-reorder.c, [...]: Fix comment formatting.
* bb-reorder.c, builtins.c, c-common.c, c-gimplify.c,
	c-incpath.c, cgraphunit.c, ddg.c, defaults.h, dwarf2out.c,
	expmed.c, flags.h, gcc.c, gensupport.c, gimplify.c, global.c,
	passes.c, reg-stack.c, target.h, toplev.c, tree-alias-ander.c,
	tree-alias-common.c, tree-cfg.c, tree-complex.c, tree-dfa.c,
	tree-eh.c, tree-mudflap.c, tree-mudflap.h, tree-outof-ssa.c,
	tree-phinodes.c, tree-pretty-print.c, tree-ssa-alias.c,
	tree-ssa-ccp.c, tree-ssa-live.c, tree-ssa-live.h,
	tree-ssa-pre.c, tree.h, value-prof.h, varasm.c: Fix comment
	formatting.

From-SVN: r82463
2004-05-30 18:32:31 +00:00
Kazu Hirata 1ea7e6ad84 c-common.c, [...]: Fix comment typos.
* c-common.c, calls.c, cfgcleanup.c, cgraph.c, cgraphunit.c,
	ddg.c, ddg.h, df.c, df.h, except.c, expr.c, flags.h,
	fold-const.c, gcc.c, gimplify.c, haifa-sched.c,
	modulo-sched.c, tree-inline.c, tree-into-ssa.c, tree-nested.c,
	tree-nrv.c, tree-ssa-ccp.c, tree-ssa-dom.c, tree-ssa-live.c,
	tree-ssa-loop.c, tree-ssa-pre.c, tree-tailcall.c, tree.h: Fix
	comment typos.  Follow spelling conventions.

From-SVN: r82439
2004-05-30 07:12:58 +00:00
Jeff Law 02ea8d06bf tree-ssa-live.c (calculate_live_on_entry): Ignore virtual variables.
* tree-ssa-live.c (calculate_live_on_entry): Ignore virtual
        variables.  Simplify slightly by using USE_OP/DEF_OP instead
        of USE_OP_PTR/DEF_OP_PTR and dereferencing the result.

From-SVN: r81832
2004-05-13 23:08:55 -06:00
Diego Novillo eadf906f46 tree-gimple.c: Rename from tree-simple.c.
* tree-gimple.c: Rename from tree-simple.c.
	* tree-gimple.h: Rename from tree-simple.h.
	* c-gimplify.c: Rename from c-simplify.c
	* Makefile.in, c-decl.c, gimple-low.c, gimplify.c,
	langhooks.c, tree-alias-ander.c, tree-alias-common.c,
	tree-complex.c, tree-dfa.c, tree-flow.h, tree-inline.c,
	tree-into-ssa.c, tree-iterator.c, tree-mudflap.c,
	tree-nested.c, tree-nomudflap.c, tree-outof-ssa.c, tree-sra.c,
	tree-ssa-alias.c, tree-ssa-ccp.c, tree-ssa-copyrename.c,
	tree-ssa-dce.c, tree-ssa-live.c, tree-ssa-pre.c, tree-ssa.c:
	Update.

cp/ChangeLog

	* cp-gimplify.c: Rename from cp-simplify.c.
	* Make-lang.in, optimize.c: Update.

fortran/ChangeLog

	* Make-lang.in, f95-lang.c, trans-array.c, trans-decl.c,
	trans-expr.c, trans-intrinsic.c, trans-io.c, trans-stmt.c,
	trans.c: Rename tree-simple.[ch] to tree-gimple.[ch].

java/ChangeLog

	* Make-lang.in, expr.c, java-gimplify.c: Rename
	tree-simple.[ch] to tree-gimple.[ch].

From-SVN: r81829
2004-05-13 22:29:32 -04:00
Andrew Pinski 623f4556de tree-ssa-live (calculate_live_on_entry): Free saw_def at the end of the function.
2004-05-13  Andrew Pinski  <pinskia@physics.uc.edu>

        * tree-ssa-live (calculate_live_on_entry): Free saw_def
        at the end of the function.

From-SVN: r81814
2004-05-13 16:06:03 -07:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00