Commit Graph

71 Commits

Author SHA1 Message Date
Michael Matz 355a767352 coretypes.h (gimple_seq, [...]): Typedef as gimple.
* coretypes.h (gimple_seq, const_gimple_seq): Typedef as gimple.
	* gimple.h (struct gimple_seq_node_d, struct gimple_seq_d): Remove.
	(const_gimple_seq_node): Remove.
	(gimple_seq_node): Typedef as gimple.
	(struct gimple_statement_base): Add next and prev members,
	adjust all WORD markers in using structs.
	(union gimple_statement_d): Link via gsbase.next field for GC and PCH.
	(gimple_seq_first, gimple_seq_first_stmt, gimple_seq_last,
	gimple_seq_last_stmt): Adjust as gimple_seq, gimple_seq_node and
	gimple are the same.
	(gimple_seq_set_last, gimple_seq_set_first): Don't allocate
	gimple_seq, adjust.
	(gimple_init_singleton): New function.
	(gsi_start_1, gsi_last_1, gsi_end_p, gsi_one_before_end_p): Adjust.
	(gsi_next, gsi_prev): Adjust, handle prev cyclic list correctly.
	(gsi_stmt): Adjust.
	(gsi_stmt_ptr): Remove.
	(enum gimple_alloc_kind): Remove gimple_alloc_kind_seq member.

	* gimple-iterator.c (update_bb_for_stmts): Take last parameter
	again, adjust for above changes.
	(update_call_edge_frequencies): Adjust for above changes.
	(gsi_insert_seq_nodes_before): Rewrite for new data structure.
	(gsi_insert_seq_nodes_after): Ditto.
	(gsi_split_seq_after): Ditto.
	(gsi_set_stmt): Ditto.
	(gsi_split_seq_before): Ditto.
	(gsi_remove): Ditto.
	(gsi_insert_seq_before_without_update): Don't free sequence.
	(gsi_insert_seq_after_without_update): Ditto.
	(gsi_replace): Assert some more invariants.
	(gsi_insert_before_without_update, gsi_insert_after_without_update):
	Tidy.
	(gsi_for_stmt): Don't search for stmt.
	(gsi_insert_on_edge_immediate): Tidy.

	* gimple.c (gimple_alloc_k): Remove "sequences".
	(gimple_seq_cache): Remove.
	(gimple_alloc_stat): Make stmt a singleton sequence.
	(gimple_seq_alloc, gimple_seq_free): Remove.
	(gimple_assign_set_rhs_with_ops_1): Ensure new stmt is a singleton.
	(gimple_copy): Ditto.
	* gimplify.c (gimplify_cleanup_point_expr): Use gsi_set_stmt,
	create iterator from correct sequence.
	* tree-phinodes.c (make_phi_node): Make stmt a singleton.


	* gimple.h (gimple_stmt_iterator <seq>): Make it be pointer to
	gimple_seq.
	(gimple_seq_set_last, gimple_seq_set_first): Take pointer to
	sequence, lazily allocate it.
	(bb_seq_addr): New function.
	(gsi_start_1): Rename from gsi_start, but take pointer to sequence.
	(gsi_start): Macro to wrap gsi_start_1 taking pointer of argument.
	(gsi_none): New function.
	(gsi_start_bb): Adjust.
	(gsi_last_1): Rename from gsi_last, but take pointer to sequence.
	(gsi_last): Macro to wrap gsi_last_1 taking pointer of argument.
	(gsi_last_bb): Adjust.
	(gsi_seq): Adjust.
	* tree-flow-inline.h (phi_nodes_ptr): New function.

	* gimple-iterator.c (gsi_insert_seq_nodes_before): Adjust to 
	datastructure and interface change.
	(gsi_insert_seq_before_without_update): Ditto.
	(gsi_insert_seq_nodes_after): Ditto.
	(gsi_insert_seq_after_without_update): Ditto.
	(gsi_split_seq_after): Ditto, don't use gimple_seq_alloc.
	(gsi_split_seq_before): Ditto.
	(gsi_start_phis): Adjust.
	* tree-vect-loop.c (vect_determine_vectorization_factor): Use
	gsi_none.
	(vect_transform_loop): Ditto.
	* gimple.c (gimple_seq_add_stmt, gimple_seq_add_seq,
	gimple_seq_copy): Don't use gimple_seq_alloc.
	* gimplify.c (gimple_seq_add_stmt_without_update): Ditto.
	(gimplify_seq_add_seq): Ditto.
	* lto-streamer-in.c (make_new_block): Ditto.
	* tree-cfg.c (create_bb): Ditto.
	* tree-sra.c (initialize_parameter_reductions): Ditto.


	* gimple.h (gimple_seq_first, gimple_seq_first_stmt, gimple_seq_last,
	gimple_seq_last_stmt, gimple_seq_set_last, gimple_seq_set_first,
	gimple_seq_empty_p, gimple_seq_alloc_with_stmt, bb_seq,
	set_bb_seq): Move down to after gimple_statement_d definition.


	* gimple-fold.c (gimplify_and_update_call_from_tree): Use
	gsi_replace_with_seq, instead of inserting itself.
	* gimple-iterator.c (gsi_replace_with_seq): New function.
	* tree-ssa-forwprop.c (forward_propagate_comparison): Take
	iterator instead of statement, advance it.
	(ssa_forward_propagate_and_combine): Adjust call to above.


	* tree-phinodes.c (add_phi_node_to_bb): Tidy, don't use
	gimple_seq_alloc.
	* omp-low.c (finalize_task_copyfn): Don't use gimple_seq_alloc.
	* tree-nested.c (walk_gimple_omp_for): Ditto.
	* trans-mem.c (lower_transaction): Ditto.
	* tree-eh.c (do_return_redirection): Ditto.
	(do_goto_redirection): Ditto.
	(lower_try_finally_switch): Ditto.
	* gimplify.c (gimplify_stmt): Ditto.
	(gimplify_scan_omp_clauses): Ditto.
	(gimplify_omp_for): Ditto.
	(gimplify_function_tree): Ditto.
	* gimple-fold.c (gimplify_and_update_call_from_tree): Ditto.
	* tree-mudflap.c (mf_decl_cache_locals): Ditto.
	(mf_build_check_statement_for): Ditto.
	(mx_register_decls): Ditto.
	* graphite-sese-to-poly.c (remove_invariant_phi): Ditto,
	and don't use itertors to append.
	(insert_stmts): Ditto.
	(insert_out_of_ssa_copy): Ditto.
	(insert_out_of_ssa_copy_on_edge): Ditto.


	* gimple.h (gimple_bind_body_ptr): New function.
	(gimple_bind_body): Use it.
	(gimple_catch_handler): Use gimple_catch_handler_ptr.
	(gimple_eh_filter_failure_ptr): New function.
	(gimple_eh_filter_failure): Use it.
	(gimple_eh_else_n_body_ptr): New function.
	(gimple_eh_else_n_body): Use it.
	(gimple_eh_else_e_body_ptr): New function.
	(gimple_eh_else_e_body): Use it.
	(gimple_try_eval_ptr): New function.
	(gimple_try_eval): Use it.
	(gimple_try_cleanup_ptr): New function.
	(gimple_try_cleanup): Use it.
	(gimple_wce_cleanup_ptr): New function.
	(gimple_wce_cleanup): Use it.
	(gimple_omp_body_ptr): New function.
	(gimple_omp_body): Use it.
	(gimple_omp_for_pre_body_ptr): New function.
	(gimple_omp_for_pre_body): Use it.
	(gimple_transaction_body_ptr): New function.
	(gimple_transaction_body): Use it.
	(gsi_split_seq_before): Adjust to return nothing and take pointer
	to sequence.
	(gsi_set_stmt): Declare.
	(gsi_replace_with_seq): Declare.
	(walk_gimple_seq_mod): Declare.
	* function.h (struct function <gimple_body>): Use typedef gimple_seq.

	* gimple-iterator.c (gsi_set_stmt): New function.
	(gsi_split_seq_before): Return new sequence via pointer argument.
	(gsi_replace): Use gsi_set_stmt.

	* tree-ssa-loop-im.c (move_computations_stmt): First remove
	then insert stmt.
	* tree-complex.c (update_complex_components_on_edge): Don't
	copy gsi.
	* tree-phinodes.c (resize_phi_node): Don't resize stmt in-place,
	return new stmt.
	(reserve_phi_args_for_new_edge): Change call to above,
	use gsi_set_stmt.

	* omp-low.c (lower_omp): Change prototype to take pointer to
	sequence.
	(lower_rec_input_clauses): Use gimple_seq_add_seq instead of
	iterators.  Adjust call to lower_omp.
	(lower_lastprivate_clauses): Adjust call to lower_omp.
	(lower_reduction_clauses): Ditto.
	(expand_omp_taskreg): Nullify non-cfg body of child_fn.
	(lower_omp_sections): Don't explicitely count sequence length,
	nullify lowered bodies earlier, ensure stmts are part of only
	one sequence, adjust call to lower_omp.
	(lower_omp_single): Ensure stmts are part of only one sequence,
	adjust call to lower_omp.
	(lower_omp_master): Ditto.
	(lower_omp_ordered): Ditto.
	(lower_omp_critical): Ditto.
	(lower_omp_for): Ditto.
	(lower_omp_taskreg): Ditto, tidy.
	(lower_omp_1): Adjust calls to lower_omp.
	(execute_lower_omp): Ditto.
	(lower_omp): Adjust to take pointer to sequence.
	(diagnose_sb_2): Use walk_gimple_seq_mod.
	(diagnose_omp_structured_block_errors): Ditto and set possibly
	changed function body.
	* gimple-low.c (lower_function_body): Set function body after
	it stabilizes.
	(lower_sequence): Adjust to take pointer to sequence.
	(lower_omp_directive): Ensure stmt isn't put twice into the
	sequence, adjust call to lower_sequence.
	(lower_stmt): Adjust calls to lower_sequence.
	(lower_gimple_bind): Ditto.
	(gimple_try_catch_may_fallthru): Call gsi_start with lvalue.
	* tree-nested.c (walk_body): Take pointer to sequence, use
	walk_gimple_seq_mod.
	(walk_function): Adjust call to walk_body, set possibly changed
	body.
	(walk_gimple_omp_for): Adjust calls to walk_body.
	(convert_nonlocal_omp_clauses): Ditto.
	(convert_nonlocal_reference_stmt): Ditto.
	(convert_local_omp_clauses): Ditto.
	(convert_local_reference_stmt): Ditto.
	(convert_tramp_reference_stmt): Ditto.
	(convert_gimple_call): Ditto.
	(convert_nl_goto_reference): Use local iterator copy.
	* gimple.c (walk_gimple_seq_mod): Renamed from walk_gimple_seq,
	but taking pointer to sequence, ensure gsi_start is called with
	callers lvalue.
	(walk_gimple_seq): New wrapper around walk_gimple_seq_mod,
	asserting that the sequence head didn't change.
	(walk_gimple_stmt): Replace all calls to walk_gimple_seq with
	walk_gimple_seq_mod.
	* trans-mem.c (lower_transaction): Use walk_gimple_seq_mod.
	(execute_lower_tm): Ditto, and set possibly changed body.
	* tree-eh.c (lower_eh_constructs_1): Take pointer to sequence,
	call gsi_start with that lvalue.
	(replace_goto_queue_stmt_list): Ditto.
	(replace_goto_queue_1): Adjust calls to replace_goto_queue_stmt_list.
	(replace_goto_queue): Ditto.
	(lower_try_finally_nofallthru): Adjust calls to lower_eh_constructs_1.
	(lower_try_finally_onedest): Ditto.
	(lower_try_finally_copy): Ditto.
	(lower_try_finally_switch): Ditto.
	(lower_try_finally): Ditto.
	(lower_eh_filter): Ditto.
	(lower_eh_must_not_throw): Ditto.
	(lower_cleanup): Ditto.
	(lower_eh_constructs_2): Ditto.
	(lower_catch): Ditto, and ensure gsi_start is called with lvalue.
	(lower_eh_constructs): Adjust calls to lower_eh_constructs_1, and
	set possibly changed body.
	(optimize_double_finally): Call gsi_start with lvalue.

	* tree-cfg.c (make_blocks): Adjust call to gsi_split_seq_before.
	(gimple_split_block): Ditto.
	(gimple_merge_blocks): Use gsi_start_phis.
	(move_stmt_r): Use walk_gimple_seq_mod.
	* tree-ssa-dse.c (dse_enter_block): Use gsi_last_bb.
	* cgraphbuild.c (build_cgraph_edges): Use gsi_start_phis.
	(rebuild_cgraph_edges): Ditto.
	(cgraph_rebuild_references): Ditto.
	* ipa-prop.c (ipa_analyze_params_uses): Ditto.
	* tree-inline.c (copy_phis_for_bb): Ditto.
	* tree-ssa-dce.c: Ditto.

	* cgraphunit.c (cgraph_analyze_function): Use gimple_has_body_p.

From-SVN: r187053
2012-05-02 16:41:48 +00:00
Richard Guenther 209be55309 tree-flow.h (is_hidden_global_store): Remove.
2012-04-27  Richard Guenther  <rguenther@suse.de>

	* tree-flow.h (is_hidden_global_store): Remove.
	* tree-ssa-sink.c (is_hidden_global_store): Likewise.
	* tree-ssa-alias.h (ref_may_alias_global_p): Declare.
	(stmt_may_clobber_global_p): Likewise.
	* tree-ssa-alias.c (ref_may_alias_global_p): New function.
	(stmt_may_clobber_global_p): Likewise.
	* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Call
	stmt_may_clobber_global_p.
	* tree-ssa-dse.c (dse_possible_dead_store_p): Likewise.

From-SVN: r186903
2012-04-27 11:58:20 +00:00
Richard Guenther eaf6ca186f tree-ssa-dse.c (dse_optimize_stmt): Remember the stmt basic-block before removing it.
2012-04-05  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (dse_optimize_stmt): Remember the stmt
	basic-block before removing it.

From-SVN: r186164
2012-04-05 12:43:25 +00:00
Richard Guenther b5b3ec3e6e gimple-iterator.c (gsi_remove): Return whether EH edges need to be cleanup.
2012-04-05  Richard Guenther  <rguenther@suse.de>

	* gimple-iterator.c (gsi_remove): Return whether EH edges need to be
	cleanup.
	* gimple.h (gsi_remove): Adjust.
	* tree-ssa-operands.c (unlink_stmt_vdef): Optimize.
	* tree-ssa-dom.c (optimize_stmt): Use gsi_remove result.
	* tree-ssa-dse.c (dse_optimize_stmt): Likewise.
	* tree-ssa-forwprop.c (remove_prop_source_from_use): Likewise.
	* tree-ssa-math-opts.c (execute_optimize_widening_mul): Likewise.
	* tree-ssa-pre.c (eliminate): Likewise.

From-SVN: r186159
2012-04-05 09:43:48 +00:00
David Li 22c5fa5fbf dumping cleanup phase 1 -- Removing TODO_dump_func
From-SVN: r175051
2011-06-14 19:39:36 +00:00
Richard Guenther 4a5ba3ed87 tree-ssa-dse.c (struct dse_global_data, [...]): Remove.
2011-04-14  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (struct dse_global_data, struct dse_block_local_data):
	Remove.
	(dse_initialize_block_local_data, dse_leave_block,
	record_voperand_set, get_stmt_uid): Likewise.
	(dse_possible_dead_store_p): Allow any kind of killing stmt.
	(dse_optimize_stmt): Remove voperand set handling code.
	Simplify and improve to handle any kind of killing stmt.
	(dse_record_phi): Remove.
	(dse_enter_block): Simplify.
	(tree_ssa_dse): Likewise.
	* tree-ssa-alias.c (stmt_kills_ref_p_1): Handle some builtins.

	* gcc.dg/tree-ssa/ssa-dse-14.c: New testcase.

From-SVN: r172431
2011-04-14 13:38:33 +00:00
Jeff Law caaf13d387 re PR tree-optimization/47053 (ICE: verify_flow_info failed: BB 2 can not throw but has an EH edge with -O -fnon-call-exceptions)
PR tree-optimization/47053
	* tree-ssa-dse.c (need_eh_cleanup): New bitmap.
	(dse_optimize_stmt): Set the appropriate bit in NEED_EH_CLEANUP when
	statements are deleted.
	(tree_ssa_dse): Allocate & free NEED_EH_CLEANUP.  If NEED_EH_CLEANUP
	is nonempty, then purge dead edges and cleanup the CFG.

	PR tree-optimization/47053
	* g++.dg/pr47053.C: New test.

From-SVN: r169123
2011-01-21 21:09:44 -07:00
Richard Guenther 71d6134802 re PR tree-optimization/45970 (tree DSE misses many obvious dead stores)
2010-10-13  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/45970
	* tree-ssa-alias.h (stmt_kills_ref_p): Declare.
	* tree-ssa-alias.c (stmt_kills_ref_p_1): New function.
	(stmt_kills_ref_p): Likewise.
	* tree-ssa-dse.c (dse_optimize_stmt): Use it.

	* gcc.dg/tree-ssa/ssa-dse-13.c: New testcase.

From-SVN: r165422
2010-10-13 13:03:31 +00:00
Steven Bosscher 2eb79bbbb3 gimplify.c: Do not include except.h and optabs.h.
* gimplify.c: Do not include except.h and optabs.h.
	(gimplify_body): Do not initialize RTL profiling.
	* gimple-low.c: Do not include rtl.h, diagnostic.h, langhooks.h,
	langhooks-def.h, timevar.h, except.h, hashtab.h, and expr.h.
	* gimple-fold.c: Do not include rtl.h, tm_p.h, ggc.h, basic-block.h,
	output.h, expr.h, diagnostic.h, timevar.h, value-prof.h, and
	langhooks.h.

	* tree-pretty-print.h: Include pretty-print.h.
	* gimple-pretty-print.h: Include pretty-print.h.

	* tree-pretty-print.c: Do not include diagnostic.h.
	* tree-vrp.c: Likewise.
	* tree-tailcall.c: Likewise
	* tree-scalar-evolution.c: Likewise
	* tree-ssa-dse.c: Likewise
	* tree-chrec.c: Likewise
	* tree-ssa-sccvn.c: Likewise
	* tree-ssa-copyrename.c: Likewise
	* tree-nomudflap.c: Likewise
	* tree-call-cdce.c: Likewise
	* tree-stdarg.c: Likewise
	* tree-ssa-math-opts.c: Likewise
	* tree-nrv.c: Likewise
	* tree-ssa-sink.c: Likewise
	* tree-browser.c: Likewise
	* tree-ssa-loop-ivcanon.c: Likewise
	* tree-ssa-loop.c: Likewise
	* tree-parloops.c: Likewise
	* tree-ssa-address.c: Likewise
	* tree-ssa-ifcombine.c: Likewise
	* tree-if-conv.c: Likewise
	* tree-data-ref.c: Likewise
	* tree-affine.c: Likewise
	* tree-ssa-phiopt.c: Likewise
	* tree-ssa-coalesce.c: Likewise
	* tree-ssa-pre.c: Likewise
	* tree-ssa-live.c: Likewise
	* tree-predcom.c: Likewise
	* tree-ssa-forwprop.c: Likewise
	* tree-ssa-dce.c: Likewise
	* tree-ssa-ter.c: Likewise
	* tree-ssa-loop-prefetch.c: Likewise
	* tree-optimize.c: Likewise
	* tree-ssa-phiprop.c: Likewise
	* tree-object-size.c: Likewise
	* tree-outof-ssa.c: Likewise
	* tree-ssa-structalias.c: Likewise
	* tree-switch-conversion.c: Likewise
	* tree-ssa-reassoc.c: Likewise
	* tree-ssa-operands.c: Likewise
	* tree-vectorizer.c: Likewise
	* tree-vect-data-refs.c: Likewise
	* tree-vect-generic.c: Likewise
	* tree-vect-stmts.c: Likewise
	* tree-vect-patterns.c: Likewise
	* tree-vect-slp.c: Likewise
	* tree-vect-loop.c: Likewise
	* tree-ssa-loop-ivopts.c: Likewise
	* tree-ssa-loop-im.c: Likewise
	* tree-ssa-loop-niter.c: Likewise
	* tree-ssa-loop-unswitch.c: Likewise
	* tree-ssa-loop-manip.c: Likewise
	* tree-ssa-loop-ch.c: Likewise
	* tree-dump.c: Likewise
	* tree-complex.c: Likewise

	* tree-into-ssa.c: Do not include diagnostic.h and expr.h.
	* tree-ssa-uninit.c: Likewise
	* tree-ssa-threadupdate.c: Likewise
	* tree-ssa-uncprop.c: Likewise
	* tree-ssa-ccp.c: Likewise
	* tree-ssa-dom.c: Likewise
	* tree-ssa-propagate.c: Likewise
	* tree-ssa-alias.c: Likewise
	* tree-dfa.c: Likewise
	* tree-cfgcleanup.c: Likewise
	* tree-sra.c: Likewise
	* tree-ssa-copy.c: Likewise
	* tree-ssa.c: Likewise
	* tree-profile.c: Likewise
	* tree-cfg.c: Likewise
	* tree-ssa-threadedge.c: Likewise
	* tree-vect-loop-manip.c: Likewise

	* tree-inline.c: Do not include diagnostic.h and expr.h.
	Include rtl.h.
	(copy_decl_for_dup_finish): Do not use NULL_RTX.

	* tree-loop-linear.c: Do not include diagnostic.h, expr.h,
	and optabs.h.
	* tree-loop-distribution.c: Likewise.

