1. 02 Jan, 2014 1 commit
  2. 29 Oct, 2013 1 commit
    • tree-outof-ssa.h: Remove include files. · 8e9055ae
      	* tree-outof-ssa.h: Remove include files.
      	* tree-outof-ssa.c: Add required include files from tree-outof-ssa.h.
      	* expr.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* tree-ssa-ter.c: Likewise.
      	* ipa-prop.h: Remove gimple.h and tree-core.h from include list.
      	* lto-streamer.h: Likewise.
      	* cgraphbuild.c: Add gimple.h to include list.
      	* data-streamer-in.c: Likewise.
      	* ipa-cp.c: Likewise.
      	* tree-streamer.c: Likewise.
      	* lto-compress.c: Likewise.
      	* ipa-reference.c: Likewise.
      	* data-streamer-out.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* cgraphclones.c: Likewise.
      	* ipa-utils.c: Likewise.
      	* data-streamer.c: Likewise.
      	* ipa-split.c: Likewise.
      	* lto-section-in.c: Likewise.
      	* tree-streamer-out.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* tree-streamer-in.c: Likewise.
      	* symtab.c: Likewise.
      	* opts-global.c: Likewise.
      	* lto-opts.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer.c: Likewise.
      	* rtl.h: Add tree-core.h to include list.
      	* expr.h: Remove tree-core.h from include list.
      	* gimple.h: Likewise.
      	* ipa-utils.h: Likewise.
      	* streamer-hooks.h: Likewise.
      	* streamer-hooks.c: Include input.h.
      
      	* lto/lto-object.c: Add gimple.h to include list.
      	* lto/lto-partition.c: Likewise.
      
      From-SVN: r204158
      Andrew MacLeod committed
  3. 01 Oct, 2013 2 commits
    • tree-ssa-live.h (coalesce_ssa_name): Move Prototype to... · 1df9f5a9
      
      	* tree-ssa-live.h (coalesce_ssa_name): Move Prototype to...
      	* tree-ssa-coalesce.h: New. Move prototype to here.
      	* tree-outof-ssa.h: Include tree-ssa-coalesce.h.
      	* tree-ssa-coalesce.c: Include tree-outof-ssa.h.
      	(gimple_can_coalesce_p): Move to...
      	* gimple.c (gimple_can_coalesce_p): Here.
      
      From-SVN: r203069
      Andrew MacLeod committed
    • tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h. · 80560f95
      
      	* tree-into-ssa.c (enum need_phi_state): Relocate from tree-flow.h.
      	(dump_decl_set): Move to gimple.c.
      	* gimple.h: Don't include tree-ssa-operands.h.
      	(dump_decl_set): Add prototype.
      	(gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified):
      	Move to gimple-ssa.h.
      	(phi_ssa_name_p, phi_nodes, phi_nodes_ptr, gimple_phi_arg_def,
      	gimple_phi_arg_def_ptr, gimple_phi_arg_edge, gimple_phi_arg_location,
      	gimple_phi_arg_location_from_edge, gimple_phi_arg_set_location,
      	gimple_phi_arg_has_location): Relocate from tree-flow-inline.h
      	* gimple.c (walk_stmt_load_store_ops): Use gimple_phi_arg_def rather
      	than PHI_ARG_DEF.
      	(dump_decl_set): Relocate here.
      	* gimple-ssa.h: New file.
      	(gimple_vuse_op, gimple_vdef_op, update_stmt, update_stmt_if_modified):
      	Relocate from gimple.h.
      	* tree-cfg.c (has_zero_uses_1, single_imm_use_1): Move to...
      	* tree-ssa-operands.c (swap_ssa_operands): Rename from
      	swap_tree_operands and remove non-ssa path.
      	(has_zero_uses_1, single_imm_use_1): Relocate from tree-cfg.c.
      	* tree-ssa-reassoc.c (linearize_expr_tree, repropagate_negates): Use
      	swap_ssa_operands.
      	* tree-vect-loop.c (destroy_loop_vec_info, vect_is_slp_reduction,
      	vect_is_simple_reduction_1): Use swap_ssa_operands.
      	* tree-flow.h: Move various prototypes to tree-phinodes.h.
      	(enum need_phi_state): Move to tree-into-ssa.c.
      	(struct immediate_use_iterator_d, FOR_EACH_IMM_*,
      	BREAK_FROM_IMM_USE_STMT): Move to ssa-iterators.h.
      	(swap_tree_operands): Rename and move prototype to tree-ssa-operands.h.
      	* tree-flow-inline.h (delink_imm_use, link_imm_use_to_list,
      	link_imm_use, set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use,
      	relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use,
      	next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use,
      	num_imm_uses): Move to ssa-iterators.h.
      	(get_use_from_ptr, get_def_from_ptr): Move to tree-ssa-operands.h
      	(gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Move to 
      	tree-phinodes.h.
      	(op_iter_done, op_iter_next_def, op_iter_next_tree,
      	clear_and_done_ssa_iter, op_iter_init, op_iter_init_use,
      	op_iter_init_def, op_iter_init_tree, single_ssa_tree_operand,
      	single_ssa_use_operand, single_ssa_def_operand, zero_ssa_operands,
      	num_ssa_operands, delink_stmt_imm_use, single_phi_def,
      	op_iter_init_phiuse, op_iter_init_phidef, end_imm_use_stmt_p,
      	end_imm_use_stmt_traverse, move_use_after_head, link_use_stmts_after,
      	first_imm_use_stmt, next_imm_use_stmt, first_imm_use_on_stmt,
      	end_imm_use_on_stmt_p, next_imm_use_on_stmt): Move to ssa-iterators.h.
      	(gimple_phi_arg_def, gimple_phi_arg_def_ptr, gimple_phi_arg_edge,
      	gimple_phi_arg_location, gimple_phi_arg_location_from_edge,
      	gimple_phi_arg_set_location, gimple_phi_arg_has_location, phi_nodes,
      	phi_nodes_ptr, phi_ssa_name_p): Move to gimple.h.
      	(set_phi_nodes): Move to tree-phinodes.h.
      	* tree-ssa-operands.h (enum ssa_op_iter_type,
      	struct ssa_operand_iterator_d, SSA_OP*, FOR_EACH_SSA*, SINGLE_SSA*,
      	ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS): Move to ssa-iterators.h.
      	(dump_decl_set): Remove prototype.
      	(get_use_from_ptr, get_def_from_ptr): Relocate from tree-flow.h.
      	* tree-phinodes.h: New file.  Move some prototypes from tree-flow.h.
      	(set_phi_nodes): Relocate from tree-flow-inline.h.
      	(gimple_phi_arg_imm_use_ptr, phi_arg_index_from_use): Relocate from
      	tree-flow-inline.h
      	* tree-ssa.h: Add tree-phinodes.h, gimple-ssa.h, ssa-iterators.h to
      	include list.  Temporarily add gimple.h to include list.
      	* ssa-iterators.h: New file.
      	(struct immediate_use_iterator_d, FOR_EACH_IMM_*,
      	BREAK_FROM_IMM_USE_STMT): Relocate from tree-flow.h.
      	(enum ssa_op_iter_type, struct ssa_operand_iterator_d, SSA_OP*,
      	FOR_EACH_SSA*, SINGLE_SSA*, ZERO_SSA_OPERANDS, NUM_SSA_OPERANDS):
      	Relocate from tree-ssa-operands.h.
      	(delink_imm_use, link_imm_use_to_list, link_imm_use,
      	set_ssa_use_from_ptr, link_imm_use_stmt, relink_imm_use,
      	relink_imm_use_stmt, end_readonly_imm_use_p, first_readonly_imm_use,
      	next_readonly_imm_use, has_zero_uses, has_single_use, single_imm_use,
      	num_imm_uses, get_use_from_ptr, get_def_from_ptr,
      	phi_arg_index_from_use, op_iter_done, op_iter_next_def,
      	op_iter_next_tree, clear_and_done_ssa_iter, op_iter_init,
      	op_iter_init_use, op_iter_init_def, op_iter_init_tree,
      	single_ssa_tree_operand, single_ssa_use_operand, single_ssa_def_operand,
      	zero_ssa_operands, num_ssa_operands, delink_stmt_imm_use,
      	single_phi_def, op_iter_init_phiuse, op_iter_init_phidef,
      	end_imm_use_stmt_p, end_imm_use_stmt_traverse, move_use_after_head,
      	link_use_stmts_after, first_imm_use_stmt, next_imm_use_stmt,
      	first_imm_use_on_stmt, end_imm_use_on_stmt_p, next_imm_use_on_stmt):
      	Relocate from tree-flow-inline.h.
      	* tree-outof-ssa.h: Change _SSAEXPAND_H macro to GCC_TREE_OUTOF_SSA_H.
      
      From-SVN: r203068
      Andrew MacLeod committed
  4. 26 Sep, 2013 1 commit
    • tree-ssa-live.h (find_replaceable_exprs, [...]): Move prototypes to... · 78bca40d
      2013-09-26  Andrew MacLeod  <amacleod@redhat.com>
      
      	* tree-ssa-live.h (find_replaceable_exprs, dump_replaceable_exprs): Move
      	prototypes to...
      	* tree-ssa-ter.h: New File.  Move prototypes here.
      	* tree-flow.h (stmt_is_replaceable_p): Remove prototype.
      	* tree-outof-ssa.h: New. Rename ssaexpand.h, include tree-ssa-ter.h.
      	* tree-outof-ssa.c (ssa_is_replaceable_p): New.  Refactor common bits
      	from is_replaceable_p. 
      	* tree-ssa-ter.c (is_replaceable_p, stmt_is_replaceable_p): Delete.
      	(ter_is_replaceable_p): New.  Use new refactored ssa_is_replaceable_p.
      	(process_replaceable): Use ter_is_replaceable_p.
      	(find_replaceable_in_bb): Use ter_is_replaceable_p.
      	* expr.c (stmt_is_replaceable_p): Relocate from tree-ssa-ter.c.  Use
      	newly refactored ssa_is_replaceable_p.
      	* cfgexpand.c: Include tree-outof-ssa.h.
      	* ssaexpand.h: Delete.
      
      From-SVN: r202946
      Andrew MacLeod committed
  5. 10 Jan, 2013 1 commit
  6. 27 Apr, 2009 1 commit
    • ssaexpand.h (struct ssaexpand): Member 'values' is a bitmap. · e97809c6
      	* ssaexpand.h (struct ssaexpand): Member 'values' is a bitmap.
      	(get_gimple_for_ssa_name): Adjust, lookup using SSA_NAME_DEF_STMT.
      	* tree-ssa-live.h: (find_replaceable_exprs): Return a bitmap.
      	(dump_replaceable_exprs): Take a bitmap.
      	* cfgexpand.c (gimple_cond_pred_to_tree): Handle bitmap instead of
      	array.
      	(expand_gimple_basic_block): Likewise.
      	* tree-ssa-ter.c (struct temp_expr_table_d): Make
      	replaceable_expressions member a bitmap.
      	(free_temp_expr_table): Pass back and deal with bitmap, not gimple*.
      	(mark_replaceable): Likewise.
      	(find_replaceable_in_bb, dump_replaceable_exprs): Likewise.
      	* tree-outof-ssa.c (remove_ssa_form): 'values' is a bitmap.
      
      From-SVN: r146837
      Michael Matz committed
  7. 26 Apr, 2009 1 commit
    • Expand from SSA. · 4e3825db
      gcc/
              Expand from SSA.
      	* builtins.c (fold_builtin_next_arg): Handle SSA names.
      	* tree-ssa-copyrename.c (rename_ssa_copies): Use ssa_name() directly.
      	* tree-ssa-coalesce.c (create_outofssa_var_map): Mark only useful
      	SSA names. 
      	(compare_pairs): Swap cost comparison.
      	(coalesce_ssa_name): Don't use change_partition_var.
      	* tree-nrv.c (struct nrv_data): Add modified member.
      	(finalize_nrv_r): Set it.
      	(tree_nrv): Use it to update statements.
      	(pass_nrv): Require PROP_ssa.
      	* tree-mudflap.c (mf_decl_cache_locals,
      	mf_build_check_statement_for): Use make_rename_temp.
      	(pass_mudflap_2): Require PROP_ssa, run ssa update at finish.
      	* alias.c (find_base_decl): Handle SSA names.
      	* emit-rtl (set_reg_attrs_for_parm): Make non-static.
      	(component_ref_for_mem_expr): Don't leak SSA names into RTL.
      	* rtl.h (set_reg_attrs_for_parm): Declare.
      	* tree-optimize.c (pass_cleanup_cfg_post_optimizing): Rename
      	to "optimized", remove unused locals at finish.
      	(execute_free_datastructures): Make global, call
      	delete_tree_cfg_annotations.
      	(execute_free_cfg_annotations): Don't call
      	delete_tree_cfg_annotations.
      
      	* ssaexpand.h: New file.
      	* expr.c (toplevel): Include ssaexpand.h.
      	(expand_assignment): Handle SSA names the same as register
      	variables.
      	(expand_expr_real_1): Expand SSA names.
      	* cfgexpand.c (toplevel): Include ssaexpand.h.
      	(SA): New global variable.
      	(gimple_cond_pred_to_tree): Fold TERed comparisons into predicates.
      	(SSAVAR): New macro.
      	(set_rtl): New helper function.
      	(add_stack_var): Deal with SSA names, use set_rtl.
      	(expand_one_stack_var_at): Likewise.
      	(expand_one_stack_var): Deal with SSA names.
      	(stack_var_size_cmp): Use code (SSA_NAME / DECL) as tie breaker
      	before unique numbers.
      	(expand_stack_vars): Use set_rtl.
      	(expand_one_var): Accept SSA names, add asserts for them, feed them
      	to above subroutines.
      	(expand_used_vars): Expand all partitions (without default defs),
      	then only the local decls (ignoring those expanded already).
      	(expand_gimple_cond): Remove edges when jumpif() expands an
      	unconditional jump.
      	(expand_gimple_basic_block): Don't clear EDGE_EXECUTABLE here,
      	or remove abnormal edges.  Ignore insns setting the LHS of a TERed
      	SSA name.
      	(gimple_expand_cfg): Call into rewrite_out_of_ssa, initialize
      	members of SA; deal with PARM_DECL partitions here; expand
      	all PHI nodes, free tree datastructures and SA.  Commit instructions
      	on edges, clear EDGE_EXECUTABLE and remove abnormal edges here.
      	(pass_expand): Require and destroy PROP_ssa, verify SSA form, flow
      	info and statements at start, collect garbage at finish.
      	* tree-ssa-live.h (struct _var_map): Remove partition_to_var member.
      	(VAR_ANN_PARTITION) Remove.
      	(change_partition_var): Don't declare.
      	(partition_to_var): Always return SSA names.
      	(var_to_partition): Only accept SSA names.
      	(register_ssa_partition): Only check argument.
      	* tree-ssa-live.c (init_var_map): Don't allocate partition_to_var
      	member.
      	(delete_var_map): Don't free it.
      	(var_union): Only accept SSA names, simplify.
      	(partition_view_init): Mark only useful SSA names as used.
      	(partition_view_fini): Only deal with SSA names.
      	(change_partition_var): Remove.
      	(dump_var_map): Use ssa_name instead of partition_to_var member.
      	* tree-ssa.c (delete_tree_ssa): Don't remove PHI nodes on RTL
      	basic blocks.
      	* tree-outof-ssa.c (toplevel): Include ssaexpand.h and expr.h.
      	(struct _elim_graph): New member const_dests; nodes member vector of
      	ints.
      	(set_location_for_edge): New static helper.
      	(create_temp): Remove.
      	(insert_partition_copy_on_edge, insert_part_to_rtx_on_edge,
      	insert_value_copy_on_edge, insert_rtx_to_part_on_edge): New
      	functions.
      	(new_elim_graph): Allocate const_dests member.
      	(clean_elim_graph): Truncate const_dests member.
      	(delete_elim_graph): Free const_dests member.
      	(elim_graph_size): Adapt to new type of nodes member.
      	(elim_graph_add_node): Likewise.
      	(eliminate_name): Likewise.
      	(eliminate_build): Don't take basic block argument, deal only with
      	partition numbers, not variables.
      	(get_temp_reg): New static helper.
      	(elim_create): Use it, deal with RTL temporaries instead of trees.
      	(eliminate_phi): Adjust all calls to new signature.
      	(assign_vars, replace_use_variable, replace_def_variable): Remove.
      	(rewrite_trees): Only do checking.
      	(edge_leader, stmt_list, leader_has_match, leader_match): Remove.
      	(same_stmt_list_p, identical_copies_p, identical_stmt_lists_p,
      	init_analyze_edges_for_bb, fini_analyze_edges_for_bb,
      	contains_tree_r, MAX_STMTS_IN_LATCH,
      	process_single_block_loop_latch, analyze_edges_for_bb,
      	perform_edge_inserts): Remove.
      	(expand_phi_nodes): New global function.
      	(remove_ssa_form): Take ssaexpand parameter.  Don't call removed
      	functions, initialize new parameter, remember partitions having a
      	default def.
      	(finish_out_of_ssa): New global function.
      	(rewrite_out_of_ssa): Make global.  Adjust call to remove_ssa_form,
      	don't reset in_ssa_p here, don't disable TER when mudflap.
      	(pass_del_ssa): Remove.
      	* tree-flow.h (struct var_ann_d): Remove out_of_ssa_tag and
      	partition members.
      	(execute_free_datastructures): Declare.
      	* Makefile.in (SSAEXPAND_H): New variable.
      	(tree-outof-ssa.o, expr.o, cfgexpand.o): Depend on SSAEXPAND_H.
      	* basic-block.h (commit_one_edge_insertion): Declare.
      	* passes.c (init_optimization_passes): Move pass_nrv and
      	pass_mudflap2 before pass_cleanup_cfg_post_optimizing, remove
      	pass_del_ssa, pass_free_datastructures, pass_free_cfg_annotations.
      	* cfgrtl.c (commit_one_edge_insertion): Make global, don't declare.
      	(redirect_branch_edge): Deal with super block when expanding, split
      	out jump patching itself into ...
      	(patch_jump_insn): ... here, new static helper.
      
      testsuite/
      
      	Expand from SSA.
      	* gcc.dg/tree-ssa/20030728-1.c: Use -rtl-expand-details dump and
      	change regexps.
      	* gcc.target/i386/pr37248-1.c: Modified.
      	* gcc.target/i386/pr37248-3.c: Modified.
      	* gcc.target/i386/pr37248-2.c: Modified.
      	* gnat.dg/aliasing1.adb: Modified.
      	* gnat.dg/pack9.adb: Modified.
      	* gnat.dg/aliasing2.adb: Modified.
      	* gcc.dg/strict-overflow-2.c: Modified.
      	* gcc.dg/autopar/reduc-1char.c: Modified.
      	* gcc.dg/autopar/reduc-2char.c: Modified.
      	* gcc.dg/autopar/reduc-1.c: Modified.
      	* gcc.dg/autopar/reduc-2.c: Modified.
      	* gcc.dg/autopar/reduc-3.c: Modified.
      	* gcc.dg/autopar/reduc-6.c: Modified.
      	* gcc.dg/autopar/reduc-7.c: Modified.
      	* gcc.dg/autopar/reduc-8.c: Modified.
      	* gcc.dg/autopar/reduc-9.c: Modified.
      	* gcc.dg/autopar/reduc-1short.c: Modified.
      	* gcc.dg/autopar/reduc-2short.c: Modified.
      	* gcc.dg/autopar/parallelization-1.c: Modified.
      	* gcc.dg/strict-overflow-4.c: Modified.
      	* gcc.dg/strict-overflow-6.c: Modified.
      	* gcc.dg/gomp/combined-1.c: Modified.
      	* gcc.dg/no-strict-overflow-1.c: Modified.
      	* gcc.dg/no-strict-overflow-3.c: Modified.
      	* gcc.dg/no-strict-overflow-5.c: Modified.
      	* gcc.dg/tree-ssa/reassoc-13.c: Modified.
      	* gcc.dg/tree-ssa/pr18134.c: Modified.
      	* gcc.dg/tree-ssa/20030824-1.c: Modified.
      	* gcc.dg/tree-ssa/vector-2.c: Modified.
      	* gcc.dg/tree-ssa/forwprop-9.c: Modified.
      	* gcc.dg/tree-ssa/loop-21.c: Modified.
      	* gcc.dg/tree-ssa/20030824-2.c: Modified.
      	* gcc.dg/tree-ssa/vector-3.c: Modified.
      	* gcc.dg/tree-ssa/asm-3.c: Modified.
      	* gcc.dg/tree-ssa/pr23294.c: Modified.
      	* gcc.dg/tree-ssa/loop-22.c: Modified.
      	* gcc.dg/tree-ssa/loop-15.c: Modified.
      	* gcc.dg/tree-ssa/prefetch-4.c: Modified.
      	* gcc.dg/tree-ssa/pr22051-1.c: Modified.
      	* gcc.dg/tree-ssa/pr20139.c: Modified.
      	* gcc.dg/tree-ssa/scev-cast.c: Modified.
      	* gcc.dg/tree-ssa/pr22051-2.c: Modified.
      	* gcc.dg/tree-ssa/reassoc-1.c: Modified.
      	* gcc.dg/tree-ssa/loop-5.c: Modified.
      	* gcc.dg/tree-ssa/pr19431.c: Modified.
      	* gcc.dg/tree-ssa/pr32044.c: Modified.
      	* gcc.dg/tree-ssa/prefetch-7.c: Modified.
      	* gcc.dg/tree-ssa/loop-19.c: Modified.
      	* gcc.dg/tree-ssa/loop-28.c: Modified.
      	* gcc.dg/tree-ssa/ssa-pre-15.c: Modified.
      	* gcc.dg/tree-ssa/divide-1.c: Modified.
      	* gcc.dg/tree-ssa/inline-1.c: Modified.
      	* gcc.dg/tree-ssa/divide-3.c: Modified.
      	* gcc.dg/tree-ssa/pr30978.c: Modified.
      	* gcc.dg/tree-ssa/alias-6.c: Modified.
      	* gcc.dg/tree-ssa/divide-4.c: Modified.
      	* gcc.dg/tree-ssa/alias-11.c: Modified.
      	* gcc.dg/no-strict-overflow-7.c: Modified.
      	* gcc.dg/strict-overflow-1.c: Modified.
      	* gcc.dg/pr15784-4.c: Modified.
      	* gcc.dg/pr34263.c: Modified.
      	* gcc.dg/strict-overflow-3.c: Modified.
      	* gcc.dg/tree-prof/stringop-1.c: Modified.
      	* gcc.dg/tree-prof/val-prof-1.c: Modified.
      	* gcc.dg/tree-prof/val-prof-2.c: Modified.
      	* gcc.dg/tree-prof/val-prof-3.c: Modified.
      	* gcc.dg/tree-prof/val-prof-4.c: Modified.
      	* gcc.dg/no-strict-overflow-2.c: Modified.
      	* gcc.dg/no-strict-overflow-4.c: Modified.
      	* gcc.dg/no-strict-overflow-6.c: Modified.
      	* g++.dg/tree-ssa/pr27090.C: Modified.
      	* g++.dg/tree-ssa/tmmti-2.C: Modified.
      	* g++.dg/tree-ssa/ptrmemfield.C: Modified.
      	* g++.dg/tree-ssa/pr19807.C: Modified.
      	* g++.dg/opt/pr30965.C: Modified.
      	* g++.dg/init/new17.C: Modified.
      	* gfortran.dg/whole_file_6.f90: Modified.
      	* gfortran.dg/whole_file_5.f90: Modified.
      	* gfortran.dg/reassoc_1.f90: Modified.
      	* gfortran.dg/reassoc_3.f90: Modified.
      
      From-SVN: r146817
      Michael Matz committed