diff options
author | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-27 20:22:17 +0000 |
---|---|---|
committer | amacleod <amacleod@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-04-27 20:22:17 +0000 |
commit | 09aca5bc960f760addfa6a24c162cbebfd9e367e (patch) | |
tree | 39c9b1002df8b0cd95dd8e90404343ea80786b25 /gcc/tree-ssa-threadedge.c | |
parent | 3de2e08eeb62519bc9d32a407a918adf87a46beb (diff) | |
download | gcc-09aca5bc960f760addfa6a24c162cbebfd9e367e.tar.gz |
Implement new immediate use iterators.
2006-04-27 Andrew MacLeod <amacleod@redhat.com>
PR tree-optimization/26854
* tree-vrp.c (remove_range_assertions): Use new Immuse iterator.
* doc/tree-ssa.texi: Update immuse iterator documentation.
* tree-ssa-math-opts.c (execute_cse_reciprocals_1): Use new iterator.
* tree-ssa-dom.c (propagate_rhs_into_lhs): Use new iterator.
* tree-flow-inline.h (end_safe_imm_use_traverse, end_safe_imm_use_p,
first_safe_imm_use, next_safe_imm_use): Remove.
(end_imm_use_stmt_p): New. Check for end of immuse stmt traversal.
(end_imm_use_stmt_traverse): New. Terminate immuse stmt traversal.
(move_use_after_head): New. Helper function to sort immuses in a stmt.
(link_use_stmts_after): New. Link all immuses in a stmt consescutively.
(first_imm_use_stmt): New. Get first stmt in an immuse list.
(next_imm_use_stmt): New. Get next stmt in an immuse list.
(first_imm_use_on_stmt): New. Get first immuse on a stmt.
(end_imm_use_on_stmt_p): New. Check for end of immuses on a stmt.
(next_imm_use_on_stmt): New. Move to next immuse on a stmt.
* tree-ssa-forwprop.c (forward_propagate_addr_expr): Use new iterator.
* lambda-code.c (lambda_loopnest_to_gcc_loopnest): Use new iterator.
(perfect_nestify): Use new iterator.
* tree-vect-transform.c (vect_create_epilog_for_reduction): Use new
iterator.
* tree-flow.h (struct immediate_use_iterator_d): Add comments.
(next_imm_name): New field in struct immediate_use_iterator_d.
(FOR_EACH_IMM_USE_SAFE, BREAK_FROM_SAFE_IMM_USE): Remove.
(FOR_EACH_IMM_USE_STMT, BREAK_FROM_IMM_USE_STMT,
FOR_EACH_IMM_USE_ON_STMT): New immediate use iterator macros.
* tree-cfg.c (replace_uses_by): Use new iterator.
* tree-ssa-threadedge.c (lhs_of_dominating_assert): Use new iterator.
* tree-ssa-operands.c (correct_use_link): Remove.
(finalize_ssa_use_ops): No longer call correct_use_link.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113321 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-threadedge.c')
-rw-r--r-- | gcc/tree-ssa-threadedge.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/tree-ssa-threadedge.c b/gcc/tree-ssa-threadedge.c index 511eb6a624b..6ae5d3e5468 100644 --- a/gcc/tree-ssa-threadedge.c +++ b/gcc/tree-ssa-threadedge.c @@ -84,18 +84,20 @@ static tree lhs_of_dominating_assert (tree op, basic_block bb, tree stmt) { imm_use_iterator imm_iter; - use_operand_p imm_use; + tree use_stmt; + use_operand_p use_p; - FOR_EACH_IMM_USE_SAFE (imm_use, imm_iter, op) + FOR_EACH_IMM_USE_FAST (use_p, imm_iter, op) { - tree use_stmt = USE_STMT (imm_use); - + use_stmt = USE_STMT (use_p); if (use_stmt != stmt && TREE_CODE (use_stmt) == MODIFY_EXPR && TREE_CODE (TREE_OPERAND (use_stmt, 1)) == ASSERT_EXPR && TREE_OPERAND (TREE_OPERAND (use_stmt, 1), 0) == op && dominated_by_p (CDI_DOMINATORS, bb, bb_for_stmt (use_stmt))) - op = TREE_OPERAND (use_stmt, 0); + { + return TREE_OPERAND (use_stmt, 0); + } } return op; } |