From-SVN: r160125
2010-06-01 22:00:56 +00:00
Joseph Myers cf8358387d diagnostic.c: Don't include tm.h, tree.h, tm_p.h, langhooks.h or langhooks-def.h.
* diagnostic.c: Don't include tm.h, tree.h, tm_p.h, langhooks.h or
	langhooks-def.h.
	(diagnostic_initialize): Initialize x_data not last_function.
	(diagnostic_report_current_function): Move to tree-diagnostic.c.
	(default_diagnostic_starter): Call
	diagnostic_report_current_module not
	diagnostic_report_current_function.
	(diagnostic_report_diagnostic): Initialize x_data not
	abstract_origin.
	(verbatim): Likewise.
	* diagnostic.h (struct diagnostic_info): Change abstract_origin to
	x_data.
	(struct diagnostic_context): Change last_function to x_data.
	(diagnostic_auxiliary_data): Replace with
	diagnostic_context_auxiliary_data and
	diagnostic_info_auxiliary_data.
	(diagnostic_last_function_changed, diagnostic_set_last_function,
	diagnostic_report_current_function): Move to tree-diagnostic.h.
	(print_declaration, dump_generic_node, print_generic_stmt,
	print_generic_stmt_indented, print_generic_expr,
	print_generic_decl, debug_c_tree, dump_omp_clauses,
	print_call_name, debug_generic_expr, debug_generic_stmt,
	debug_tree_chain, default_tree_printer): Move to
	tree-pretty-print.h.
	(debug_gimple_stmt, debug_gimple_seq, print_gimple_seq,
	print_gimple_stmt, print_gimple_expr, dump_gimple_stmt): Move to
	gimple-pretty-print.h.
	* pretty-print.c: Don't include tree.h
	(pp_base_format): Don't handle %K here.
	(pp_base_tree_identifier): Move to tree-pretty-print.c.
	* pretty-print.h (text_info): Change abstract_origin to x_data.
	(pp_tree_identifier, pp_unsupported_tree,
	pp_base_tree_identifier): Move to tree-pretty-print.h.
	* gimple-pretty-print.h, tree-diagnostic.c, tree-diagnostic.h,
	tree-pretty-print.h: New files.
	* tree-pretty-print.c: Include tree-pretty-print.h.
	(percent_K_format): New.  Moved from pretty-print.c.
	(pp_base_tree_identifier): Move from pretty-print.c.
	* c-objc-common.c: Include tree-pretty-print.h.
	(c_tree_printer): Handle %K here.
	* langhooks.c: Include tree-diagnostic.h.
	(lhd_print_error_function): Use diagnostic_abstract_origin macro.
	* toplev.c: Include tree-diagnostic.h and tree-pretty-print.h.
	(default_tree_printer): Handle %K using percent_K_format.
	(general_init): Use default_tree_diagnostic_starter.
	* tree.c: Include tree-diagnostic.h and tree-pretty-print.h.
	(free_lang_data): Use default_tree_diagnostic_starter.
	* c-pretty-print.c: Include tree-pretty-print.h.
	* cfgexpand.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* cgraphunit.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* dwarf2out.c: Include tree-pretty-print.h.
	* except.c: Include tree-pretty-print.h.
	* gimple-pretty-print.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* gimplify.c: Include tree-pretty-print.h.
	* graphite-poly.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* ipa-cp.c: Include tree-pretty-print.h.
	* ipa-inline.c: Include gimple-pretty-print.h.
	* ipa-prop.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* ipa-pure-const.c: Include gimple-pretty-print.h.
	* ipa-struct-reorg.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* ipa-type-escape.c: Include tree-pretty-print.h.
	* print-rtl.c: Include tree-pretty-print.h.
	* print-tree.c: Include gimple-pretty-print.h.
	* sese.c: Include tree-pretty-print.h.
	* tree-affine.c: Include tree-pretty-print.h.
	* tree-browser.c: Include tree-pretty-print.h.
	* tree-call-cdce.c: Include gimple-pretty-print.h.
	* tree-cfg.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-chrec.c: Include tree-pretty-print.h.
	* tree-data-ref.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-dfa.c: Include tree-pretty-print.h.
	* tree-if-conv.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-inline.c: Include tree-pretty-print.h.
	* tree-into-ssa.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-nrv.c: Include tree-pretty-print.h.
	* tree-object-size.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-outof-ssa.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-parloops.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-predcom.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-scalar-evolution.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-sra.c: Include tree-pretty-print.h.
	* tree-ssa-address.c: Include tree-pretty-print.h.
	* tree-ssa-alias.c: Include tree-pretty-print.h.
	* tree-ssa-ccp.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-coalesce.c: Include tree-pretty-print.h.
	* tree-ssa-copy.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-copyrename.c: Include tree-pretty-print.h.
	* tree-ssa-dce.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-dom.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-dse.c: Include gimple-pretty-print.h.
	* tree-ssa-forwprop.c: Include tree-pretty-print.h.
	* tree-ssa-ifcombine.c: Include tree-pretty-print.h.
	* tree-ssa-live.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-im.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-ivcanon.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-ivopts.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-niter.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-loop-prefetch.c: Include tree-pretty-print.h.
	* tree-ssa-math-opts.c: Include gimple-pretty-print.h.
	* tree-ssa-operands.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-phiprop.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-pre.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-propagate.c: Include gimple-pretty-print.h.
	* tree-ssa-reassoc.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-sccvn.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-sink.c: Include gimple-pretty-print.h.
	* tree-ssa-ter.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-ssa-uninit.c: Include gimple-pretty-print.h.
	* tree-ssa.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-stdarg.c: Include gimple-pretty-print.h.
	* tree-switch-conversion.c: Include gimple-pretty-print.h.
	* tree-tailcall.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-data-refs.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-loop-manip.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-loop.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-patterns.c: Include gimple-pretty-print.h.
	* tree-vect-slp.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vect-stmts.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* tree-vectorizer.c: Include tree-pretty-print.h.
	* tree-vrp.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* value-prof.c: Include tree-pretty-print.h and
	gimple-pretty-print.h.
	* var-tracking.c: Include tree-pretty-print.h.
	* Makefile.in (OBJS-common): Add tree-diagnostic.o.
	(tree-diagnostic.o): New dependencies.
	(c-objc-common.o, c-pretty-print.o, langhooks.o, tree.o,
	tree-inline.o, print-tree.o, stor-layout.o, tree-ssa-uninit.o,
	tree-ssa.o, tree-into-ssa.o, tree-ssa-ter.o, tree-ssa-coalesce.o,
	tree-outof-ssa.o, tree-ssa-forwprop.o, tree-ssa-phiprop.o,
	tree-ssa-ifcombine.o, tree-nrv.o, tree-ssa-copy.o,
	tree-ssa-propagate.o, tree-ssa-dom.o, tree-ssa-uncprop.o,
	tree-ssa-live.o, tree-ssa-copyrename.o, tree-ssa-pre.o,
	tree-ssa-sccvn.o, tree-vrp.o, tree-cfg.o, tree-tailcall.o,
	tree-ssa-sink.o, tree-if-conv.o, tree-dfa.o, tree-ssa-operands.o,
	tree-ssa-address.o, tree-ssa-loop-niter.o,
	tree-ssa-loop-ivcanon.o, tree-ssa-loop-prefetch.o, tree-predcom.o,
	tree-ssa-loop-ivopts.o, tree-affine.o, tree-ssa-loop-im.o,
	tree-ssa-math-opts.o, tree-ssa-alias.o, tree-ssa-reassoc.o,
	gimplify.o, tree-browser.o, tree-chrec.o, tree-scalar-evolution.o,
	tree-data-ref.o, sese.o, graphite-poly.o, tree-vect-loop.o,
	tree-vect-loop-manip.o, tree-vect-patterns.o, tree-vect-slp.o,
	tree-vect-stmts.o, tree-vect-data-refs.o, tree-vectorizer.o,
	tree-parloops.o, tree-stdarg.o, tree-object-size.o,
	gimple-pretty-print.o, tree-pretty-print.o, diagnostic.o,
	toplev.o, print-rtl.o, except.o, dwarf2out.o, cgraphunit.o,
	ipa-prop.o, ipa-cp.o, ipa-inline.o, ipa-pure-const.o,
	ipa-type-escape.o, ipa-struct-reorg.o, tree-ssa-dce.o,
	tree-call-cdce.o, tree-ssa-ccp.o, tree-sra.o,
	tree-switch-conversion.o, var-tracking.o, value-prof.o,
	cfgexpand.o, pretty-print.o): Update dependencies.

cp:
	* error.c: Include tree-diagnostic.h and tree-pretty-print.h.
	(cp_print_error_function): Use diagnostic_abstract_origin macro.
	(cp_printer): Handle %K here using percent_K_format.
	* cxx-pretty-print.c: Include tree-pretty-print.h.
	* Make-lang.in (cp/error.o, cp/cxx-pretty-print.o): Update
	dependencies.

From-SVN: r159685
2010-05-21 23:34:26 +01:00
Steven Bosscher 40013784db tree.h: Include real.h and fixed-value.h as basic datatypes.
gcc/ChangeLog:
	* tree.h: Include real.h and fixed-value.h as basic datatypes.
	* dfp.c, convert.c, reload1.c, reginfo.c, tree-flow.h,
	tree-ssa-threadedge.c, tree-ssanames.c, tree-loop-linear.c,
	tree-into-ssa.c, tree-vect-generic.c, tree-ssa-structalias.c,
	tree-ssa-loop-im.c, tree-dump.c, tree-complex.c, tree-ssa-uninit.c,
	genrecog.c, tree-ssa-threadupdate.c, tree-ssa-loop-niter.c,
	tree-pretty-print.c, tree-loop-distribution.c,
	tree-ssa-loop-unswitch.c, c-lex.c, optabs.c, postreload-gcse.c,
	tree-ssa-loop-manip.c, postreload.c, tree-ssa-loop-ch.c,
	tree-tailcall.c, tree.c, reload.c, tree-scalar-evolution.c, rtlanal.c,
	tree-phinodes.c, builtins.c, final.c, genoutput.c, fold-const.c,
	tree-ssa-dse.c, genautomata.c, tree-ssa-uncprop.c, toplev.c,
	tree-chrec.c, genemit.c, c-cppbuiltin.c, tree-ssa-sccvn.c,
	tree-ssa-ccp.c, tree-ssa-loop-ivopts.c, mode-switching.c,
	tree-call-cdce.c, cse.c, genpeep.c, tree-ssa-math-opts.c,
	tree-ssa-dom.c, tree-nrv.c, tree-ssa-propagate.c, tree-ssa-alias.c,
	tree-ssa-sink.c, jump.c, ifcvt.c, dwarf2out.c, expr.c, genattrtab.c,
	genconditions.c, tree-ssa-loop-ivcanon.c, tree-ssa-loop.c,
	tree-parloops.c, recog.c, tree-ssa-address.c, lcm.c, tree-eh.c,
	gimple-pretty-print.c, c-pretty-print.c, print-rtl.c, gcse.c,
	tree-if-conv.c, tree-data-ref.c, tree-affine.c, gimplify.c,
	tree-ssa-phiopt.c, implicit-zee.c, expmed.c, tree-dfa.c, emit-rtl.c,
	store-motion.c, cselib.c, tree-cfgcleanup.c, simplify-rtx.c,
	tree-ssa-pre.c, genpreds.c, tree-mudflap.c, print-tree.c,
	tree-ssa-copy.c, tree-ssa-forwprop.c, tree-ssa-dce.c, varasm.c,
	tree-nested.c, tree-ssa.c, tree-ssa-loop-prefetch.c, rtl.c,
	tree-inline.c, integrate.c, tree-optimize.c, tree-ssa-phiprop.c,
	fixed-value.c, combine.c, tree-profile.c, c-common.c, sched-vis.c,
	tree-cfg.c, passes.c, tree-ssa-reassoc.c, config/alpha/alpha.c,
	config/frv/frv.c, config/s390/s390.c, config/m32c/m32c.c,
	config/spu/spu.c, config/sparc/sparc.c, config/mep/mep.c,
	config/m32r/m32r.c, config/rx/rx.c, config/i386/i386.c,
	config/sh/sh.c, config/pdp11/pdp11.c, config/avr/avr.c,
	config/crx/crx.c, config/xtensa/xtensa.c, config/stormy16/stormy16.c,
	config/fr30/fr30.c, config/lm32/lm32.c, config/moxie/moxie.c,
	config/m68hc11/m68hc11.c, config/cris/cris.c, config/iq2000/iq2000.c,
	config/mn10300/mn10300.c, config/ia64/ia64.c, config/m68k/m68k.c,
	config/rs6000/rs6000.c, config/picochip/picochip.c, config/darwin.c,
	config/arc/arc.c, config/mcore/mcore.c, config/score/score3.c,
	config/score/score7.c, config/score/score.c, config/arm/arm.c,
	config/pa/pa.c, config/mips/mips.c, config/vax/vax.c,
	config/h8300/h8300.c, config/v850/v850.c, config/mmix/mmix.c,
	config/bfin/bfin.c:
	Clean up redundant includes.
	* Makefile.in: Update accordingly.

java/ChangeLog:
	* typeck.c, decl.c, jcf-parse.c, except.c, expr.c:

cp/Changelog:
	* error.c, tree.c, typeck2.c, cxx-pretty-print.c, mangle.c:
	Clean up redundant includes.

fortran/ChangeLog:
	* trans-const.c, trans-types.c, trans-intrinsic.c:
	Clean up redundant includes.

From-SVN: r159663
2010-05-21 13:53:22 +00:00
Steven Bosscher c75c517d53 Make-lang.in, [...]: Update copyright years.
* ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, 
	basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h,
	collect2.h, config/alpha/alpha.c, config/alpha/alpha.md,
	config/alpha/predicates.md, config/arm/arm.md,
	config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml,
	config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c,
	config/darwin9.h, config/darwin.c, config/darwin.h,
	config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h,
	config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c,
	config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c,
	config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c,
	config/mips/mips.md, config/mn10300/mn10300.c,
	config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md,
	config/rs6000/aix.h, config/rs6000/dfp.md,
	config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c,
	config/rs6000/vector.md, config/rtems.h, config/rx/rx.md,
	config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h,
	config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md,
	config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c,
	config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in,
	c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c,
	diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi,
	doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi,
	doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c,
	fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h,
	gensupport.c, gimple.h, gimple-iterator.c, graphite.c,
	graphite-clast-to-gimple.c, graphite-clast-to-gimple.h,
	graphite-dependences.c, graphite-poly.c, graphite-poly.h,
	graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c,
	graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c,
	intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h,
	ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c,
	ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c,
	loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c,
	objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk,
	opt-functions.awk, opth-gen.awk, params.def, passes.c,
	postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h,
	rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h,
	store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c,
	tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h,
	tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c,
	tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c,
	tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c,
	tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c,
	tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c,
	tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
	tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c,
	tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c,
	tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c,
	unwind-dw2-fde-darwin.c, varpool.c: Update copyright years.

From-SVN: r157950
2010-04-02 19:54:46 +00:00
Richard Guenther cc788fcc70 re PR tree-optimization/43269 (removing non dead store)
2010-03-08  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/43269
	* tree-ssa-dse.c (dse_possible_dead_store_p): Fix post-dom
	region detection.

	* gcc.c-torture/execute/pr43269.c: New testcase.

From-SVN: r157276
2010-03-08 13:30:27 +00:00
H.J. Lu b8698a0f37 Remove trailing white spaces.
2009-11-25  H.J. Lu  <hongjiu.lu@intel.com>

	* alias.c: Remove trailing white spaces.
	* alloc-pool.c: Likewise.
	* alloc-pool.h: Likewise.
	* attribs.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* builtins.def: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-decl.c: Likewise.
	* c-format.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c-opts.c: Likewise.
	* c-parser.c: Likewise.
	* c-pretty-print.c: Likewise.
	* c-tree.h: Likewise.
	* c-typeck.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h: Likewise.
	* cfglayout.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphunit.c: Likewise.
	* cif-code.def: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* coverage.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* dbgcnt.c: Likewise.
	* dbgcnt.def: Likewise.
	* dbgcnt.h: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* ddg.c: Likewise.
	* ddg.h: Likewise.
	* defaults.h: Likewise.
	* df-byte-scan.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* df.h: Likewise.
	* dfp.c: Likewise.
	* diagnostic.c: Likewise.
	* diagnostic.h: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* double-int.c: Likewise.
	* double-int.h: Likewise.
	* dse.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2asm.h: Likewise.
	* dwarf2out.c: Likewise.
	* ebitmap.c: Likewise.
	* ebitmap.h: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* flags.h: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* fwprop.c: Likewise.
	* gcc.c: Likewise.
	* gcov-dump.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* genchecksum.c: Likewise.
	* genconfig.c: Likewise.
	* genflags.c: Likewise.
	* gengtype-parse.c: Likewise.
	* gengtype.c: Likewise.
	* gengtype.h: Likewise.
	* genmddeps.c: Likewise.
	* genmodes.c: Likewise.
	* genopinit.c: Likewise.
	* genpreds.c: Likewise.
	* gensupport.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc-zone.c: Likewise.
	* ggc.h: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple.c: Likewise.
	* gimple.def: Likewise.
	* gimple.h: Likewise.
	* gimplify.c: Likewise.
	* graphds.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* gthr-nks.h: Likewise.
	* gthr-posix.c: Likewise.
	* gthr-posix.h: Likewise.
	* gthr-posix95.h: Likewise.
	* gthr-single.h: Likewise.
	* gthr-tpf.h: Likewise.
	* gthr-vxworks.h: Likewise.
	* gthr.h: Likewise.
	* haifa-sched.c: Likewise.
	* hard-reg-set.h: Likewise.
	* hooks.c: Likewise.
	* hooks.h: Likewise.
	* hosthooks.h: Likewise.
	* hwint.h: Likewise.
	* ifcvt.c: Likewise.
	* incpath.c: Likewise.
	* init-regs.c: Likewise.
	* integrate.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa-type-escape.h: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-utils.h: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-int.h: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* lambda-code.c: Likewise.
	* lambda-mat.c: Likewise.
	* lambda-trans.c: Likewise.
	* lambda.h: Likewise.
	* langhooks.c: Likewise.
	* lcm.c: Likewise.
	* libgcov.c: Likewise.
	* lists.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-init.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-iv.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* lto-streamer.h: Likewise.
	* lto-symtab.c: Likewise.
	* lto-wpa-fixup.c: Likewise.
	* matrix-reorg.c: Likewise.
	* mcf.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omega.c: Likewise.
	* omega.h: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* opts-common.c: Likewise.
	* opts.c: Likewise.
	* params.def: Likewise.
	* params.h: Likewise.
	* passes.c: Likewise.
	* plugin.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* predict.def: Likewise.
	* pretty-print.c: Likewise.
	* pretty-print.h: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* read-rtl.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regmove.c: Likewise.
	* regrename.c: Likewise.
	* regs.h: Likewise.
	* regstat.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* resource.c: Likewise.
	* rtl.c: Likewise.
	* rtl.def: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.
	* sbitmap.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-int.h: Likewise.
	* sched-rgn.c: Likewise.
	* sched-vis.c: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-dump.h: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* sel-sched.h: Likewise.
	* sese.c: Likewise.
	* sese.h: Likewise.
	* simplify-rtx.c: Likewise.
	* stack-ptr-mod.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* stringpool.c: Likewise.
	* stub-objc.c: Likewise.
	* sync-builtins.def: Likewise.
	* target-def.h: Likewise.
	* target.h: Likewise.
	* targhooks.c: Likewise.
	* targhooks.h: Likewise.
	* timevar.c: Likewise.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* toplev.h: Likewise.
	* tracer.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-affine.h: Likewise.
	* tree-browser.def: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-dump.h: Likewise.
	* tree-eh.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-flow.h: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-loop-linear.c: Likewise.
	* tree-mudflap.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-operands.h: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vectorizer.h: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* treestruct.def: Likewise.
	* unwind-compat.c: Likewise.
	* unwind-dw2-fde-glibc.c: Likewise.
	* unwind-dw2.c: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vec.c: Likewise.
	* vec.h: Likewise.
	* vmsdbgout.c: Likewise.
	* web.c: Likewise.
	* xcoffout.c: Likewise.

