aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-im.c
AgeCommit message (Collapse)AuthorFilesLines
2004-08-25tree-ssa-operands.h (struct ssa_operand_iterator_d): New.Andrew MacLeod1-47/+14
2004-08-25 Andrew MacLeod <amacleod@redhat.com> * tree-ssa-operands.h (struct ssa_operand_iterator_d): New. SSA operand iterator controlling structure. (SSA_OP_USE, SSA_OP_DEF, SSA_OP_VUSE, SSA_OP_VMAYUSE, SSA_OP_VMAYDEF, SSA_OP_VMUSTDEF, SSA_OP_VIRTUAL_USES, SSA_OP_VIRTUAL_DEFS, SSA_OP_ALL_USES, SSA_OP_ALL_DEFS, SSA_OP_ALL_OPERANDS): New. Operand iterator flags. (FOR_EACH_SSA_TREE_OPERAND): New. Iterate over operands as trees. (FOR_EACH_SSA_USE_OPERAND): New. Iterate over operands as uses. (FOR_EACH_SSA_DEF_OPERAND): New. Iterate over operands as defs. (FOR_EACH_SSA_MAYDEF_OPERAND): New. Iterate over V_MAY_DEFs. * tree-ssa-operands.c (NULL_DEF_OPERAND_P, NULL_USE_OPERAND_P): New. Empty operand pointers. * tree-flow-inline.h (op_iter_done): New. Return true if finished. (op_iter_next_use): New. Return next use_operand_p. (op_iter_next_def): New. Return next def_operand_p. (op_iter_next_tree): New. Return next operands as a tree. (op_iter_init): New. Initialize an iterator structure. (op_iter_init_use): New. Initialize structure and get the first use. (op_iter_init_def): New. Initialize structure and get the first def. (op_iter_init_tree): New. Initialize structure and get the first tree. (op_iter_next_maydef): New. Return next V_MAY_DEF operands. (op_iter_init_maydef): New. Initialize structure and get the first V_MAY_DEF operands. * tree-cfg.c (tree_duplicate_bb): Use new operand iterator. * tree-dfa.c (compute_immediate_uses_for_stmt, redirect_immediate_uses): Use new operand iterator. (v_may_defs_disappeared_p, v_must_defs_disappeared_p): Delete. (mark_new_vars_to_rename): Use new operand iterator. Count virtual operands instead of using *_disappeared_p routines. * tree-into-ssa.c (mark_def_sites, ssa_mark_def_sites, rewrite_stmt, ssa_rewrite_stmt): Use new operand iterator. * tree-outof-ssa.c (check_replaceable, find_replaceable_in_bb, rewrite_trees): Use new operand iterator. * tree-pretty-print.c (dump_vops): Use new operand iterator. * tree-sra.c (mark_all_v_defs): Use new operand iterator. * tree-ssa-alias.c (compute_points_to_and_addr_escape, dump_points_to_info): Use new operand iterator. * tree-ssa-ccp.c (cp_lattice_meet, visit_stmt, initialize, replace_uses_in, replace_vuse_in, likely_value, set_rhs): Use new operand iterator. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary, propagate_necessity): Use new operand iterator. * tree-ssa-dom.c (cprop_into_stmt, optimize_stmt): Use operand iterator. (register_definitions_for_stmt): Use new operand iterator. Take stmt as a parameter instead of a stmt_ann_t. * tree-ssa-live.c (create_ssa_var_map, calculate_live_on_entry, build_tree_conflict_graph): Use new operand iterator. * tree-ssa-loop-im.c (determine_max_movement, single_reachable_address, rewrite_mem_refs): Use new operand iterator. * tree-ssa-loop-manip.c (find_uses_to_rename_stmt, check_loop_closed_ssa_use): Use new operand iterator. * tree-ssa.c (verify_ssa, replace_immediate_uses): Use operand iterator. * tree-ssanames.c (release_defs): Use new operand iterator. * tree-vectorizer.c (vect_create_data_ref): Use new operand iterator. From-SVN: r86583
2004-08-23tree-ssa-loop-im.c (fem_single_reachable_address, [...]): New functions.Zdenek Dvorak1-22/+157
* tree-ssa-loop-im.c (fem_single_reachable_address, for_each_memref): New functions. (single_reachable_address): Use them. (schedule_sm): Add dump. (is_call_clobbered_ref): New function. (determine_lsm_reg): Check whether the reference is call clobbered. Only work for gimple_reg_type values. From-SVN: r86418
2004-08-10tree-cfg.c (bsi_insert_before, [...]): Call modify_stmt after linking stmt ↵Andrew MacLeod1-2/+1
into the program. 2004-08-10 Andrew MacLeod <amacleod@redhat.com> * tree-cfg.c (bsi_insert_before, bsi_insert_after): Call modify_stmt after linking stmt into the program. (bsi_remove): Don't call modify_stmt. * tree-complex.c (update_complex_assignment, expand_complex_comparison): Call modify_stmt after changing the stmt. * tree-outof-ssa.c (rewrite_trees): Call modify_stmt only if not removing the stmt. * tree-ssa-ccp.c (substitute_and_fold): Call modify_stmt after changing the stmt, and only if needed. * tree-ssa-dom.c (thread_across_edge): Pass no annotation for a dummy expression. (simplify_rhs_and_lookup_avail_expr): Don't take an annotation param. (simplify_cond_and_lookup_avail_expr): Use modify_stmt. (simplify_switch_and_lookup_avail_expr): Don't take an annotation param. (eliminate_redundant_computations): Don't pass an annotation. Call modify_stmt rather than setting the annotation directly. (record_equivalences_from_stmt): Remove unused local 'j'. (cprop_operand): Take a stmt rather than an annotation as a parameter. Call modify_stmt. (cprop_into_stmt): Pass stmt rather than annotation. (update_rhs_and_lookup_avail_expr): Call modify_stmt. * tree-ssa-loop-im.c (schedule_sm): Call get_stmt_ann rather than modify_stmt. * tree-ssa.c (propagate_into_addr): Dont call modify_stmt. From-SVN: r85765
2004-08-05tree-ssa-loop-manip.c: New file.Zdenek Dvorak1-0/+7
* tree-ssa-loop-manip.c: New file. * Makefile.in (tree-ssa-loop-manip.o): Add. * tree-flow.h (rewrite_into_loop_closed_ssa, verify_loop_closed_ssa): Declare. * tree-ssa-loop.c (tree_loop_optimizer_init): Create loop closed ssa form. (tree_ssa_loop_done): Verify loop closed ssa form. * tree-ssa-loop-im.c (move_computations): Update loop closed ssa form. From-SVN: r85613
2004-07-29tree-ssa-loop-im.c (force_move_till_expr, [...]): Take orig_loop argument ↵Zdenek Dvorak1-9/+20
and pass it to set_level. * tree-ssa-loop-im.c (force_move_till_expr, force_move_till): Take orig_loop argument and pass it to set_level. (schedule_sm): Pass the correct orig_loop to force_move_till. From-SVN: r85308
2004-07-27gimplify.c (is_gimple_addr_expr_arg_or_indirect): Remove.Richard Henderson1-1/+1
* gimplify.c (is_gimple_addr_expr_arg_or_indirect): Remove. (gimplify_modify_expr, gimplify_addr_expr, gimplify_expr): Use is_gimple_addressable. * tree-gimple.c (is_gimple_addressable): Rename from is_gimple_addr_expr_arg; accept INDIRECT_REF. (is_gimple_lvalue): Don't test INDIRECT_REF directly. * tree-gimple.h, tree-sra.c, tree-ssa-loop-im.c: Update for rename to is_gimple_addressable. From-SVN: r85243
2004-07-10tree-ssa-loop-im.c: New file.Zdenek Dvorak1-0/+1299
* tree-ssa-loop-im.c: New file. * Makefile.in (tree-ssa-loop-im.o): Add. * cfgloop.c (superloop_at_depth): New function. * cfgloop.h (superloop_at_depth): Declare. * common.opt (ftree-lim): New flag. * expr.c (array_ref_up_bound): New function. * params.def (PARAM_LIM_EXPENSIVE): New parameter. * timevar.def (TV_LIM): New timevar. * tree-dfa.c (compute_immediate_uses): Respect TDFA_USE flags when computing immediate uses of a phi node. * tree-flow.h (struct tree_ann_common_d): Add aux field. (loop_commit_inserts, for_each_index, tree_ssa_lim): Declare. * tree-optimize.c (init_tree_optimization_passes): Add pass_lim. * tree-pass.h (pass_lim): Declare. * tree-ssa-loop.c (tree_ssa_loop_im, gate_tree_ssa_loop_im): New functions. (pass_lim): New pass structure. * tree-eh.c (tree_could_trap_p): Handle ARRAY_REFs correctly. * tree.c (in_array_bounds_p): New function. * tree.h (TREE_THIS_NOTRAP): Define also for ARRAY_REFs. (in_array_bounds_p, array_ref_up_bound): Declare. * doc/invoke.texi (-ftree-lim, --param lim-expensive): Document. * doc/passes.texi (tree-ssa-loop-im.c): Document. From-SVN: r84441