From-SVN: r154645
2009-11-25 02:55:54 -08:00
Paolo Bonzini ccf5c864c9 domwalk.h (struct dom_walk_data): Remove all callbacks except before_dom_children_before_stmts and...
2009-06-27  Paolo Bonzini  <bonzini@gnu.org>

        * domwalk.h (struct dom_walk_data): Remove all callbacks except
        before_dom_children_before_stmts and after_dom_children_after_stmts.
        Rename the two remaining callbacks to just before_dom_children and 
        after_dom_children. Remove other GIMPLE statement walking bits.
        * domwalk.c (walk_dominator_tree): Remove now unsupported features.
        * graphite.c: Do not include domwalk.h.
        * tree-into-ssa.c (interesting_blocks): New global.
        (struct mark_def_sites_global_data): Remove it and names_to_rename.
        (mark_def_sites, rewrite_stmt, rewrite_add_phi_arguments,
        rewrite_update_stmt, rewrite_update_phi_arguments): Simplify
        now that they're not domwalk callbacks.
        (rewrite_initialize_block): Rename to...
        (rewrite_enter_block): ... this, place after called functions.  Test
        interesting_blocks, call rewrite_stmt and rewrite_add_phi_arguments.
        (rewrite_finalize_block): Rename to...
        (rewrite_leave_block): ... this, place after called functions.
        (rewrite_update_init_block): Rename to...
        (rewrite_update_enter_block): ... this, place after called functions.
        Test interesting_blocks, call rewrite_update_stmt and 
        rewrite_update_phi_arguments.
        (rewrite_update_fini_block): Rename to...
        (rewrite_leave_block): ... this, place after called functions.
        (rewrite_blocks): Remove last argument, simplify initialization of
        walk_data.
        (mark_def_sites_initialize_block): Rename to...
        (mark_def_sites_block): ... this, call mark_def_sites.
        (mark_def_sites_blocks): Remove argument, simplify initialization of
        walk_data.
        (rewrite_into_ssa): Adjust for interesting_blocks_being a global.
        (update_ssa): Likewise.
        * tree-ssa-dom.c (optimize_stmt): Simplify now that it's not a domwalk
        callback.
        (tree_ssa_dominator_optimize): Simplify initialization of walk_data.
        (dom_opt_initialize_block): Rename to...
        (dom_opt_enter_block): ... this, place after called functions.  Walk
        statements here, inline propagate_to_outgoing_edges.
        (dom_opt_finalize_block): Rename to...
        (dom_opt_leave_block): ... this, place after called functions.
        * tree-ssa-dse.c (dse_optimize_stmt): Simplify now that it's not a
        domwalk callback.
        (dse_enter_block, dse_record_phi): New.
        (dse_record_phis): Delete.
        (dse_finalize_block): Rename to...
        (dse_leave_block): ... this.
        (tree_ssa_dse): Simplify initialization of walk_data.
        * tree-ssa-loop-im.c (determine_invariantness, move_computations):
        Adjust initialization of walk_data.
        * tree-ssa-loop-unswitch.c: Do not include domwalk.h.
        * tree-ssa-loop-phiopt.c (get_non_trapping):
        Adjust initialization of walk_data.
        * tree-ssa-loop-threadedge.c: Do not include domwalk.h.
        * tree-ssa-uncprop.c (uncprop_into_successor_phis): Simplify now that
        it's not a domwalk callback.
        (uncprop_initialize_block): Rename to...
        (dse_enter_block): ... this, call uncprop_into_successor_phis.
        (dse_finalize_block): Rename to...
        (dse_leave_block): ... this.
        (tree_ssa_uncprop): Simplify initialization of walk_data.
        * Makefile.in: Adjust dependencies.

From-SVN: r149008
2009-06-27 14:45:51 +00:00
Richard Guenther 4effdf02d4 passes.c (init_optimization_passes): Strip now incorrect comment.
2009-05-11  Richard Guenther  <rguenther@suse.de>

	* passes.c (init_optimization_passes): Strip now incorrect comment.
	(execute_function_todo): Do not set PROP_alias.
	* tree-pass.h (PROP_alias): Remove.
	* tree-ssa-structalias.c (pass_build_alias): Do not provide PROP_alias.
	* tree-if-conv.c (pass_if_conversion): Do not require PROP_alias.
	* tree-nrv.c (pass_return_slot): Likewise.
	* tree-object-size.c (pass_object_sizes): Likewise.
	* tree-ssa-dom.c (pass_dominator): Likewise.
	(pass_phi_only_cprop): Likewise.
	* tree-ssa-dse.c (pass_dse): Likewise.
	* tree-ssa-phiopt.c (pass_phiopt): Likewise.
	(pass_cselim): Likewise.
	* tree-ssa-pre.c (pass_pre): Likewise.
	(pass_fre): Likewise.
	* tree-ssa-reassoc.c (pass_reassoc): Likewise.
	* tree-ssa-sink.c (pass_sink_code): Likewise.
	* tree-stdarg.c (pass_stdarg): Likewise.
	* tree-tailcall.c (pass_tail_calls): Likewise.
	* tree-vrp.c (pass_vrp): Likewise.

From-SVN: r147371
2009-05-11 12:19:00 +00:00
Richard Guenther 5006671f1a re PR middle-end/13146 (inheritance for nonoverlapping_component_refs_p)
2009-04-03  Richard Guenther  <rguenther@suse.de>

	PR middle-end/13146
	PR tree-optimization/23940
	PR tree-optimization/33237
	PR middle-end/33974
	PR middle-end/34093
	PR tree-optimization/36201
	PR tree-optimization/36230
	PR tree-optimization/38049
	PR tree-optimization/38207
	PR tree-optimization/38230
	PR tree-optimization/38301
	PR tree-optimization/38585
	PR middle-end/38895
	PR tree-optimization/38985
	PR tree-optimization/39299
	* tree-ssa-structalias.h: Remove.
	* tree-ssa-operands.h (NULL_USE_OPERAND_P): Make of type use_operand_p.
	(NULL_DEF_OPERAND_P): Make of type def_operand_p.
	(struct vuse_element_d): Remove.
	(struct vuse_vec_d): Likewise.
	(VUSE_VECT_NUM_ELEM, VUSE_VECT_ELEMENT_NC, VUSE_ELEMENT_PTR_NC,
	VUSE_ELEMENT_VAR_NC, VUSE_VECT_ELEMENT, VUSE_ELEMENT_PTR,
	SET_VUSE_VECT_ELEMENT, SET_VUSE_ELEMENT_VAR, SET_VUSE_ELEMENT_PTR,
	VUSE_ELEMENT_VAR): Likewise.
	(struct voptype_d): Likewise.
	(NUM_VOP_FREE_BUCKETS): Likewise.
	(struct ssa_operands): Remove vop_free_buckets and mpt_table fields.
	(struct stmt_operands_d): Remove.
	(VUSE_OP_PTR, VUSE_OP, SET_VUSE_OP, VUSE_NUM, VUSE_VECT,
	VDEF_RESULT_PTR, VDEF_RESULT, VDEF_OP_PTR, VDEF_OP, SET_VDEF_OP,
	VDEF_NUM, VDEF_VECT): Likewise.
	(copy_virtual_operands): Remove.
	(operand_build_cmp): Likewise.
	(create_ssa_artificial_load_stmt): Likewise.
	(enum ssa_op_iter_type): Remove ssa_op_iter_vdef.
	(struct ssa_operand_iterator_d): Remove vuses, vdefs, mayusesm
	vuse_index and mayuse_index members.  Pack and move done and iter_type
	members to the front.
	(SSA_OP_VMAYUSE): Remove.
	(SSA_OP_VIRTUAL_USES): Adjust.
	(FOR_EACH_SSA_VDEF_OPERAND): Remove.
	(unlink_stmt_vdef): Declare.
	(add_to_addressable_set): Remove.
	* tree-vrp.c (stmt_interesting_for_vrp): Adjust.
	(vrp_visit_stmt): Likewise.
	* doc/tree-ssa.texi (Alias analysis): Update.
	* doc/invoke.texi (max-aliased-vops): Remove docs.
	(avg-aliased-vops): Likewise.
	* tree-into-ssa.c (syms_to_rename): Remove.
	(need_to_update_vops_p): Likewise.
	(need_to_initialize_update_ssa_p): Rename to ...
	(update_ssa_initialized_fn): ... this.  Track function we are
	initialized for.
	(symbol_marked_for_renaming): Simplify.
	(add_new_name_mapping): Do not set need_to_update_vops_p.
	(dump_currdefs): Use SYMS_TO_RENAME.
	(rewrite_update_stmt): Always walk all uses/defs.
	(dump_update_ssa): Adjust.
	(init_update_ssa): Take function argument.  Track what we are
	initialized for.
	(delete_update_ssa): Reset SYMS_TO_RENAME and update_ssa_initialized_fn.
	(create_new_def_for): Initialize for cfun, assert we are initialized
	for cfun.
	(mark_sym_for_renaming): Simplify.
	(mark_set_for_renaming): Do not initialize update-ssa.
	(need_ssa_update_p): Simplify.  Take function argument.
	(name_mappings_registered_p): Assert we ask for the correct function.
	(name_registered_for_update_p): Likewise.
	(ssa_names_to_replace): Likewise.
	(release_ssa_name_after_update_ssa): Likewise.
	(update_ssa): Likewise.  Use SYMS_TO_RENAME.
	(dump_decl_set): Do not print a newline.
	(debug_decl_set): Do it here.
	(dump_update_ssa): And here.
	* tree-ssa-loop-im.c (move_computations): Adjust.
	(movement_possibility): Likewise.
	(determine_max_movement): Likewise.
	(gather_mem_refs_stmt): Likewise.
	* tree-dump.c (dequeue_and_dump): Do not handle SYMBOL_MEMORY_TAG
	or NAME_MEMORY_TAG.
	* tree-complex.c (update_all_vops): Remove.
	(expand_complex_move): Adjust.
	* tree-ssa-loop-niter.c (chain_of_csts_start): Use NULL_TREE.
	Simplify test for memory referencing statement.  Exclude
	non-invariant ADDR_EXPRs.
	* tree-pretty-print.c (dump_generic_node): Do not handle memory tags.
	* tree-loop-distribution.c (generate_memset_zero): Adjust.
	(rdg_flag_uses): Likewise.
	* tree-tailcall.c (suitable_for_tail_opt_p): Remove memory-tag
	related code.
	(tree_optimize_tail_calls_1): Also split the
	edge from the entry block if we have degenerate PHI nodes in
	the first basic block.
	* tree.c (init_ttree): Remove memory-tag related code.
	(tree_code_size): Likewise.
	(tree_node_structure): Likewise.
	(build7_stat): Re-write to be build6_stat.
	* tree.h (MTAG_P, TREE_MEMORY_TAG_CHECK, TMR_TAG): Remove.
	(SSA_VAR_P): Adjust.
	(struct tree_memory_tag): Remove.
	(struct tree_memory_partition_tag): Likewise.
	(union tree_node): Adjust.
	(build7): Re-write to be build6.
	* tree-pass.h (pass_reset_cc_flags): Remove.
	(TODO_update_address_taken): New flag.
	(pass_simple_dse): Remove.
	* ipa-cp.c (ipcp_update_callgraph): Update SSA form.
	* params.h (MAX_ALIASED_VOPS): Remove.
	(AVG_ALIASED_VOPS): Likewise.
	* omp-low.c (expand_omp_taskreg): Update SSA form.
	* tree-ssa-dse.c (dse_optimize_stmt): Properly query if the rhs
	aliases the lhs in a copy stmt.
	* tree-ssa-dse.c (struct address_walk_data): Remove.
	(memory_ssa_name_same): Likewise.
	(memory_address_same): Likewise.
	(get_kill_of_stmt_lhs): Likewise.
	(dse_possible_dead_store_p): Simplify, use the oracle.  Handle
	unused stores.  Look through PHI nodes into post-dominated regions.
	(dse_optimize_stmt): Simplify.  Properly remove stores.
	(tree_ssa_dse): Compute dominators.
	(execute_simple_dse): Remove.
	(pass_simple_dse): Likewise.
	* ipa-reference.c (scan_stmt_for_static_refs): Open-code
	gimple_loaded_syms and gimple_stored_syms computation.
	* toplev.c (dump_memory_report): Dump alias and pta stats.
	* tree-ssa-sccvn.c (vn_reference_compute_hash): Simplify.
	(vn_reference_eq): Likewise.
	(vuses_to_vec, copy_vuses_from_stmt, vdefs_to_vec,
	copy_vdefs_from_stmt, shared_lookup_vops, shared_vuses_from_stmt,
	valueize_vuses): Remove.
	(get_def_ref_stmt_vuses): Simplify.  Rename to ...
	(get_def_ref_stmt_vuse): ... this.
	(vn_reference_lookup_2): New function.
	(vn_reference_lookup_pieces): Use walk_non_aliased_vuses for
	walking equivalent vuses.  Simplify.
	(vn_reference_lookup): Likewise.
	(vn_reference_insert): Likewise.
	(vn_reference_insert_pieces): Likewise.
	(visit_reference_op_call): Simplify.
	(visit_reference_op_load): Likewise.
	(visit_reference_op_store): Likewise.
	(init_scc_vn): Remove shared_lookup_vuses initialization.
	(free_scc_vn): Remove shared_lookup_vuses freeing.
	(sort_vuses, sort_vuses_heap): Remove.
	(get_ref_from_reference_ops): Export.
	* tree-ssa-sccvn.h (struct vn_reference_s): Replace vuses
	vector with single vuse pointer.
	(vn_reference_lookup_pieces, vn_reference_lookup,
	vn_reference_insert, vn_reference_insert_pieces): Adjust prototypes.
	(shared_vuses_from_stmt): Remove.
	(get_ref_from_reference_ops): Declare.
	* tree-ssa-loop-manip.c (slpeel_can_duplicate_loop_p): Adjust.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Remove
	memory-tag related code.
	* tree-ssa-ccp.c (get_symbol_constant_value): Remove memory-tag code.
	(likely_value): Add comment, skip static-chain of call statements.
	(surely_varying_stmt_p): Adjust.
	(gimplify_and_update_call_from_tree): Likewise.
	(execute_fold_all_builtins): Do not rebuild alias info.
	(gimplify_and_update_call_from_tree): Properly update VOPs.
	* tree-ssa-loop-ivopts.c (get_ref_tag): Remove.
	(copy_ref_info): Remove memory-tag related code.
	* tree-call-cdce.c (tree_call_cdce): Rename the VOP.
	* ipa-pure-const.c (check_decl): Remove memory-tag related code.
	(check_stmt): Open-code gimple_loaded_syms and gimple_stored_syms
	computation.
	* tree-ssa-dom.c (gimple_p): Remove typedef.
	(eliminate_redundant_computations): Adjust.
	(record_equivalences_from_stmt): Likewise.
	(avail_expr_hash): Likewise.
	(avail_expr_eq): Likewise.
	* tree-ssa-propagate.c (update_call_from_tree): Properly
	update VOPs.
	(stmt_makes_single_load): Likewise.
	(stmt_makes_single_store): Likewise.
	* tree-ssa-alias.c: Rewrite completely.
	(debug_memory_partitions, dump_mem_ref_stats, debug_mem_ref_stats,
	debug_mem_sym_stats, dump_mem_sym_stats_for_var,
	debug_all_mem_sym_stats, debug_mp_info, update_mem_sym_stats_from_stmt,
	delete_mem_ref_stats, create_tag_raw, dump_points_to_info,
	dump_may_aliases_for, debug_may_aliases_for, new_type_alias):
	Remove public functions.
	(pass_reset_cc_flags): Remove.
	(pass_build_alias): Move ...
	* tree-ssa-structalias.c (pass_build_alias): ... here.
	* tree-ssa-alias.c (may_be_aliased): Move ...
	* tree-flow-inline.h (may_be_aliased): ... here.
	tree-ssa-alias.c (struct count_ptr_d, count_ptr_derefs,
	count_uses_and_derefs): Move ...
	* gimple.c: ... here.
	* gimple.h (count_uses_and_derefs): Declare.
	* tree-ssa-alias.c (dump_alias_stats, ptr_deref_may_alias_global_p,
	ptr_deref_may_alias_decl_p, ptr_derefs_may_alias_p,
	same_type_for_tbaa, nonaliasing_component_refs_p, decl_refs_may_alias_p,
	indirect_ref_may_alias_decl_p, indirect_refs_may_alias_p,
	ref_maybe_used_by_call_p, ref_maybe_used_by_stmt_p,
	call_may_clobber_ref_p, stmt_may_clobber_ref_p, maybe_skip_until,
	get_continuation_for_phi, walk_non_aliased_vuses, walk_aliased_vdefs):
	New functions.
	* tree-dfa.c (refs_may_alias_p): Move ...
	* tree-ssa-alias.c (refs_may_alias_p): ... here.  Extend.
	* tree-ssa-alias.h: New file.
	* tree-ssa-sink.c (is_hidden_global_store): Adjust.
	(statement_sink_location): Likewise.
	* opts.c (decode_options): Do not adjust max-aliased-vops or
	avg-aliased-vops values.
	* timevar.def (TV_TREE_MAY_ALIAS): Remove.
	(TV_CALL_CLOBBER): Likewise.
	(TV_FLOW_SENSITIVE): Likewise.
	(TV_FLOW_INSENSITIVE): Likewise.
	(TV_MEMORY_PARTITIONING): Likewise.
	(TV_ALIAS_STMT_WALK): New timevar.
	* tree-ssa-loop-ivcanon.c (empty_loop_p): Adjust.
	* tree-ssa-address.c (create_mem_ref_raw): Use build6.
	(get_address_description): Remove memory-tag related code.
	* tree-ssa-ifcombine.c (bb_no_side_effects_p): Adjust.
	* treestruct.def (TS_MEMORY_TAG, TS_MEMORY_PARTITION_TAG): Remove.
	* tree-eh.c (cleanup_empty_eh): Do not leave stale SSA_NAMEs
	and immediate uses in statements.  Document.
	* gimple-pretty-print.c (dump_gimple_mem_ops): Adjust.
	(dump_symbols): Remove.
	(dump_gimple_mem_ops): Do not dump loaded or stored syms.
	* alias.c (get_deref_alias_set): New function split out from ...
	(get_alias_set): ... here.
	* alias.h (get_deref_alias_set): Declare.
	* tree-vect-data-refs.c (vect_create_data_ref_ptr): Remove unused
	type parameter.  Remove restrict pointer handling.  Create a
	ref-all pointer in case type-based alias sets do not conflict.
	(vect_analyze_data_refs): Remove SMT related code.
	* tree-vect-stmts.c (vectorizable_store): Re-instantiate TBAA assert.
	(vectorizable_load): Likewise.
	* tree-data-ref.h (struct dr_alias): Remove symbol_tag field.
	(DR_SYMBOL_TAG, DR_VOPS): Remove.
	* tree-data-ref.c (dr_may_alias_p): Use the alias-oracle.
	Ignore vops and SMTs.
	(dr_analyze_alias): Likewise..
	(free_data_ref): Likewise.
	(create_data_ref): Likewise.
	(analyze_all_data_dependences): Likewise.
	(get_references_in_stmt): Adjust.
	* tree-flow-inline.h (gimple_aliases_computed_p,
	gimple_addressable_vars, gimple_call_clobbered_vars,
	gimple_call_used_vars, gimple_global_var, may_aliases, memory_partition,
	factoring_name_p, mark_call_clobbered, clear_call_clobbered,
	compare_ssa_operands_equal, symbol_mem_tag, set_symbol_mem_tag,
	gimple_mem_ref_stats): Remove.
	(gimple_vop): New function.
	(op_iter_next_use): Remove vuses and mayuses cases.
	(op_iter_next_def): Remove vdefs case.
	(op_iter_next_tree): Remove vuses, mayuses and vdefs cases.
	(clear_and_done_ssa_iter): Do not set removed fields.
	(op_iter_init): Likewise.  Skip vuse and/or vdef if requested.
	Assert we are not iterating over vuses or vdefs if not also
	iterating over uses or defs.
	(op_iter_init_use): Likewise.
	(op_iter_init_def): Likewise.
	(op_iter_next_vdef): Remove.
	(op_iter_next_mustdef): Likewise.
	(op_iter_init_vdef): Likewise.
	(compare_ssa_operands_equal): Likewise.
	(link_use_stmts_after): Handle vuse operand.
	(is_call_used): Use is_call_clobbered.
	(is_call_clobbered): Global variables are always call clobbered,
	query the call-clobbers bitmap.
	(mark_call_clobbered): Ignore global variables.
	(clear_call_clobbered): Likewise.
	* tree-ssa-coalesce.c (create_outofssa_var_map): Adjust
	virtual operands sanity check.
	* tree.def (NAME_MEMORY_TAG, SYMBOL_MEMORY_TAG, MEMORY_PARTITION_TAG):
	Remove.
	(TARGET_MEM_REF): Remove TMR_TAG operand.
	* tree-dfa.c (add_referenced_var): Initialize call-clobber state.
	Remove call-clobber related code.
	(remove_referenced_var): Likewise.  Do not clear mpt or symbol_mem_tag.
	(dump_variable): Do not dump SMTs, memory stats, may-aliases or
	partitions or escape reason.
	(get_single_def_stmt, get_single_def_stmt_from_phi,
	get_single_def_stmt_with_phi): Remove.
	(dump_referenced_vars): Tidy.
	(get_ref_base_and_extent): Allow bare decls.
	(collect_dfa_stats): Adjust.
	* graphite.c (rename_variables_in_stmt): Adjust.
	(graphite_copy_stmts_from_block): Likewise.
	(translate_clast): Likewise.
	* tree-ssa-pre.c (struct bb_bitmap_sets): Add expr_dies bitmap.
	(EXPR_DIES): New.
	(translate_vuse_through_block): Use the oracle.
	(phi_translate_1): Adjust.
	(value_dies_in_block_x): Use the oracle.  Cache the outcome
	in EXPR_DIES.
	(valid_in_sets): Check if the VUSE for
	a REFERENCE is available.
	(eliminate): Do not remove stmts during elimination,
	instead queue and remove them afterwards.
	(do_pre): Do not rebuild alias info.
	(pass_pre): Run TODO_rebuild_alias before PRE.
	* tree-ssa-live.c (remove_unused_locals): Remove memory-tag code.
	* tree-sra.c (sra_walk_function): Use gimple_references_memory_p.
	(mark_all_v_defs_stmt): Remove.
	(mark_all_v_defs_seq): Adjust.
	(sra_replace): Likewise.
	(scalarize_use): Likewise.
	(scalarize_copy): Likewise.
	(scalarize_init): Likewise.
	(scalarize_ldst): Likewise.
	(todoflags): Remove.
	(tree_sra): Do not rebuild alias info.
	(tree_sra_early): Adjust.
	(pass_sra): Run TODO_update_address_taken before SRA.
	* tree-predcom.c (set_alias_info): Remove.
	(prepare_initializers_chain): Do not call it.
	(mark_virtual_ops_for_renaming): Adjust.
	(mark_virtual_ops_for_renaming_list): Remove.
	(initialize_root_vars): Adjust.
	(initialize_root_vars_lm): Likewise.
	(prepare_initializers_chain): Likewise.
	* tree-ssa-copy.c (may_propagate_copy): Remove memory-tag related code.
	(may_propagate_copy_into_stmt): Likewise.
	(merge_alias_info): Do nothing for now.
	(propagate_tree_value_into_stmt): Adjust.
	(stmt_may_generate_copy): Likewise.
	* tree-ssa-forwprop.c (tidy_after_forward_propagate_addr): Do
	not mark symbols for renaming.
	(forward_propagate_addr_expr): Match up push/pop_stmt_changes
	with the same statement, make sure to update the new pointed-to one.
	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Do not copy
	call statements, do not mark symbols for renaming.
	(mark_operand_necessary): Dump something.
	(ref_may_be_aliased): New function.
	(mark_aliased_reaching_defs_necessary_1): New helper function.
	(mark_aliased_reaching_defs_necessary): Likewise.
	(mark_all_reaching_defs_necessary_1): Likewise.
	(mark_all_reaching_defs_necessary): Likewise.
	(propagate_necessity): Do not process virtual PHIs.  For
	non-aliased loads mark all reaching definitions as necessary.
	For aliased loads and stores mark the immediate dominating
	aliased clobbers as necessary.
	(visited): New global static.
	(perform_tree_ssa_dce): Free visited bitmap after propagating
	necessity.
	(remove_dead_phis): Perform simple dead virtual PHI removal.
	(remove_dead_stmt): Properly unlink virtual operands when
	removing stores.
	(eliminate_unnecessary_stmts): Schedule PHI removal after
	stmt removal.
	* tree-ssa-ter.c (is_replaceable_p): Adjust.
	(process_replaceable): Likewise.
	(find_replaceable_in_bb): Likewise.
	* tree-ssa.c (verify_ssa_name): Verify all VOPs are
	based on the single gimple vop.
	(verify_flow_insensitive_alias_info): Remove.
	(verify_flow_sensitive_alias_info): Likewise.
	(verify_call_clobbering): Likewise.
	(verify_memory_partitions): Likewise.
	(verify_alias_info): Likewise.
	(verify_ssa): Adjust..
	(execute_update_addresses_taken): Export.  Update SSA
	manually.  Optimize only when optimizing.  Use a local bitmap.
	(pass_update_address_taken): Remove TODO_update_ssa, add
	TODO_dump_func.
	(pass_update_address_taken): Just use TODO_update_address_taken.
	(init_tree_ssa): Do not initialize addressable_vars.
	(verify_ssa): Verify new VUSE / VDEF properties.
	Verify that all stmts definitions have the stmt as SSA_NAME_DEF_STMT.
	Do not call verify_alias_info.
	(delete_tree_ssa): Clear the VUSE, VDEF operands.
	Do not free the loaded and stored syms bitmaps.  Reset the escaped
	and callused solutions.  Do not free addressable_vars.
	Remove memory-tag related code.
	(warn_uninitialized_var): Aliases are always available.
	* tree-ssa-loop-prefetch.c (gather_memory_references): Adjust.
	* lambda-code.c (can_put_in_inner_loop): Adjust.
	(can_put_after_inner_loop): Likewise.
	(perfect_nestify): Likewise.
	* tree-vect-stmts.c (vect_stmt_relevant_p): Adjust.
	(vect_gen_widened_results_half): Remove CALL_EXPR handling.
	(vectorizable_conversion): Do not mark symbols for renaming.
	* tree-inline.c (remap_gimple_stmt): Clear VUSE/VDEF.
	(expand_call_inline): Unlink the calls virtual operands before
	replacing it.
	(tree_function_versioning): Do not call update_ssa if we are not
	updating clones.  Simplify.
	* tree-ssa-phiprop.c (phivn_valid_p): Adjust.
	(propagate_with_phi): Likewise..
	* tree-outof-ssa.c (create_temp): Remove memory tag and call
	clobber code.  Assert we are not aliased or global.
	* tree-flow.h: Include tree-ssa-alias.h
	(enum escape_type): Remove.
	(struct mem_sym_stats_d): Likewise.
	(struct mem_ref_stats_d): Likewise.
	(struct gimple_df): Add vop member.  Remove global_var,
	call_clobbered_vars, call_used_vars, addressable_vars,
	aliases_compted_p and mem_ref_stats members.  Add syms_to_rename,
	escaped and callused members.
	(struct ptr_info_def): Remove all members, add points-to solution
	member pt.
	(struct var_ann_d): Remove in_vuse_list, in_vdef_list,
	call_clobbered, escape_mask, mpt and symbol_mem_tag members.
	* Makefile.in (TREE_FLOW_H): Add tree-ssa-alias.h.
	(tree-ssa-structalias.o): Remove tree-ssa-structalias.h.
	(tree-ssa-alias.o): Likewise.
	(toplev.o): Add tree-ssa-alias.h
	(GTFILES): Remove tree-ssa-structalias.h, add tree-ssa-alias.h.
	* gimple.c (gimple_set_bb): Fix off-by-one error.
	(is_gimple_reg): Do not handle memory tags.
	(gimple_copy): Also copy virtual operands.
	Delay updating the statement.  Do not reset loaded and stored syms.
	(gimple_set_stored_syms): Remove.
	(gimple_set_loaded_syms): Likewise.
	(gimple_call_copy_skip_args): Copy the virtual operands
	and mark the new statement modified.
	* tree-ssa-structalias.c (may_alias_p): Remove.
	(set_uids_in_ptset): Take the alias set to prune with as
	parameter.  Fold in the alias test of may_alias_p.
	(compute_points_to_sets): Compute whether a ptr is dereferenced
	in a local sbitmap.
	(process_constraint): Deal with &ANYTHING on the lhs, reject all
	other ADDRESSOF constraints on the lhs.
	(get_constraint_for_component_ref): Assert that we don't get
	ADDRESSOF constraints from the base of the reference.
	Properly generate UNKNOWN_OFFSET for DEREF if needed.
	(struct variable_info): Remove collapsed_to member.
	(get_varinfo_fc): Remove.
	(new_var_info): Do not set collapsed_to.
	(dump_constraint): Do not follow cycles.
	(dump_constraint_graph): Likewise.
	(build_pred_graph): Likewise.
	(build_succ_graph): Likewise.
	(rewrite_constraints): Likewise.
	(do_simple_structure_copy): Remove.
	(do_rhs_deref_structure_copy): Remove.
	(do_lhs_deref_structure_copy): Remove.
	(collapse_rest_of_var): Remove.
	(do_structure_copy): Re-implement.
	(pta_stats): New global variable.
	(dump_pta_stats): New function.
	(struct constraint_expr): Make offset signed.
	(UNKNOWN_OFFSET): Define special value.
	(dump_constraint): Dump UNKNOWN_OFFSET as UNKNOWN.
	(solution_set_expand): New helper function split out from ...
	(do_sd_constraint): ... here.
	(solution_set_add): Handle UNKNOWN_OFFSET.  Handle negative offsets.
	(do_ds_constraint): Likewise.
	(do_sd_constraint): Likewise.  Do not special-case ESCAPED = *ESCAPED
	and CALLUSED = *CALLUSED.
	(set_union_with_increment): Make inc argument signed.
	(type_safe): Remove.
	(get_constraint_for_ptr_offset): Handle unknown and negative
	constant offsets.
	(first_vi_for_offset): Handle offsets before start.  Bail
	out early for offsets beyond the variable extent.
	(first_or_preceding_vi_for_offset): New function.
	(init_base_vars): Add ESCAPED = ESCAPED + UNKNOWN_OFFSET constraint.
	Together with ESCAPED = *ESCAPED this properly computes reachability.
	(find_what_var_points_to): New function.
	(find_what_p_points_to): Implement in terms of find_what_var_points_to.
	(pt_solution_reset, pt_solution_empty_p, pt_solution_includes_global,
	pt_solution_includes_1, pt_solution_includes, pt_solutions_intersect_1,
	pt_solutions_intersect): New functions.
	(compute_call_used_vars): Remove.
	(compute_may_aliases): New main entry into PTA computation.
	* gimple.h (gimple_p): New typedef.
	(struct gimple_statement_base): Remove references_memory_p.
	(struct gimple_statement_with_memory_ops_base): Remove
	vdef_ops, vuse_ops, stores and loads members.  Add vdef and vuse
	members.
	(gimple_vuse_ops, gimple_set_vuse_ops, gimple_vdef_ops,
	gimple_set_vdef_ops, gimple_loaded_syms, gimple_stored_syms,
	gimple_set_references_memory): Remove.
	(gimple_vuse_op, gimple_vdef_op, gimple_vuse, gimple_vdef,
	gimple_vuse_ptr, gimple_vdef_ptri, gimple_set_vuse, gimple_set_vdef):
	New functions.
	* tree-cfg.c (move_block_to_fn): Fix off-by-one error.
	(verify_expr): Allow RESULT_DECL.
	(gimple_duplicate_bb): Do not copy virtual operands.
	(gimple_duplicate_sese_region): Adjust.
	(gimple_duplicate_sese_tail): Likewise.
	(mark_virtual_ops_in_region): Remove.
	(move_sese_region_to_fn): Do not call it.
	* passes.c (init_optimization_passes): Remove pass_reset_cc_flags
	and pass_simple_dse.
	(execute_function_todo): Handle TODO_update_address_taken,
	call execute_update_addresses_taken for TODO_rebuild_alias.
	(execute_todo): Adjust.
	(execute_one_pass): Init dump files early.
	* ipa-struct-reorg.c (finalize_var_creation): Do not mark vars
	call-clobbered.
	(create_general_new_stmt): Clear vops.
	* tree-ssa-reassoc.c (get_rank): Adjust.
	* tree-vect-slp.c (vect_create_mask_and_perm): Do not mark
	symbols for renaming.
	* params.def (PARAM_MAX_ALIASED_VOPS): Remove.
	(PARAM_AVG_ALIASED_VOPS): Likewise.
	* tree-ssanames.c (init_ssanames): Allocate SYMS_TO_RENAME.
	(duplicate_ssa_name_ptr_info): No need to copy the shared bitmaps.
	* tree-ssa-operands.c: Simplify for new virtual operand
	representation.
	(operand_build_cmp, copy_virtual_operands,
	create_ssa_artificial_load_stmt, add_to_addressable_set,
	gimple_add_to_addresses_taken): Remove public functions.
	(unlink_stmt_vdef): New function.

	* gcc.dg/pr19633-1.c: Adjust.
	* gcc.dg/torture/pta-callused-1.c: Likewise.
	* gcc.dg/torture/pr39074-2.c: Likewise.
	* gcc.dg/torture/pr39074.c: Likewise.
	* gcc.dg/torture/pta-ptrarith-3.c: New testcase.
	* gcc.dg/torture/pr30375.c: Adjust.
	* gcc.dg/torture/pr33563.c: Likewise.
	* gcc.dg/torture/pr33870.c: Likewise.
	* gcc.dg/torture/pr33560.c: Likewise.
	* gcc.dg/torture/pta-structcopy-1.c: New testcase.
	* gcc.dg/torture/ssa-pta-fn-1.c: Likewise.
	* gcc.dg/tree-ssa/alias-15.c: Remove.
	* gcc.dg/tree-ssa/ssa-dce-4.c: New testcase.
	* gcc.dg/tree-ssa/pr26421.c: Adjust.
	* gcc.dg/tree-ssa/ssa-fre-10.c: XFAIL.
	* gcc.dg/tree-ssa/ssa-dce-5.c: New testcase.
	* gcc.dg/tree-ssa/pr23382.c: Adjust.
	* gcc.dg/tree-ssa/ssa-fre-20.c: New testcase.
	* gcc.dg/tree-ssa/alias-16.c: Adjust.
	* gcc.dg/tree-ssa/ssa-fre-13.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-14.c: Likewise.
	* gcc.dg/tree-ssa/alias-18.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-15.c: Likewise.
	* gcc.dg/tree-ssa/ssa-lim-3.c: Likewise.
	* gcc.dg/tree-ssa/alias-19.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-1.c: New testcase.
	* gcc.dg/tree-ssa/pr13146.c: Likewise.
	* gcc.dg/tree-ssa/ssa-pre-23.c: Likewise.
	* gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-18.c: Likewise.
	* gcc.dg/tree-ssa/ssa-pre-24.c: New XFAILed testcase.
	* gcc.dg/tree-ssa/ssa-fre-19.c: New testcase.
	* gcc.dg/tree-ssa/alias-20.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dse-12.c: Likewise.
	* gcc.dg/tree-ssa/pr38895.c: Likewise.
	* gcc.dg/uninit-B.c: XFAIL.
	* gcc.dg/vect/no-vfa-vect-43.c: Adjust.
	* gcc.dg/uninit-pr19430.c: XFAIL.
	* g++.dg/tree-ssa/pr13146.C: New testcase.
	* g++.dg/opt/pr36187.C: Adjust.
	* g++.dg/torture/20090329-1.C: New testcase.

From-SVN: r145494
2009-04-03 10:24:28 +00:00
Jakub Jelinek 66647d441f Update Copyright years for files modified in 2008 and/or 2009.
From-SVN: r144324
2009-02-20 16:20:38 +01:00
Richard Guenther dc874b53e5 re PR middle-end/38851 (Compiler warns about uninitialized variable that is an object with a constructor)
2009-01-26  Richard Guenther  <rguenther@suse.de>

	PR middle-end/38851
	* Makefile.in (tree-ssa-dse.o): Add langhooks.h.
	* tree-ssa-dse.c: Include langhooks.h
	(execute_simple_dse): Remove stores with zero size.

	* g++.dg/warn/Wuninitialized-1.C: New testcase.

From-SVN: r143672
2009-01-26 09:52:48 +00:00
Richard Biener 726a989a8b backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
2008-07-28  Richard Guenther  <rguenther@suse.de>

	Merge from gimple-tuples-branch.

	* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
	* gimple.def: New file.
	* gsstruct.def: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* tree-gimple.c: Removed.  Merged into ...
	* gimple.c: ... here.  New file.
	* tree-gimple.h: Removed.  Merged into ...
	* gimple.h: ... here.  New file.

	* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
	* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
	--enable-checking=gimple flag.
	* config.in: Likewise.
	* configure: Regenerated.

	* tree-ssa-operands.h: Tuplified.
	* tree-vrp.c: Likewise.
	* tree-loop-linear.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-complex.c: Likewise.
	* cgraphbuild.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tracer.c: Likewise.
	* gengtype.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* value-prof.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-tailcall.c: Likewise.
	* value-prof.h: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* tree-pass.h: Likewise.
	* ipa-cp.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-scalar-evolution.h: Likewise.
	* target.h: Likewise.
	* lambda-mat.c: Likewise.
	* tree-phinodes.c: Likewise.
	* diagnostic.h: Likewise.
	* builtins.c: Likewise.
	* tree-ssa-alias-warnings.c: Likewise.
	* cfghooks.c: Likewise.
	* fold-const.c: Likewise.
	* cfghooks.h: Likewise.
	* omp-low.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* ipa-reference.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* toplev.c: Likewise.
	* tree-gimple.c: Likewise.
	* tree-gimple.h: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sccvn.h: Likewise.
	* cgraphunit.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* c-format.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* ipa-utils.c: Likewise.
	* tree-ssa-propagate.h: Likewise.
	* tree-ssa-alias.c: Likewise.
	* gimple-low.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* ipa-inline.c: Likewise.
	* c-semantics.c: Likewise.
	* dwarf2out.c: Likewise.
	* expr.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* predict.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* matrix-reorg.c: Likewise.
	* c-decl.c: Likewise.
	* tree-eh.c: Likewise.
	* c-pretty-print.c: Likewise.
	* lambda-trans.c: Likewise.
	* function.c: Likewise.
	* langhooks.c: Likewise.
	* ebitmap.h: Likewise.
	* tree-vectorizer.c: Likewise.
	* function.h: Likewise.
	* langhooks.h: Likewise.
	* tree-vectorizer.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa-type-escape.h: Likewise.
	* domwalk.c: Likewise.
	* tree-if-conv.c: Likewise.
	* profile.c: Likewise.
	* domwalk.h: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-affine.c: Likewise.
	* tree-vect-analyze.c: Likewise.
	* c-typeck.c: Likewise.
	* gimplify.c: Likewise.
	* coretypes.h: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* calls.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree.def: Likewise.
	* tree-dfa.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* cfgexpand.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-predcom.c: Likewise.
	* lambda.h: Likewise.
	* tree-mudflap.c: Likewise.
	* ipa-prop.c: Likewise.
	* print-tree.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* ipa-prop.h: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* ggc-page.c: Likewise.
	* c-omp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-ssa.c: Likewise.
	* lambda-code.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-inline.h: Likewise.
	* tree-iterator.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-vect-transform.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* cfgloop.c: Likewise.
	* system.h: Likewise.
	* tree-profile.c: Likewise.
	* cfgloop.h: Likewise.
	* c-gimplify.c: Likewise.
	* c-common.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-flow.h: Likewise.
	* c-common.h: Likewise.
	* basic-block.h: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-ssa-structalias.h: Likewise.
	* tree-cfg.c: Likewise.
	* passes.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* cfgrtl.c: Likewise.
	* varpool.c: Likewise.
	* stmt.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* langhooks-def.h: Likewise.
	* tree-ssa-operands.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32c/m32c-protos.h: Likewise.
	* config/spu/spu.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/mips/mips.c: Likewise.

From-SVN: r138207
2008-07-28 14:33:56 +00:00
Ralf Wildenhues fa10beec52 cgraph.c: Fix typos in comments.
gcc/
	* cgraph.c: Fix typos in comments.
	(cgraph_availability_names): Fix string typo.
	* fold-const.c: Fix typos in comments.
	(fold_binary): Fix typo in warning.
	* genautomata.c: Fix typos in comments.
	(check_presence_pattern_sets): Fix typo in local variable.
	(output_description): Fix typo in output.
	* ggc-zone.c (ggc_pch_finish): Fix typo in error message.
	* hwint.h: Likewise.
	* matrix-reorg.c (check_allocation_function): Likewise.
	* omega.c (smooth_weird_equations): Likewise.
	* auto-inc-dec.c: Fix typos in comments.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* c-common.c: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-parser.c: Likewise.
	* c-pretty-print.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfglayout.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* coverage.c: Likewise.
	* dbxout.c: Likewise.
	* df-byte-scan.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dfp.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* dse.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-page.c: Likewise.
	* gimplify.c: Likewise.
	* gthr-lynx.h: Likewise.
	* haifa-sched.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa.c: Likewise.
	* loop-doloop.c: Likewise.
	* mips-tfile.c: Likewise.
	* mkmap-flat.awk: Likewise.
	* mkmap-symver.awk: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* opts.c: Likewise.
	* passes.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* pretty-print.h: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* ra-conflict.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* regclass.c: Likewise.
	* regs.h: Likewise.
	* reload.c: Likewise.
	* rtl-error.c: Likewise.
	* rtlanal.c: Likewise.
	* scan.h: Likewise.
	* sched-rgn.c: Likewise.
	* see.c: Likewise.
	* stmt.c: Likewise.
	* target.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-alias-warnings.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-vect-analyze.c: Likewise.
	* tree-vect-transform.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vn.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* unwind-dw2-fde.c: Likewise.
	* unwind.inc: Likewise.
	* value-prof.c: Likewise.
	* vmsdbgout.c: Likewise.

From-SVN: r136425
2008-06-06 05:42:00 +00:00
Kenneth Zadeck 908ff6a3eb tree-ssa-dse (max_stmt_uid): Removed.
2008-05-16  Kenneth Zadeck <zadeck@naturalbridge.com>

	* tree-ssa-dse (max_stmt_uid): Removed.
	(get_stmt_uid, dse_possible_dead_store_p, dse_optimize_stmt, 
	tree_ssa_dse): Encapsulate all uses of stmt_ann->uid.
	* tree-ssa-sccvn.c (compare_ops, init_scc_vn): Ditto.
	* function.h (cfun.last_stmt_uid): New field.
	* tree-flow-inline.h (set_gimple_stmt_uid, gimple_stmt_uid,
	gimple_stmt_max_uid, set_gimple_stmt_max_uid, 
	inc_gimple_stmt_max_uid): New functions.
	* tree-dfa.c (renumber_gimple_stmt_uids): New function.
	(create_stmt_ann): Initialize the ann->uid field.
	* tree-ssa-pre.c (compute_avail): Encapsulate the stmt_ann->uid
	with new calls.
	* tree-flow.h (renumber_gimple_stmt_uids): New function.

From-SVN: r135419
2008-05-16 09:38:13 -04:00
Richard Guenther f403a4a270 tree-ssa-dse.c (dse_possible_dead_store_p): Remove dead code.
2008-05-14  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-dse.c (dse_possible_dead_store_p): Remove dead code.
	Make sure to register the store if the use is a PHI_NODE.

From-SVN: r135298
2008-05-14 15:30:14 +00:00
Jan Hubicka 8ddbbcaea4 re PR other/35094 (RTL dump file letters hosed and partly undocumented)
* gcc.dg/20050811-2.c: Update dumping flags.
	* gcc.dg/sms-2.c: Update dumping flags.
	* gcc.dg/var-expand1.c: Update dumping flags.
	* gcc.dg/var-expand3.c: Update dumping flags.
	* gcc.dg/pr30957-1.c: Update dumping flags.
	* gcc.dg/20050811-1.c: Update dumping flags.
	* gcc.dg/cpp/cmdlne-dI-M.C: Do not xfail.
	* gcc.dg/cpp/cmdlne-dM-M.C: Do not xfail.

	PR other/35094
	* toplev.c (decode_d_option): Handle all CPP flags.
	* tree-vrp.c: Update tree_pass descriptors.
	* regrename.c: Update tree_pass descriptors.
	* fwprop.c: Update tree_pass descriptors.
	* doc/invoke.texi: Remove documentation of dropped -d? flags.
	* tree-into-ssa.c: Update tree_pass descriptors.
	* tree-dump.c: Update tree_pass descriptors.
	* tree-complex.c: Update tree_pass descriptors.
	* tree-dump.h: Update tree_pass descriptors.
	* see.c: Update tree_pass descriptors.
	* cgraphbuild.c: Update tree_pass descriptors.
	* tracer.c: Update tree_pass descriptors.
	* tree-loop-distribution.c: Update tree_pass descriptors.
	* cgraph.c: Update tree_pass descriptors.
	* postreload-gcse.c: Update tree_pass descriptors.
	* postreload.c: Update tree_pass descriptors.
	* tree-ssa-loop-ch.c: Update tree_pass descriptors.
	* tree-tailcall.c: Update tree_pass descriptors.
	* tree-pass.h (tree_opt_pass): Rename to ...
	(opt_pass) ... this one; add "type" field and remove letter field.
	(gimple_opt_pass, rtl_opt_pass, simple_ipa_opt_pass): New.
	(execute_pass_list, execute_ipa_pass_list, all_passes, all_ipa_passes,
	all_lowering_passes): Update declaration.
	* ipa-cp.c: Update tree_pass descriptors.
	* final.c: Update tree_pass descriptors.
	* omp-low.c: Update tree_pass descriptors.
	* tree-ssa-dse.c: Update tree_pass descriptors.
	* ipa-reference.c: Update tree_pass descriptors.
	* tree-ssa-uncprop.c: Update tree_pass descriptors.
	* auto-inc-dec.c: Update tree_pass descriptors.
	* reorg.c: Update tree_pass descriptors.
	* cgraphunit.c: Update tree_pass descriptors.
	* tree-ssa-copyrename.c: Update tree_pass descriptors.
	* tree-ssa-ccp.c: Update tree_pass descriptors.
	* df-core.c: Update tree_pass descriptors.
	* mode-switching.c: Update tree_pass descriptors.
	* tree-nomudflap.c: Update tree_pass descriptors.
	* modulo-sched.c: Update tree_pass descriptors.
	* ipa-pure-const.c: Update tree_pass descriptors.
	* cse.c: Update tree_pass descriptors.
	* web.c: Update tree_pass descriptors.
	* tree-stdarg.c: Update tree_pass descriptors.
	* tree-ssa-math-opts.c: Update tree_pass descriptors.
	* tree-ssa-dom.c: Update tree_pass descriptors.
	* tree-nrv.c: Update tree_pass descriptors.
	* tree-ssa-alias.c: Update tree_pass descriptors.
	* loop-init.c: Update tree_pass descriptors.
	* gimple-low.c: Update tree_pass descriptors.
	* ipa-inline.c: Update tree_pass descriptors.
	* tree-ssa-sink.c: Update tree_pass descriptors.
	* global.c: Update tree_pass descriptors.
	* ifcvt.c: Update tree_pass descriptors.
	* jump.c: Update tree_pass descriptors.
	* predict.c: Update tree_pass descriptors.
	* tree-ssa-loop.c: Update tree_pass descriptors.
	* recog.c: Update tree_pass descriptors.
	* dse.c: Update tree_pass descriptors.
	* tree-ssa-ifcombine.c: Update tree_pass descriptors.
	* tree-eh.c: Update tree_pass descriptors.
	* regmove.c: Update tree_pass descriptors.
	* local-alloc.c
	* function.c: Update tree_pass descriptors.
	* tree-vectorizer.c: Update tree_pass descriptors.
	* gcse.c: Update tree_pass descriptors.
	* ipa-type-escape.c: Update tree_pass descriptors.
	* tree-if-conv.c: Update tree_pass descriptors.
	* init-regs.c: Update tree_pass descriptors.
	* ipa.c: Update tree_pass descriptors.
	* tree-ssa-phiopt.c: Update tree_pass descriptors.
	* rtl-factoring.c: Update tree_pass descriptors.
	* lower-subreg.c: Update tree_pass descriptors.
	* bt-load.c: Update tree_pass descriptors.
	* tree-dfa.c: Update tree_pass descriptors.
	* except.c: Update tree_pass descriptors.
	* emit-rtl.c: Update tree_pass descriptors.
	* cfgexpand.c: Update tree_pass descriptors.
	* tree-cfgcleanup.c: Update tree_pass descriptors.
	* cfgcleanup.c: Update tree_pass descriptors.
	* tree-ssa-pre.c: Update tree_pass descriptors.
	* tree-sra.c: Update tree_pass descriptors.
	* tree-mudflap.c: Update tree_pass descriptors.
	* tree-ssa-copy.c: Update tree_pass descriptors.
	* cfglayout.c: Update tree_pass descriptors.
	* tree-ssa-forwprop.c: Update tree_pass descriptors.
	* tree-ssa-dce.c: Update tree_pass descriptors.
	* tree-ssa.c: Update tree_pass descriptors.
	* regclass.c: Update tree_pass descriptors.
	* integrate.c: Update tree_pass descriptors.
	* tree-optimize.c: Update tree_pass descriptors.
	* tree-ssa-phiprop.c: Update tree_pass descriptors.
	* tree-object-size.c: Update tree_pass descriptors.
	* combine.c: Update tree_pass descriptors.
	* tree-outof-ssa.c: Update tree_pass descriptors.
	* bb-reorder.c: Update tree_pass descriptors.
	* stack-ptr-mod.c: Update tree_pass descriptors.
	* var-tracking.c: Update tree_pass descriptors.
	* tree-profile.c: Update tree_pass descriptors.
	* tree-vect-generic.c: Update tree_pass descriptors.
	* reg-stack.c: Update tree_pass descriptors.
	* sched-rgn.c: Update tree_pass descriptors.
	* tree-ssa-structalias.c: Update tree_pass descriptors.
	* tree-cfg.c: Update tree_pass descriptors.
	* passes.c (current_pass): Update declaration.
	(finish_optimization_passes): Update.
	(all_passes, all_ipa_passes, all_lowering_passes): Update declaration.
	(register_one_dump_file, register_dump_files_1, next_pass_1):
 	Update arguments.
	(init_optimization_passes): Update handling of new types.
	(execute_one_pass, execute_pass_list, execute_ipa_pass_list): Update.
	* ipa-struct-reorg.c: Update tree_pass descriptors.
	* tree-ssa-reassoc.c: Update tree_pass descriptors.
	* combine-stack-adj.c: Update tree_pass descriptors.
	* cfgrtl.c: Update tree_pass descriptors.
	* dce.c: Update tree_pass descriptors.
	* tree-ssanames.c: Update tree_pass descriptors.

From-SVN: r133342
2008-03-19 11:22:40 +00:00
Richard Guenther 1bdcf037b3 re PR tree-optimization/35472 (tree DSE is broken)
2008-03-05  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/35472
	* tree-ssa-dse.c (dse_optimize_stmt): Do not delete a store
	whose single use_stmt has a overlapping set of loaded and
	stored symbols as that use_stmt might be a noop assignment then.

	* gcc.c-torture/execute/pr35472.c: New testcase.

From-SVN: r132899
2008-03-05 16:13:04 +00:00
Jakub Jelinek 3ec1a7379f re PR c++/34459 (incorrect code when compiled with optimization (-O1))
PR c++/34459
	* tree-ssa-dse.c (dse_optimize_stmt): Don't eliminate store if
	USE_STMT not only stores into the same object as STMT, but might
	read it too.

	* gcc.c-torture/execute/20071219-1.c: New test.

From-SVN: r131101
2007-12-20 15:40:33 +01:00
Kazu Hirata 84fbffb2c2 fixed-bit.c, [...]: Fix comment typos.
* config/fixed-bit.c, config/i386/cpuid.h, config/i386/i386.c,
	config/i386/i386.md, config/i386/sse.md, function.c, jump.c,
	modulo-sched.c, ra-conflict.c, toplev.c, tree-eh.c, tree-sra.c,
	tree-ssa-dse.c, tree-vect-analyze.c, tree-vect-patterns.c,
	tree-vect-transform.c: Fix comment typos.
	* doc/extend.texi: Fix a typo.

From-SVN: r129291
2007-10-14 01:36:18 +00:00
Richard Guenther e2e79a188a re PR tree-optimization/33563 (DSE removes non-dead store)
2007-09-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/33563
	* tree-ssa-dse.c (get_use_of_stmt_lhs): Rename to ...
	(get_kill_of_stmt_lhs): ... this.  Re-structure.  Handle
	aggregate stores.
	(dse_optimize_stmt): Call get_kill_of_stmt_lhs instead of
	get_use_of_stmt_lhs.

	* gcc.dg/torture/pr33563.c: New testcase.

From-SVN: r128815
2007-09-26 15:31:50 +00:00
Richard Guenther 15caa2abe9 re PR tree-optimization/30375 (tree-ssa-dse incorrectly removes struct initialization)
2007-09-26  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/30375
	PR tree-optimization/33560
	* tree-ssa-dse.c (get_use_of_stmt_lhs): Give up on uses
	with calls.

	Revert
	2006-05-22  Aldy Hernandez  <aldyh@redhat.com>

        * tree-ssa-dse.c (aggregate_vardecl_d): New.
        (dse_global_data): Add aggregate_vardecl field.
        (dse_possible_dead_store_p): New.
        Add prev_defvar variable.
        Allow immediate uses and previous immediate uses to differ
        if they are setting different parts of the whole.
        (get_aggregate_vardecl): New.
        (dse_record_partial_aggregate_store): New.
        (dse_whole_aggregate_clobbered_p): New.
        (dse_partial_kill_p): New.
        Call dse_maybe_record_aggregate_store().
        When checking whether a STMT and its USE_STMT refer to the
        same memory address, check also for partial kills that clobber
        the whole.
        Move some variable definitions to the block where they are used.
        (aggregate_vardecl_hash): New.
        (aggregate_vardecl_eq): New.
        (aggregate_vardecl_free): New.
        (aggregate_whole_store_p): New.
        (tree_ssa_dse): Initialize and free aggregate_vardecl.
        Mark which aggregate stores we care about.

	* gcc.dg/tree-ssa/complex-4.c: XFAIL.
	* gcc.dg/tree-ssa/complex-5.c: Likewise.
	* gcc.dg/tree-ssa/ssa-dse-9.c: Likewise.
	* gcc.dg/torture/pr30375.c: New testcase.
	* gcc.dg/torture/pr33560.c: New testcase.
	* gcc.dg/tree-ssa/pr30375.c: Likewise.

From-SVN: r128810
2007-09-26 11:55:17 +00:00
Jan Hubicka 201b2eadc4 passes.c (init_optimization_passes): Add simple dce and addressable passes.
* passes.c (init_optimization_passes): Add simple dce and addressable
	passes.
	* tree-ssa.c (execute_update_addresses_taken): New function.
	(pass_update_address_taken): New.
	* tree-ssa-dse.c (execute_simple_dse): New function.
	(pass_simple_dse): New.
	* tree-pass.h (pass_simple_dse, pass_update_address_taken): Declare.

From-SVN: r128239
2007-09-07 11:28:35 +00:00
Nick Clifton 9dcd6f09a3 Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
2007-07-26 08:37:01 +00:00
Thomas Neumann c22940cd7c tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the coding conventions.
* tree-ssa-alias-warnings.c (maybe_add_match): Cast according to the
	coding conventions.
	(add_key): Likewise.
	* tree-ssa.c (init_tree_ssa): Use type safe memory macros.
	* tree-ssa-ccp.c (ccp_fold_builtin): Avoid using C++ keywords as
	variable names.
	* tree-ssa-coalesce.c (find_coalesce_pair): Use type safe memory macros.
	(add_cost_one_coalesce): Likewise.
	* tree-ssa-copy.c (merge_alias_info): Avoid using C++ keywords as
	variable names. Rename orig to orig_name for consistency.
	* tree-ssa-dom.c (dom_thread_across_edge): Cast according to the coding
	conventions.
	(cprop_into_successor_phis): Avoid using C++ keywords as variable names.
	(record_equivalences_from_stmt): Likewise.
	* tree-ssa-dse.c (dse_initialize_block_local_data): Cast according to
	the coding conventions.
	(memory_ssa_name_same): Likewise.
	(dse_optimize_stmt): Likewise.
	(dse_record_phis): Likewise.
	(dse_finalize_block): Likewise.
	* tree-ssa-loop-im.c (outermost_invariant_loop_expr): Avoid using C++
	keywords as variable names.
	(may_move_till): Cast according to the coding conventions.
	(force_move_till_expr): Avoid using C++ keywords as variable names.
	(force_move_till): Cast according to the coding conventions.
	(memref_hash): Likewise.
	(memref_eq): Likewise.
	(gather_mem_refs_stmt): Likewise.
	* tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Avoid using C++
	keywords as variable names.
	(idx_find_step): Cast according to the coding conventions.
	(idx_record_use): Likewise.
	(find_depends): Likewise.
	(prepare_decl_rtl): Likewise.
	(mbc_entry_hash): Likewise.
	(mbc_entry_eq): Likewise.
	* tree-ssa-loop-niter.c (SWAP): Use the correct the type for tmp.
	(simplify_replace_tree): Avoid using C++ keywords as variable names.
	(idx_infer_loop_bounds): Cast according to the coding conventions.
	* tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
	* tree-ssa-math-opts.c (occ_new ): Likwise.
	* tree-ssanames.c (duplicate_ssa_name_ptr_info): Use type safe memory
	macros.
	* tree-ssa-operands.c (add_def_op): Avoid using C++ keywords as variable
	names.
	(add_use_op): Likewise.
	(add_vop): Likewise.
	(add_vuse_op): Likewise.
	(add_vdef_op): Likewise.
	(get_expr_operands): Likewise.
	(push_stmt_changes): Use type safe memory macros.
	* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Avoid using C++
	keywords as variable names.
	(conditional_replacement): Likewise.
	(minmax_replacement): Likewise.
	(abs_replacement): Likewise.
	* tree-ssa-pre.c (create_expression_by_pieces): Cast according to the
	coding conventions.
	(insert_fake_stores): Avoid using C++ keywords as variable names.
	* tree-ssa-reassoc.c (add_to_ops_vec): Cast according to the coding
	conventions.
	* tree-ssa-structalias.c (heapvar_lookup): Likewise.
	(heapvar_insert): Use type safe memory macros.
	(new_var_info): Cast according to the coding conventions.
	(new_constraint): Likewise.
	(remove_preds_and_fake_succs): Use type safe memory macros.
	* tree-ssa-threadupdate.c (thread_block): Cast according to the coding
	conventions.
	(thread_single_edge): Likewise.

From-SVN: r125504
2007-06-06 20:18:47 +00:00
Revital Eres 8a8b05f463 Extend dse
From-SVN: r124651
2007-05-13 07:49:47 +00:00
Aldy Hernandez 0f84b06679 re PR tree-optimization/30375 (tree-ssa-dse incorrectly removes struct initialization)
PR tree-optimization/30375
        * tree-ssa-dse.c (dse_possible_dead_store_p): Do not eliminate if
        LHS of statements is not the same.
        * testsuite/gcc.dg/tree-ssa/ssa-dse-10.c: New.

From-SVN: r122758
2007-03-09 20:05:08 +00:00
Diego Novillo 38635499e9 [multiple changes]
2006-12-11  Diego Novillo  <dnovillo@redhat.com>

	* doc/tree-ssa.texi: Update documentation for virtual operands
	and the use of push_stmt_changes/pop_stmt_changes.
	* doc/invoke.texi: Remove documentation for params
	global-var-threshold.
	Update documentation on max-aliased-vops.

	* tree-into-ssa.c: Cleanup comments, variables and
	spacing in various functions.
	(regs_to_rename): Declare.
	(mem_syms_to_rename): Declare.
	(dump_update_ssa): Declare.
	(debug_update_ssa): Declare.
	(dump_names_replaced_by): Declare.
	(debug_names_replaced_by): Declare.
	(dump_def_blocks): Declare.
	(debug_def_blocks): Declare.
	(dump_defs_stack): Declare.
	(debug_defs_stack): Declare.
	(dump_currdefs): Declare.
	(debug_currdefs): Declare.
	(mark_def_sites): Do not handle virtual operands.
	(compute_idf): Rename from find_idf.  Update users.
	(register_new_def): Make local.  Convert second argument
	to 'tree'.
	Use BLOCK_DEFS_STACK directly.
	If pushing a non-register, also push the underlying
	symbol.
	(rewrite_stmt): Do not handle virtual operands.
	(dump_tree_ssa): Call dump_def_blocks, dump_defs_stack,
	dump_currdefs and dump_tree_ssa_stats.
	(dump_tree_ssa_stats): Also dump REPL_TBL.
	(replace_use): Remove.  Update all users to call SET_USE
	instead.
	(rewrite_blocks): Move code to free memory to
	fini_ssa_renamer.
	(mark_def_site_blocks): Move initialization code to
	init_ssa_renamer.
	(init_ssa_renamer): New.
	(fini_ssa_renamer): New.
	(rewrite_into_ssa): Call them.
	(prepare_block_for_update): Process SSA_OP_ALL_USES first
	and SSA_OP_ALL_DEFS later.  Do not process virtual
	operands separately.
	(dump_update_ssa): Call dump_decl_set.
	(init_update_ssa): Initialize regs_to_rename and
	mem_syms_to_rename.
	Call init_ssa_renamer.
	(delete_update_ssa): Call fini_ssa_renamer.
	Free blocks_with_phis_to_rewrite.
	(mark_sym_for_renaming): If the variable has
	sub-variables, also mark them.
	If the variable belongs to a partition, also mark it.
	(mark_set_for_renaming): Call mark_sym_for_renaming on
	every symbol in the set.
	(switch_virtuals_to_full_rewrite): Call
	mark_set_for_renaming.
	(update_ssa): Separate syms_to_rename into regs_to_rename
	and mem_syms_to_rename.

	* tree-dump.c (dump_options): Add TDF_MEMSYMS.
	* tree-pretty-print.c (debug_generic_expr): Add TDF_MEMSYMS.
	(debug_generic_stmt): Likewise.
	(debug_tree_chain): Likewise.
	(dump_symbols): New.
	(dump_generic_node): Check for TDF_MEMSYMS.
	Handle MEMORY_PARTITION_TAG.
	If the statement references memory and TDF_MEMSYMS is
	given, call dump_symbols.
	Indicate default names with (D).
	(dump_vops): Update for new virtual operator format.

	* tree.c (init_ttree): Add MEMORY_PARTITION_TAG to
	tree_contains_struct.
	(tree_code_size): Handle MEMORY_PARTITION_TAG.
	(tree_node_structure): Likewise.
	(needs_to_live_in_memory): Handle SSA names.
	* tree.h (MTAG_P): Likewise.
	(struct tree_memory_partition_tag): Declare.
	(MPT_SYMBOLS): Define.
	(union tree_node): Add field 'mpt'.
	* treestruct.def (TS_MEMORY_PARTITION_TAG): Define.
	* tree.def (MEMORY_PARTITION_TAG): Define.

	* tree-pass.h (TDF_MEMSYMS): Define.

	* params.h (GLOBAL_VAR_THRESHOLD): Remove.

	* tree-ssa-alias.c: Include pointer-set.h
	(struct alias_map_d): Remove fields total_alias_vops,
	grouped_p and may_aliases.  Update all users.
	(struct mp_info_def): Declare.
	(mp_info_t): New type.
	(get_smt_for): Rename from get_tmt_for.  Update all
	users.
	(add_may_alias): Add argument ALREADY_ADDED.  If given,
	use it to avoid adding duplicate entries to alias sets.
	(replace_may_alias): Remove.  Update all users.
	(total_alias_vops_cmp): Remove.  Update all users.
	(group_aliases_into): Remove.  Update all users.
	(tree_pointer_compare): Remove.  Update all users.
	(compact_name_tags): Remove.  Update all users.
	(group_aliases): Remove.  Update all users.
	(mark_non_addressable): Move from tree-flow-inline.h.
	Remove the symbol from the partition holding it, if
	needed.
	(dump_mp_info): New.
	(debug_mp_info): New.
	(sort_mp_info): New.
	(create_partition_for): New.
	(rewrite_alias_set_for): New.
	(compute_memory_partitions): New.
	(compute_may_aliases): Call it.
	(init_alias_info): If computing aliases for the first
	time, mark every memory symbol for renaming.
	(have_common_aliases_p): New.
	(compute_flow_insensitive_aliasing): Call it.
	(setup_pointers_and_addressables): Do not cache
	num_referenced_vars.
	For register promoted symbols, mark their former
	partition for renaming.
	(maybe_create_global_var): Only create .GLOBAL_VAR if
	there are no call-clobbered variables and a mix of pure
	and non-pure functions were found.
	(may_alias_p): Tidy comments.
	(create_tag_raw): Remove unused variable new_type.
	(dump_alias_info): call dump_memory_partitions.
	(dump_points_to_info_for): Call dump_decl_set.
	(may_be_aliased): Tidy comments and formatting.

	* timevar.def (TV_MEMORY_PARTITIONING): Define.
	* tree-vectorizer.c (vect_memsyms_to_rename): Rename from
	vect_vnames_to_rename.  Set DECL_UIDs instead of SSA name
	versions in it.
	(slpeel_update_phi_nodes_for_guard1): Ignore memory PHIs.
	* tree-vect-transform.c (vect_transform_loop): Call
	mark_set_for_renaming with vect_memsyms_to_rename.
	* tree-flow-inline.h (zero_imm_uses_p): New.
	(memory_partition): New.
	(set_memory_partition): New.
	(factoring_name_p): New.
	(symbol_mem_tag): New.  Update every function that used
	to access the annotation directly.
	(set_symbol_mem_tag): Likewise.

	* tree-ssa-copy.c (may_propagate_copy): Allow copies
	between a partition and a symbol as long as the symbol
	belongs to the partition.
	(merge_alias_info): Ignore merge requests when memory
	partitions are involved.

	* tree-ssa.c (verify_ssa_name): Check that default
	definitions have empty defining statements.
	(verify_use): Remove argument IS_VIRTUAL.
	Don't call verify_ssa_name.
	(verify_phi_args): Call verify_ssa_name.
	(verify_flow_insensitive_alias_info): Handle MPTs.
	(verify_flow_sensitive_alias_info): Likewise.
	(verify_name_tags): Likewise.
	(verify_call_clobbering): Likewise.
	(verify_ssa): Check for VOPs only after aliasing
	information is available.
	Check virtuals and real operands separately.
	Call verify_ssa_name on every operand.
	(stmt_references_memory_p): Move to tree-ssa-operands.c.
	(walk_use_def_chains_1): Guard against NULL PHI
	arguments.

	* tree-ssa-operands.c (stmt_references_memory_p): Move from
	tree-ssa.c.
	(get_mpt_for): New.
	(dump_memory_partitions): New.
	(debug_memory_partitions): New.

	* tree-flow.h (struct var_ann_d): Add field mpt.
	(struct stmt_ann_d): Add bitfield references_memory.
	* Makefile.in (tree-ssa-structalias.o): Include
	pointer-set.h
	(tree-ssa-alias.o): Likewise.
	* tree-ssa-structalias.c: (update_alias_info): Use
	STORED_SYMS to determine which variables are being
	written to by the store operation.
	* tree-ssa-structalias.h (struct alias_info)
	<total_alias_vops>: Remove.  Update all users.
	<written_vars>: Change to a pointer set.  Update all
	users.
	<dereferenced_ptrs_store>: Likewise.
	<dereferenced_ptrs_load>: Likewise.
	(NUM_REFERENCES): Remove.  Update all users.
	(NUM_REFERENCES_CLEAR): Remove.  Update all users.
	(NUM_REFERENCES_INC): Remove.  Update all users.
	(NUM_REFERENCES_SET): Remove.  Update all users.

	* params.def (PARAM_GLOBAL_VAR_THRESHOLD): Remove.
	Update all users.
	(PARAM_MAX_ALIASED_VOPS): Set to 10.
	* tree-ssanames.c (make_ssa_name): Initialize
	SSA_NAME_IS_DEFAULT_DEF to 0.

2006-12-11  Aldy Hernandez  <aldyh@redhat.com>

	* tree-ssa-dse.c (aggregate_vardecl_d): New.
	(dse_global_data): Add aggregate_vardecl field.
	(dse_possible_dead_store_p): New.
	Add prev_defvar variable.
	Allow immediate uses and previous immediate uses to differ
	if they are setting different parts of the whole.
	(get_aggregate_vardecl): New.
	(dse_record_partial_aggregate_store): New.
	(dse_whole_aggregate_clobbered_p): New.
	(dse_partial_kill_p): New.
	(dse_optimize_stmt): Abstract code checking a possible dead store
	into new function dse_possible_dead_store_p().
	Call dse_maybe_record_aggregate_store().
	When checking whether a STMT and its USE_STMT refer to the
	same memory address, check also for partial kills that clobber
	the whole.
	Move some variable definitions to the block where they are used.
	(aggregate_vardecl_hash): New.
	(aggregate_vardecl_eq): New.
	(aggregate_vardecl_free): New.
	(aggregate_whole_store_p): New.
	(tree_ssa_dse): Initialize and free aggregate_vardecl.
	Mark which aggregate stores we care about.

2006-12-11  Andrew Macleod  <amacleod@redhat.com>

	* tree-ssa-operands.h (struct vuse_element_d): Declare.
	(vuse_element_t): Declare.
	(struct vuse_vec_d): Declare.
	(vuse_vec_p): Declare.
	(VUSE_VECT_NUM_ELEM): Define.
	(VUSE_VECT_ELEMENT_NC): Define.
	(VUSE_ELEMENT_PTR_NC): Define.
	(VUSE_ELEMENT_VAR_NC): Define.
	(VUSE_VECT_ELEMENT): Define.
	(VUSE_ELEMENT_PTR): Define.
	(VUSE_ELEMENT_VAR): Define.
	(struct maydef_optype_d) <use_var>: Remove.
	<use_ptr>: Remove.
	<usev>: Add.
	(struct vuse_optype_d) <kill_var>: Remove.
	<use_ptr>: Remove.
	<usev>: Add.
	(struct mustdef_optype_d) <kill_var>: Remove.
	<use_ptr>: Remove.
	<usev>: Add.
	(VUSE_OP_PTR): Add argument.  Use VUSE_ELEMENT_PTR.
	(VUSE_OP): Add argument.  Use VUSE_ELEMENT_PTR.
	(VUSE_NUM): Define.
	(VUSE_VECT): Define.
	(MAYDEF_OP_PTR): Add argument.  Use VUSE_OP_PTR.
	(MAYDEF_OP): Add argument.  Use VUSE_OP.
	(MAYDEF_NUM): Define.
	(MAYDEF_VECT): Define.
	(MUSTDEF_KILL_PTR): Use VUSE_OP_PTR.
	(MUSTDEF_KILL): Use VUSE_OP.
	(MUSTDEF_NUM): Define.
	(MUSTDEF_VECT): Define.
	(realloc_maydef): Declare.
	(realloc_vuse): Declare.
	(struct ssa_operand_iterator_d) <vuse_index>: Add.
	<mayuse_index>: Add.
	(LOADED_SYMS): Define.
	(STORED_SYMS): Define.
	(FOR_EACH_SSA_MUSTDEF_OPERAND): Call op_iter_next_mustdef.
	* tree-into-ssa.c: Adapt for multi-operand V_MAY_DEF and VUSE
	operators.
	* tree-pretty-print.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-flow-inline.h: Likewise.
	(op_iter_next_mustdef): New.
	* tree-ssa-operands.c: Likewise.
	(ALLOC_OPTYPE): Remove.
	Update all users.
	(alloc_def): New.
	(alloc_use): New.
	(alloc_maydef): New.
	(alloc_vuse): New.
	(alloc_mustdef): New.
	(realloc_maydef): New.
	(realloc_vuse): New.

2006-12-11  Aldy Hernandez  <aldyh@redhat.com>

	* tree-ssa-operands.c: Remove build_v_must_defs.
	(init_ssa_operands): Delete build_v_must_defs.
	(finalize_ssa_v_must_def_ops): Remove.
	(finalize_ssa_v_must_defs): Remove.
	(finalize_ssa_stmt_operands): Do not call
	finalize_ssa_v_must_defs.
	(start_ssa_stmt_operands): Do not check build_v_must_defs.
	(append_v_must_def): Delete.
	(copy_virtual_operands): Do not copy V_MUST_DEFs.
	(get_modify_expr_operands): Remove reference to V_MUST_DEF from
	comment.  Remove opf_kill_def.
	(build_ssa_operands): Remove references to v_must_defs.
	(copy_virtual_operands): Same.
	(copy_virtual_operands): Same.
	(fini_ssa_operands): Same.
	(free_ssa_operands): Same.
	(add_mustdef_op): Remove.
	Remove mustdef_optype_p.
	(alloc_mustdef): Remove.
	Remove references to V_MUST_DEFs in comment at top of file.
	(get_expr_operands): Remove opf_kill_def.
	(opf_kill_def): Remove.
	(add_virtual_operand): Remove opf_kill_def.
	(get_indirect_ref_operands): Same.
	(get_tmr_operands): Same.

	* tree-vectorizer.c (rename_variables_in_bb): Remove
	SSA_OP_ALL_KILLS.

	* tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Remove
	SSA_OP_ALL_KILLS.
	(check_loop_closed_ssa_stmt): Same.

	* tree-ssa.c (verify_def): Remove V_MUST_DEF from comment.
	(verify_use): Same.
	(verify_ssa): Remove V_MUST_DEFs traces.
	(verify_ssa): Remove SSA_OP_ALL_KILLS.

	* tree-into-ssa.c (mark_def_sites): Change SSA_OP_VMUSTDEF to
	SSA_OP_VMAYDEF.
	(rewrite_update_stmt): Remove SSA_OP_VIRTUAL_KILLS.
	(rewrite_stmt): Remove SSA_OP_ALL_KILLS.

	* tree-ssa-operands.h (struct stmt_operands_d): Remove V_MUST_DEF
	references.
	(MUSTDEF_OPS): Remove.
	(SSA_OP_VMUSTDEF): Remove.
	(FOR_EACH_SSA_MUSTDEF_OPERAND): Remove.
	(struct mustdef_optype_d): Remove.
	Remove mustdef_optype_p.
	(struct stmt_operands_d): Remove mustdef_ops.
	(ssa_operand_iterator_d): Remove mustdefs and mustkills.
	(SSA_OP_VIRTUAL_DEFS): Remove SSA_OP_VMUSTDEF.
	(MUSTDEF_RESULT_PTR): Remove.
	(MUSTDEF_RESULT): Remove.
	(MUSTDEF_KILL_PTR): Remove.
	(MUSTDEF_KILL): Remove.
	(MUSTDEF_NUM): Remove.
	(MUSTDEF_VECT): Remove.
	(SSA_OP_VIRTUAL_KILLS): Remove.
	(SSA_OP_ALL_VIRTUALS): Remove SSA_OP_VIRTUAL_KILLS.
	(SSA_OP_VMUSTKILL): Remove.
	(SSA_OP_ALL_KILLS): Remove.
	(SSA_OP_ALL_OPERANDS): Remove SSA_OP_ALL_KILLS.

	* tree-flow-inline.h (op_iter_init_def): Remove
	SSA_OP_VIRTUAL_KILLS.
	(delink_stmt_imm_use): Remove SSA_OP_ALL_KILLS.

	* tree-ssa-pre.c (compute_rvuse_and_antic_safe): Remove
	SSA_OP_VIRTUAL_KILLS.

	* tree-ssa-loop-im.c (determine_max_movement): Remove
	SSA_OP_VIRTUAL_KILLS.
	(gather_mem_refs_stmt): Same.
	(gather_mem_refs_stmt): Same.

	* tree-ssa-dce.c (mark_really_necessary_kill_operand_phis): Delete.
	(perform_tree_ssa_dce): Remove call to
	mark_really_necessary_kill_operand_phis.

	* tree-flow-inline.h (op_iter_init): Remove setting of mustdefs
	and mustkills.
	(op_iter_next_use): Do not check mustkills.
	(op_iter_next_def): Do not check mustdefs.
	(op_iter_next_tree): Do not check mustkills or mustdefs.
	(clear_and_done_ssa_iter): Do not set mustdefs or mustkills.
	(op_iter_next_maymustdef): Do not check mustkills.
	(op_iter_init_must_and_may_def): Remove SSA_OP_VMUSTKILL.
	(op_iter_init_mustdef): Remove.

	* tree-ssa-live.c (create_ssa_var_map): Change SSA_OP_VMUSTDEF to
	SSA_OP_VMAYDEF.

	* tree-ssa-dse.c (dse_optimize_stmt): Remove SSA_OP_VMUSTDEF.

	* tree-ssa-ccp.c: Remove V_MUST_DEF traces from comments.
	(visit_assignment): Same.

	* tree-ssa-copy.c (copy_prop_visit_assignment): Same.

	* tree-sra.c (mark_all_v_defs_1): Remove V_MUST_DEF from comment.

	* tree-outof-ssa.c (check_replaceable): Remove SSA_OP_VMUSTDEF.

	* tree-pretty-print.c (dump_vops): Remove printing of V_MUST_DEF.
	Remove kill_p variable.

	* tree-dfa.c (struct dfa_stats_d): Remove num_v_must_defs.
	(dump_dfa_stats): Remove code related to V_MUST_DEFs.
	(collect_dfa_stats_r): Do not set num_v_must_defs.
	(mark_new_vars_to_rename): Remove v_must_defs_{before,after}
	code.

	* tree-into-ssa.c (mark_def_sites): Change SSA_OP_VMUSTKILL to
	SSA_OP_VMAYUSE.

	* tree-ssa-pre.c (compute_rvuse_and_antic_safe): Remove
	SSA_OP_VMUSTDEF and SSA_OP_VMUSTKILL.

	* tree-ssa-propagate.c (stmt_makes_single_store): Remove
	SSA_OP_VMUSTDEF.

From-SVN: r119760
2006-12-11 20:48:51 -05:00
Aldy Hernandez 07beea0df3 Merge gimple-tuples-branch into mainline.
From-SVN: r119546
2006-12-05 17:26:05 +00:00
Jan Hubicka 5cd4ec7f24 Privatize SSA variables into gimple_df.
* tree-flow-inline.h
	(gimple_in_ssa_p, gimple_aliases_computed_p, gimple_addressable_vars,
	gimple_call_clobbered_vars, gimple_referenced_vars, gimple_global_var,
	gimple_nonlocal_all): New accessors.
	(first_referenced_var): Update.
	(mark_stmt_modified): Update.
	(is_call_clobbered): Update.
	(mark_call_clobbered): Update.
	(clear_call_clobbered): Update.
	(mark_non_addressable): Update.
	* tree-vrp.c (get_value_range): Update.
	* tree-into-ssa.c (in_ssa_p): Kill.
	(get_default_def_for): Update.
	(rewrite_into_ssa): Update.
	* tree-complex.c (init_parameter_lattice_values): Update.
	(update_complex_assignment): Update.
	(update_parameter_components): Update.
	(expand_complex_libcall): Update.
	(expand_complex_operations_1): Update.
	* tree-tailcall.c (arg_needs_copy_p): Update.
	(add_virtual_phis): Update.
	(tree_optimize_tail_calls_1): Update.
	* tree-ssa-dse.c (memory_ssa_name_same): Update.
	* tree-ssa-copyrename.c
	(copy_rename_partition_coalesce): Update.
	* tree-ssa-math-opts.c (execute_cse_reciprocals): Update.
	* tree-ssa-propagate.c (set_rhs): Update.
	* tree-ssa-alias.c (aliases_computed_p, call_clobbered_vars,
	addressable_vars, global_var):Kill.
	(set_initial_properties): Update.
	(init_alias_info): Update.
	(finalize_ref_all_pointers): Update.
	(setup_pointers_and_addressables): Update.
	(maybe_create_global_var): Update.
	(create_global_var): Update.
	(dump_points_to_info): Update.
	* function.h (struct gimple_df): Forward declare.
	(struct function): Add GIMPLE_DF field.
	* gimplify.c (force_gimple_operand): Update.
	* tree-dfa.c (referenced_vars, default_defs): KIll.
	(make_rename_temp): Update.
	(dump_variable): Update.
	(referenced_var_lookup): Update.
	(referenced_var_check_and_insert): Update.
	(default_def): Rename to ...
	(gimple_default_def): ... this one; accept cfun argument.
	(set_default_def): Update.
	* tree-cfgcleanup.c (modified_noreturn_calls): Kill.
	(cleanup_control_flow): Update.
	* tree-ssa-pre.c (compute_avail): Update
	* tree-ssa-live.c (calculate_live_on_entry): Update.
	* tree-ssa.c (verify_use): Update.
	(verify_call_clobbering): Update.
	(verify_call_clobbering): Update.
	(init_tree_ssa): Update.
	(delete_tree_ssa): Update.
	* tree-outof-ssa.c (coalesce_ssa_name): Update.
	(rewrite_out_of_ssa): Update.
	* tree-flow.h (gimple_df): New structure collecting dataflow variables.
	(FREE_SSANAMES, SSANAMES, MODIFIED_NORETURN_CALLS, DEFAULT_DEFS): New
	private accessors.
	(in_ssa_p, modified_noreturn_calls, referenced_vars, default_defs,
	ssa_names, global_var, nonlocal_all, call_clobbered_vars,
	addressable_vars, aliases_computed_p): Kill.
	(default_def): Rename to...
	(gimple_default_def): ... this one.
	(defaule_def_fn): Kill.
	(num_referenced_vars, ssa_names, num_ssa_names): Update.
	* tree-ssa-structalias.c (nonlocal_all): Kill.
	(get_constraint_exp_from_ssa_var): Update.
	(create_nonlocal_var): Update.
	(get_constraint_for): Update.
	(update_alias_info): Update.
	(find_global_initializers): Update.
	(intra_create_variable_infos): Update.
	(intra_create_variable_infos):
	(find_what_p_points_to): Update.
	(init_alias_heapvars): Update.
	* tree-cfg.c (remove_bb): Update.
	(gimplify_val): Update.
	* tree-ssa-reassoc.c (get_rank): Update.
	(init_reassoc): Update.
	* tree-ssanames.c: Do not include gt-tree-ssanames.h
	(ssa_names, free_ssanames): Kill.
	(init_ssanames): Update.
	(make_ssa_name): Update.
	(release_ssa_name): Update.
	(release_defs): Update.
	(replace_ssa_name_symbol): Update.
	* tree-ssa-operands.c (access_can_touch_variable): Update.
	(add_virtual_operand): Update.
	(add_call_clobber_ops): Update.
	(add_call_read_ops): Update.
	(get_call_expr_operands): Update.
	(get_asm_expr_operands): Update.

From-SVN: r119294
2006-11-28 14:42:37 +00:00
Aldy Hernandez 444704336a * tree-ssa-dse.c (dse_optimize_stmt): Remove unused variable USE.
From-SVN: r113274
2006-04-26 10:29:02 +00:00
Jeff Law bfc646bfc0 re PR tree-optimization/26854 (Inordinate compile times on large routines)
PR tree-optimization/26854
	* tree-ssa-dse.c (dse_optimize_stmt): Avoid num_imm_uses when
	checking for zero or one use.
	* tree-ssa-dom.c (propagate_rhs_into_lhs): Similarly.
	* tree-cfgcleanup.c (merge_phi_nodes): Similarly.
	* tree-ssa-reassoc.c (negate_value): Similarly.
	(reassociate_bb): Similarly.

From-SVN: r113120
2006-04-20 10:13:12 -06:00
Daniel Berlin c2924966db tree-vrp.c (execute_vrp): Return value.
2006-03-02  Daniel Berlin <dberlin@dberlin.org>

	* gcc/tree-vrp.c (execute_vrp): Return value.
	* gcc/regrename.c (rest_of_handle_regrename): Ditto.
	* gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto.
	* gcc/tree-complex.c (tree_lower_complex): Ditto.
	(tree_lower_complex_O0): Ditto.
	* gcc/tracer.c (rest_of_handle_tracer): Ditto.
	* gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto.
	* gcc/postreload.c (rest_of_handle_postreload): Ditto.
	* gcc/tree-tailcall.c (execute_tail_recursion): Ditto.
	(execute_tail_calls): Ditto.
	* gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* gcc/tree.h (init_function_for_compilation): Ditto.
	* gcc/ipa-cp.c (ipcp_driver): Ditto.
	* gcc/tree-scalar-evolution.c (scev_const_prop): Ditto.
	* gcc/tree-scalar-evolution.h (scev_const_prop): Ditto.
	* gcc/final.c (compute_alignments): Ditto.
	(rest_of_handle_final): Ditto.
	(rest_of_handle_shorten_branches): Ditto.
	(rest_of_clean_state): Ditto.
	* gcc/omp-low.c (execute_expand_omp): Ditto.
	(execute_lower_omp): Ditto.
	* gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto.
	* gcc/ipa-reference.c (static_execute): Ditto.
	* gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto.
	* gcc/reorg.c (rest_of_handle_delay_slots): Ditto.
	(rest_of_handle_machine_reorg): Ditto.
	* gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto.
	* gcc/flow.c (recompute_reg_usage): Ditto.
	(rest_of_handle_remove_death_notes): Ditto.
	(rest_of_handle_life): Ditto.
	(rest_of_handle_flow2): Ditto.
	* gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto.
	* gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto.
	(do_ssa_store_ccp): Ditto.
	(execute_fold_all_builtins): Ditto.
	* gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto.
	* gcc/modulo-sched.c (rest_of_handle_sms): Ditto.
	* gcc/ipa-pure-const.c (static_execute): Ditto.
	* gcc/cse.c (rest_of_handle_cse): Ditto.
	(rest_of_handle_cse2): Ditto.
	* gcc/web.c (rest_of_handle_web): Ditto.
	* gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto.
	* gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto.
	* gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto.
	* gcc/tree-nrv.c (tree_nrv): Ditto.
	(execute_return_slot_opt): Ditto.
	* gcc/tree-ssa-alias.c (compute_may_aliases): Ditto.
	(create_structure_vars): Ditto.
	* gcc/loop-init.c (rtl_loop_init): Ditto.
	(rtl_loop_done): Ditto.
	(rtl_move_loop_invariants): Ditto.
	(rtl_unswitch): Ditto.
	(rtl_unroll_and_peel_loops): Ditto.
	(rtl_doloop): Ditto.
	* gcc/gimple-low.c (lower_function_body): Ditto.
	(mark_used_blocks): Ditto.
	* gcc/tree-ssa-sink.c (execute_sink_code): Ditto.
	* gcc/ipa-inline.c (cgraph_decide_inlining): Ditto.
	(cgraph_early_inlining): Ditto.
	* gcc/global.c (rest_of_handle_global_alloc): Ditto.
	* gcc/jump.c (cleanup_barriers): Ditto.
	(purge_line_number_notes): Ditto.
	* gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto.
	(rest_of_handle_if_after_reload): Ditto.
	* gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto.
	(tree_ssa_loop_im): Ditto.
	(tree_ssa_loop_unswitch): Ditto.
	(tree_vectorize): Ditto.
	(tree_linear_transform): Ditto.
	(tree_ssa_loop_ivcanon): Ditto.
	(tree_ssa_empty_loop): Ditto.
	(tree_ssa_loop_bounds): Ditto.
	(tree_complete_unroll): Ditto.
	(tree_ssa_loop_prefetch): Ditto.
	(tree_ssa_loop_ivopts): Ditto.
	(tree_ssa_loop_done): Ditto.
	* gcc/predict.c (tree_estimate_probability): Ditto.
	* gcc/recog.c (split_all_insns_noflow): Ditto.
	(rest_of_handle_peephole2): Ditto.
	(rest_of_handle_split_all_insns): Ditto.
	* gcc/tree-eh.c (lower_eh_constructs): Ditto.
	* gcc/regmove.c (rest_of_handle_regmove): Ditto.
	(rest_of_handle_stack_adjustments): Ditto.
	* gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto.
	* gcc/function.c (instantiate_virtual_regs): Ditto.
	(init_function_for_compilation): Ditto.
	(rest_of_handle_check_leaf_regs): Ditto.
	* gcc/gcse.c (rest_of_handle_jump_bypass): Ditto.
	(rest_of_handle_gcse): Ditto.
	* gcc/ipa-type-escape.c (type_escape_execute): Ditto.
	* gcc/alias.c (rest_of_handle_cfg): Ditto.
	* gcc/tree-if-conv.c (main_tree_if_conversion): Ditto.
	* gcc/profile.c (rest_of_handle_branch_prob): Ditto.
	* gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto.
	* gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto.
	* gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto
	* gcc/tree-dfa.c (find_referenced_vars): Ditto.
	* gcc/except.c (set_nothrow_function_flags): Ditto.
	(convert_to_eh_region_ranges): Ditto.
	(rest_of_handle_eh): Ditto.
	* gcc/emit-rtl.c (unshare_all_rtl): Ditto.
	(remove_unnecessary_notes): Ditto.
	* gcc/except.h (set_nothrow_function_flags): Ditto.
	(convert_to_eh_region_ranges): Ditto.
	* gcc/cfgexpand.c (tree_expand_cfg): Ditto.
	* gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto.
	* gcc/tree-ssa-pre.c (do_pre): Ditto.
	(execute_fre): Ditto.
	* gcc/cfgcleanup.c (rest_of_handle_jump): Ditto.
	(rest_of_handle_jump2): Ditto.
	* gcc/tree-sra.c (tree_sra): Ditto.
	* gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto.
	(execute_mudflap_function_decls): Ditto.
	* gcc/tree-ssa-copy.c (do_copy_prop): Ditto.
	(do_store_copy_prop): Ditto.
	* gcc/ipa-prop.h (ipcp_driver): Ditto.
	* gcc/cfglayout.c (insn_locators_initialize): Ditto.
	* gcc/tree-ssa-forwprop.c
	(tree_ssa_forward_propagate_single_use_vars): Ditto.
	* gcc/cfglayout.h (insn_locators_initialize): Ditto.
	* gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto.
	* gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto.
	(execute_late_warn_uninitialized): Ditto.
	* gcc/rtl.h (cleanup_barriers): Ditto.
	(split_all_insns_noflow): Ditto.
	(purge_line_number_notes): Ditto.
	(unshare_all_rtl): Ditto.
	(remove_unnecessary_notes): Ditto.
	(recompute_reg_usage): Ditto.
	(variable_tracking_main): Ditto.
	* gcc/integrate.c (emit_initial_value_sets): Ditto.
	* gcc/integrate.h (emit_initial_value_sets): Ditto.
	* gcc/tree-optimize.c (execute_free_datastructures): Ditto
	(execute_free_cfg_annotations): Ditto.
	(execute_fixup_cfg): Ditto.
	(execute_cleanup_cfg_pre_ipa): Ditto.
	(execute_cleanup_cfg_post_optimizing): Ditto.
	(execute_init_datastructures): Ditto.
	* gcc/tree-object-size.c (compute_object_sizes): Ditto.
	* gcc/combine.c (rest_of_handle_combine): Ditto.
	* gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto.
	* gcc/bb-reorder.c (duplicate_computed_gotos): Ditto.
	(rest_of_handle_reorder_blocks): Ditto.
	(rest_of_handle_partition_blocks): Ditto.
	* gcc/var-tracking.c (variable_tracking_main): Ditto.
	* gcc/tree-profile.c (tree_profiling): Ditto.
	* gcc/tree-vect-generic.c (expand_vector_operations): Ditto.
	* gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto.
	* gcc/sched-rgn.c (rest_of_handle_sched): Ditto.
	(rest_of_handle_sched2): Ditto.
	* gcc/basic-block.h (free_bb_insn): Ditto.
	* gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto.
	* gcc/tree-cfg.c (execute_build_cfg): Ditto.
	(remove_useless_stmts): Ditto.
	(split_critical_edges): Ditto.
	(execute_warn_function_return): Ditto.
	(execute_warn_function_noreturn): Ditto.
	* gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto.
	* gcc/cfgrtl.c (free_bb_for_insn): Ditto.
	* gcc/passes.c (execute_one_pass): Run additional
	todos returned by execute function.
	* gcc/tree-pass.h (struct tree_opt_pass): Make execute
	return a value.

From-SVN: r111643
2006-03-02 19:00:11 +00:00
Jeff Law 736432eedb tree-cfg.c (bsi_replace): Rename final argument from PRESERVE_EH_INFO to UPDATE_EH_INFO.
* tree-cfg.c (bsi_replace): Rename final argument from
	PRESERVE_EH_INFO to UPDATE_EH_INFO.  Fix typo in last
	change (stmt -> orig_stmt).
	* tree-eh.c (verify_eh_throw_stmt_node): New function.
	(bsi_remove): Add new argument.  Remove EH information
	if requested.
	(verify_eh_throw_table_statements): New function.
	(bsi_remove): Add new argument REMOVE_EH_INFO.  All callers
	updated.
	* tree-optimize.c (execute_free_cfg_annotations): Verify
	the EH throw statement table after removing annotations.
	* except.h (verify_eh_throw_table_statements): Prototype.
	* tree-flow.h (bsi_remove): Update prototype.
	* tree-vrp.c (remove_range_assertions): Add new argument to
	bsi_remove call.
	* tree-ssa-loop-im.c (move_computations_stmt): Likewise.
	* tree-complex.c (expand_complex_div_wide): Likewise.
	* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Likewise
	* tree-tailcall.c (eliminate_tailcall): Likewise.
	* tree-ssa-dse.c (dse_optimize_stmt): Likewise.
	* tree-ssa-loop-ivopts.c (remove_statement): Likewise.
	* tree-nrv.c (tree_nrv): Likewise.
	* tree-vectorizer.c (slpeel_make_loop_iterate_ntimes): Likewise.
	* tree-if-conv.c (tree_if_convert_cond_expr): Likewise.
	(combine_blocks): Likewise.
	* tree-ssa-phiopt.c (replace_phi_edge_with_variable): Likewise.
	* tree-cfgcleanup.c (cleanup_ctrl_expr_graph): Likewise.
	(cleanup_control_flow): Likewise.
	(remove_forwarder_block): Likewise.
	* tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
	* tree-sra.c (sra_replace): Likewise.
	* tree-ssa-forwprop.c (forward_propagate_into_cond): Likewise.
	(forward_propagate_single_use_vars): Likewise.
	* tree-ssa-dce.c (remove_dead_stmt): Likewise.
	* tree-inline.c (expand_call_inline): Likewise.
	* tree-vect-transform.c (vect_transform_loop): Likewise.
	* tree-outof-ssa.c (rewrite_trees): Likewise.
	* tree-cfg.c (make_goto_expr_edges): Likewise.
	(cleanup_dead_labels): Likewise.
	(tree_merge_blocks, remove_bb, disband_implicit_edges): Likewise.
	(bsi_move_before, bsi_move_after): Likewise.
	(bsi_move_to_bb_end, try_redirect_by_replacing_jump): Likewise
	(tree_redirect_edge_and_branch, tree_split_block): Likewise.

From-SVN: r109421
2006-01-06 10:50:26 -07:00
Jeff Law 7d48c9e2cc tree-ssa-dse.c (dse_optimize_stmt): Correctly handle PHI nodes which represent a use and definition of the same...
* tree-ssa-dse.c (dse_optimize_stmt): Correctly handle PHI nodes which
	represent a use and definition of the same SSA_NAME.

	* gcc.dg/tree-ssa/ssa-dse-8.c: New test.

From-SVN: r108630
2005-12-16 00:03:12 -07:00
Daniel Jacobowitz 6c14b137a9 gcc/
* tree-ssa-dse.c (struct address_walk_data, memory_ssa_name_same)
	(memory_address_same): New.
	(dse_optimize_stmt): Call memory_address_same.
gcc/testsuite/
	* gcc.c-torture/execute/20051110-1.c,
	gcc.c-torture/execute/20051110-2.c: New tests.

From-SVN: r106807
2005-11-11 23:23:15 +00:00
Andrew Pinski 8d09949866 tree-ssa-dse.c (dse_optimize_stmt): Fix up all of V_MAY_DEF and V_MUST_DEF instead of just the first_use_p.
2005-09-12  Andrew Pinski  <pinskia@physics.uc.edu>

        * tree-ssa-dse.c (dse_optimize_stmt): Fix up all of V_MAY_DEF and
        V_MUST_DEF instead of just the first_use_p.
        Don't mark the virtual variables for renaming on the statement which
        is being removed.
        (pass_dse): Remove TODO_update_ssa.

From-SVN: r104172
2005-09-12 06:56:07 -07:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Kaveh R. Ghazi 4c714dd4a6 basic-block.h, [...]: Don't include errors.h and include toplev.h if necessary.
* basic-block.h, bb-reorder.c, c-gimplify.c, config/darwin.c,
	config/rs6000/rs6000-c.c, dominance.c, gimple-low.c, gimplify.c,
	lambda-code.c, lambda-trans.c, tree-browser.c, tree-cfg.c,
	tree-chrec.c, tree-data-ref.c, tree-dfa.c, tree-eh.c,
	tree-if-conv.c, tree-into-ssa.c, tree-loop-linear.c,
	tree-mudflap.c, tree-nomudflap.c, tree-outof-ssa.c,
	tree-pretty-print.c, tree-scalar-evolution.c, tree-sra.c,
	tree-ssa-ccp.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c,
	tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-live.c,
	tree-ssa-operands.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
	tree-ssa-propagate.c, tree-ssa-sink.c, tree-ssa-threadupdate.c,
	tree-ssa-uncprop.c, tree-ssa.c, tree-vect-analyze.c,
	tree-vect-transform.c, tree-vectorizer.c, vec.c: Don't include
	errors.h and include toplev.h if necessary.

	* rtl.c, varray.c: If we're compiling as a GENERATOR_FILE, include
	errors.h otherwise include toplev.h.

	* Makefile.in: Update dependencies.

ada:
	* misc.c: Don't include errors.h.

fortran:
	* fortran/trans-decl.c: Don't include errors.h.
	* fortran/Make-lang.in: Updates dependencies.

java:
	* java/verify-glue.c: Don't include errors.h and include toplev.h.
	* java/Make-lang.in: Updates dependencies.

treelang:
	* treelang/lex.l, treelang/parse.y: Don't include errors.h and
	include toplev.h.
	* treelang/Make-lang.in: Updates dependencies.

From-SVN: r100420
2005-06-01 02:51:18 +00:00
Kazu Hirata ea497bb84c domwalk.c (walk_dominator_tree, [...]): Use VEC instead of VARRAY.
* domwalk.c (walk_dominator_tree, init_walk_dominator_tree,
	fini_walk_dominator_tree): Use VEC instead of VARRAY.
	* domwalk.h (dom_walk_data): Change the type of
	block_data_stack and free_block_data to VEC(void_p,heap)*.
	* tree-ssa-dse.c (dse_initialize_block_local_data,
	dse_optimize_stmt, dse_record_phis, dse_finalize_block): Use
	VEC instead of VARRAY.

From-SVN: r100281
2005-05-27 22:43:05 +00:00
Kazu Hirata 0fa2e4df47 c-common.c, [...]: Fix comment typos.
* c-common.c, c-parser.c, cfgbuild.c, cfghooks.c, cfghooks.h,
	cfgrtl.c, cgraphunit.c, ddg.c, expr.h, gcse.c, ggc-page.c,
	ggc-zone.c, gimplify.c, ipa-inline.c, longlong.h, targhooks.c,
	tree-flow-inline.h, tree-pass.h, tree-ssa-dse.c,
	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c,
	tree-ssa-operands.c, tree-vect-analyze.c,
	tree-vect-transform.c, tree-vectorizer.c, tree.c,
	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
	config/frv/frv.md, config/i386/i386.c, config/i386/sse.md,
	config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
	config/mcore/mcore.c, config/mips/mips.c, config/mips/mips.md,
	config/rs6000/darwin-ldouble.c, config/rs6000/rs6000.c,
	config/rs6000/rs6000.h, config/sh/sh.c, config/sh/sh.md,
	config/sh/ushmedia.h, config/sparc/sparc.c,
	config/sparc/sparc.md, config/stormy16/stormy-abi: Fix comment
	typos.  Follow spelling conventions.
	* doc/invoke.texi, doc/tm.texi, doc/tree-ssa.texi: Fix typos.
	Follow spelling conventions.

From-SVN: r100218
2005-05-26 18:15:27 +00:00
Andrew MacLeod f47c96aac5 lambda-code.c (gcc_loop_to_lambda_loop, [...]): Use generic operand interface.
2005-05-03  Andrew MacLeod  <amacleod@redhat.com>

	* lambda-code.c (gcc_loop_to_lambda_loop,
	lambda_loopnest_to_gcc_loopnest, phi_loop_edge_uses_def,
	stmt_is_bumper_for_loop, perfect_nest_p, replace_uses_of_x_with_y): Use
	generic operand interface.
	* tree-data-ref.c (find_data_references_in_loop): Use generic interface.
	* tree-dfa.c (collect_dfa_stats_r, mark_new_vars_to_rename): Use
	generic operand interface.
	* tree-flow-inline.h (delink_imm_use, link_imm_use_to_list,
	link_imm_use, link_imm_use_stmt, relink_imm_use, relink_imm_use_stmt,
	next_safe_imm_use, has_zero_uses, has_single_use, single_imm_use,
	num_imm_uses): Use ssa_use_operand_t.
	(get_def_ops, get_use_ops, get_v_may_def_ops, get_vuse_ops,
	get_v_must_def_ops): Delete.
	(get_def_from_ptr, get_phi_result_ptr): Get def directly now.
	(get_use_op_ptr, get_def_op_ptr, get_v_may_def_result_ptr,
	get_v_may_def_op_ptr, get_vuse_op_ptr, get_v_must_def_result_ptr,
	get_v_must_def_kill_ptr): Delete.
	(delink_stmt_imm_use): Move and use new operand interface.
	(op_iter_next_use, op_iter_next_def, op_iter_next_tree, op_iter_init,
	op_iter_next_tree): Use new operand implementation.
	(clear_and_done_ssa_iter): New.  Initialize a blank operand iterator.
	(op_iter_init_use, op_iter_init_def, op_iter_init_tree): Add iterator
	type check.
	(op_iter_next_mustdef, op_iter_next_maydef,
	op_iter_next_must_and_may_def): Delete. Replace with...
	(op_iter_next_maymustdef): New.  Combine must and may next operations.
	(op_iter_init_maydef, op_iter_init_mustdef,
	op_iter_init_must_and_may_def): Use new interface.
	(single_ssa_tree_operand ): New.  Process single operands only as trees.
	(single_ssa_use_operand): New.  Process single operands only as uses.
	(single_ssa_def_operand): New.  Process single operands only as defs.
	(zero_ssa_operands): New.  Return TRUE if there are zero operands of the
	specified types.
	(num_ssa_operands): New.  Count the number of specified operands.
	(compare_ssa_operands_equal): New.  Compare two statements' operands.
	(single_phi_def): New.  Return true if PHI has one def of the specified
	operand type.
	(op_iter_init_phiuse): New.  Initialize the iterator for PHI arguments.
	(op_iter_init_phidef): New.  Initialize the iterator for the PHI def.
	* tree-flow.h (struct immediate_use_iterator_d): Use ssa_use_operand_t.
	(struct stmt_ann_d): Operands field no longer require GTY().
	(vn_compute, vn_lookup_or_add, vn_add, vn_lookup): Change prototype.
	* tree-into-ssa.c (mark_def_sites): Use SSA_OP_VMUSTKILL.
	* tree-outof-ssa.c (check_replaceable, find_replaceable_in_bb,
	dump_replaceable_exprs, rewrite_trees): Use generic interface.
	* tree-phinodes.c (make_phi_node, release_phi_node, resize_phi_node):
	Use use_operand_p instead of ssa_imm_use_t *.
	* tree-pretty-print.c (dump_vops): check if operands are active before
	dumping virtual operands.
	* tree-sra.c (sra_walk_function): Use ZERO_SSA_OPERANDS.
	* tree-ssa-ccp.c (likely_value): Use ZERO_SSA_OPERANDS.
	(ccp_fold): Use new interface.
	(ccp_visit_stmt): Remove unused variables and code.
	(convert_to_gimple_builtin): Insert statements before calling
	mark_new_vars_to_rename.
	* tree-ssa-copy.c (stmt_may_generate_copy): Use ZERO_SSA_OPERANDS.
	(copy_prop_visit_cond_stmt): Use generic interface.
	* tree-ssa-dom.c (struct expr_hash_elt): Use stmt pointer, not the
	annotation in table.
	(thread_across_edge): Use generic interface.
	(initialize_hash_element): Initialzie with stmt, not annotation.
	(eliminate_redundant_computations): Use generic interface.
	(record_equivalences_from_stmt): Pass stmt, not annotation.
	(avail_expr_hash, real_avail_expr_hash, avail_expr_eq): Use generic
	interface.
	* tree-ssa-dse.c (dse_optimize_stmt): Use ZERO_SSA_OPERANDS.
	* tree-ssa-loop-ivopts.c (find_invariants_stmt,
	find_interesting_uses_stmt, protect_loop_closed_ssa_form_use): Use
	generic operand interface.
	* tree-ssa-loop-niter.c (chain_of_csts_start, get_val_for): Use generic
	interface.
	* tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Use Generic operand
	Interface.
	* tree-ssa-operands.c (struct opbuild_list_d): New.  Operand build type.
	(build_defs, build_uses, build_v_may_defs, build_vuses,
	build_v_must_defs): Change type to struct opbuild_list_d.
	(ops_active): New.  Operands active boolean.
	(operand_memory, operand_memory_index): New.  Operand memory managers.
	(allocate_def_optype, allocate_use_optype, allocate_v_may_def_optype,
	allocate_vuse_optype, allocate_v_must_def_optype): Delete.
	(free_uses, free_defs, free_vuses, free_v_may_defs, free_v_must_defs):
	Change from functions to static variable list heads.
	(opbuild_initialize_virtual): New.  Initialize a virtual build list.
	(opbuild_initialize_real): New.  Initialize a virtual build list.
	(opbuild_free): New.  Free a build list.
	(opbuild_num_elems): New.  Number of items in a list.
	(opbuild_append_real): New.  Add a real (tree *) operand.
	(opbuild_append_virtual): New.  Add and sort a virtual (tree) operand.
	(opbuild_first): New.  Return first element index in a list.
	(opbuild_next): New.  Return next element in a list.
	(opbuild_elem_real): New.  Return real element.
	(opbuild_elem_virtual): New.  Return virtual element.
	(opbuild_elem_uid): New.  Return UID of virtual element.
	(opbuild_clear): New.  Reset an operand list.
	(opbuild_remove_elem): New.  Remove an element form a list.
	(ssa_operands_active): New.  Return true if operand cache is active.
	(init_ssa_operands, fini_ssa_operands): Initialize new implementation.
	(ssa_operand_alloc): New.  Allocate memory from an operand chunk.
	(correct_use_link): Use use_operand_p.
	(finalize_ssa_uses, finalize_ssa_v_may_defs, finalize_ssa_defs,
	finalize_ssa_vuses, finalize_ssa_v_must_defs): New implmentation.
	(cleanup_v_may_defs): Use new implmentation.
	(finalize_ssa_stmt_operands, start_ssa_stmt_operands): New
	implementation.
	(append_def, append_use, append_v_may_def, append_vuse,
	append_v_must_def): Call opbuild_append routine instead of using varray.
	(build_ssa_operands): Simplify to simply use stmt, don't maintain a
	global parse_old_ops variable.
	(free_ssa_operands): New implementation.
	(update_stmt_operands): Move.  Change argument to build_ssa_operands.
	(copy_virtual_operands): Move. New generic implementation.
	(create_ssa_artficial_load_stmt): Move. New implementation.
	(swap_tree_operands): Update for new implementation.
	(get_expr_operands): Add stmt parameter to calls to swap_tree_operands.
	(add_call_clobber_ops, add_call_read_ops): Initialize opbuild list
	rather than a varray.
	(verify_imm_links): Use use_operand_p.
	(dump_immediate_uses_for): If the immediate use variable is a virtual
	variable, show the virtual ops in the stmt.
	* tree-ssa-operands.h (def_operand_p): No longer a structure.
	(NULL_DEF_OPERAND_P): Now a #define.
	(def_optype_d, use_optype_d, v_def_use_operand_type, v_may_def_optype_d,
	vuse_operand_type, vuse_optype_d, v_must_def_optype_d): Delete.
	(def_optype_d, use_optype_d, maydef_optype_d, vuse_optype_d,
	mustdef_optype_d): New.  Use Linked list representation.
	(SSA_OPERAND_MEMORY_SIZE): New.  Size of operand memory chunk.
	(struct ssa_operand_memory_d): New.  Allocated Chunk node.
	(struct stmt_operands_d): Change to new pointers that are not GTY.
	(STMT_USE_OPS, NUM_USES, SET_USE_OP, STMT_DEF_OPS, NUM_DEFS, SET_DEF_OP,
	STMT_V_MAY_DEF_OPS, NUM_V_MAY_DEFS, SET_V_MAY_DEF_RESULT,
	SET_V_MAY_DEF_OP, STMT_VUSE_OPS, NUM_VUSES, SET_VUSE_OP,
	STMT_V_MUST_DEF_OPS, NUM_V_MUST_DEFS, SET_V_MUST_DEF_RESULT,
	SET_V_MUST_DEF_KILL): Delete.
	(V_MAY_DEF_OPS, V_MAY_DEF_RESULT_PTR, V_MAY_DEF_RESULT,
	V_MAY_DEF_OP_PTR, V_MAY_DEF_OP): Rename to MAYDEF_*.
	(V_MUST_DEF_OPS, V_MUST_DEF_RESULT_PTR, V_MUST_DEF_RESULT,
	V_MUST_DEF_KILL_PTR, V_MUST_DEF_KILL): Rename to MUSTDEF_*.
	(enum ssa_op_iter_type): Operand iterator typechecking values.
	(struct ssa_operand_iterator_d): Use linked lists of operands.
	(SSA_OP_VMUSTDEFKILL): Rename to SSA_OP_VMUSTKILL.
	(FOR_EACH_SSA_MAYDEF_OPERAND, FOR_EACH_SSA_MUSTDEF_OPERAND,
	FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND): Use op_iter_next_maymustdef.
	(FOR_EACH_PHI_ARG): New.  Iterate over PHI arguments.
	(FOR_EACH_PHI_OR_STMT_USE): New.  Iterate over PHI or stmt uses.
	(FOR_EACH_PHI_OR_STMT_DEF): New.  Iterate over PHI or stmt defs.
	(SINGLE_SSA_TREE_OPERAND, SINGLE_SSA_USE_OPERAND,
	SINGLE_SSA_DEF_OPERAND, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): New.
	* tree-ssa-opfinalize.h: New.  Function templates for expansion.
	(FINALIZE_ALLOC): Expands into alloc_def, alloc_use, alloc_maydef,
	alloc_vuse, and alloc_mustdef.
	(FINALIZE_FUNC): Expands into finalize_ssa_def_ops,
	finalize_ssa_use_ops, finalize_ssa_v_may_def_ops, finalize_ssa_vuse_ops,
	and finalize_ssa_v_must_def_ops.
	* tree-ssa-pre.c (add_to_sets): Pass tree to vn_add.
	(create_value_expr_from): Use stmt not vuse_optype as a parameter. Pass
	stmt around.
	(compute_avail): Use generic iterator interface.
	* tree-ssa-propagate.c (first_vdef): Use generic operand interface.
	(stmt_makes_single_load, stmt_makes_single_store): Use
	ZERO_SSA_OPERANDS.
	* tree-ssa-sink.c (is_hidden_global_store): Use ZERO_SSA_OPERANDS.
	(statement_sink_location): Use generic interface.
	* tree-ssa.c (verify_ssa):  Use %p in fprintf.  Use generic interface.
	(delete_tree_ssa): Don't call release_defs.  Call release_ssa_name and
	reset the immediate use link nodes.
	(stmt_references_memory_p): Use ZERO_SSA_OPERANDS.
	* tree-ssanames.c (make_ssa_name): Use use_operand_p.
	* tree-tailcall.c (find_tail_calls): Use ZERO_SSA_OPERANDS.
	(eliminate_tail_call): Use generic operand interface.
	* tree-vect-analyze.c (vect_analyze_data_refs): Use ZERO_SSA_OPERANDS.
	(vect_mark_relevant, vect_mark_stmts_to_be_vectorized): Use generic
	interface.
	* tree-vect-transform.c (update_vuses_to_preheader): Use generic
	interface.
	* tree-vectorizer.c (rename_variables_in_bb): Use generic interface.
	* tree-vn.c (struct val_expr_pair_d): Cache statment pointer instead of
	vuse_optype.
	(vn_compute, val_expr_pair_hash, vn_add, vn_lookup, vn_lookup_or_add):
	Use statement pointer instead of vuse_optype.  Use generic interface.
	* tree-vrp.c (maybe_add_assert_expr): Use generic interface.
	(stmt_interesting_for_vrp, vrp_visit_stmt): Use ZERO_SSA_OPERANDS.
	* tree.h (struct ssa_imm_use_d): Renamed to ssa_use_operand_d.
	(tree_ssa_name, phi_arg_d): Use ssa_use_operand_d.
	* doc/tree-ssa.texi: Update documentation for operand interface.

From-SVN: r99155
2005-05-03 12:19:56 +00:00
Jeff Law db30731aa4 tree-flow-inline.h (op_iter_next_must_and_may_def): New.
* tree-flow-inline.h (op_iter_next_must_and_may_def): New.
	(op_iter_init_must_and_may_def): Likewise.
	(unmodifiable_var_p): Move to a later point in the file.
	* tree-ssa-operands.h (FOR_EACH_SSA_MUST_AND_MAY_DEF_OPERAND): New.
	* tree-ssa-dse.c (need_imm_uses_for): Remove, no longer needed.
	(dse_record_phis): Directly check for virtual operands rather than
	using need_imm_uses_for.
	(dse_optimize_stmt): Handle V_MUST_DEF operands.  Handle case where
	store has multiple V_{MAY,MUST}_DEF operands.

From-SVN: r98780
2005-04-26 11:37:33 -06:00