* tree-if-conv.c: Spell check comments and clean up whitespace.
From-SVN: r87101
This commit is contained in:
parent
8b11a64cd9
commit
61b5f21009
|
@ -1,3 +1,7 @@
|
|||
2004-09-05 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* tree-if-conv.c: Spell check comments and clean up whitespace.
|
||||
|
||||
2004-09-05 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
|
||||
|
||||
* tree-ssa-loop-ivopts.c: New file.
|
||||
|
|
|
@ -27,7 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
|||
o Decide if a loop is if-convertable or not.
|
||||
o Walk all loop basic blocks in breadth first order (BFS order).
|
||||
o Remove conditional statements (at the end of basic block)
|
||||
and propogate condition into destination basic blcoks'
|
||||
and propagate condition into destination basic blocks'
|
||||
predicate list.
|
||||
o Replace modify expression with conditional modify expression
|
||||
using current basic block's condition.
|
||||
|
@ -136,7 +136,7 @@ static basic_block *ifc_bbs;
|
|||
false. If false is returned then loop remains unchanged.
|
||||
FOR_VECTORIZER is a boolean flag. It indicates whether if-conversion is used
|
||||
for vectorizer or not. If it is used for vectorizer, additional checks are
|
||||
used. (Vectorization checks are not yet imlemented). */
|
||||
used. (Vectorization checks are not yet implemented). */
|
||||
|
||||
bool
|
||||
tree_if_conversion (struct loop *loop, bool for_vectorizer)
|
||||
|
@ -175,7 +175,7 @@ tree_if_conversion (struct loop *loop, bool for_vectorizer)
|
|||
cond = bb->aux;
|
||||
|
||||
/* Process all statements in this basic block.
|
||||
Remove conditional expresion, if any, and annotate
|
||||
Remove conditional expression, if any, and annotate
|
||||
destination basic block(s) appropriately. */
|
||||
for (itr = bsi_start (bb); !bsi_end_p (itr); /* empty */)
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ tree_if_convert_stmt (struct loop * loop, tree t, tree cond,
|
|||
|
||||
/* STMT is COND_EXPR. Update two destination's predicate list.
|
||||
Remove COND_EXPR, if it is not the loop exit condition. Otherwise
|
||||
update loop exit condition appropriatly. BSI is the iterator
|
||||
update loop exit condition appropriately. BSI is the iterator
|
||||
used to traverse statement list. STMT is part of loop LOOP. */
|
||||
|
||||
static void
|
||||
|
@ -307,7 +307,7 @@ tree_if_convert_cond_expr (struct loop *loop, tree stmt, tree cond,
|
|||
add_to_dst_predicate_list (loop, else_clause, cond, c2, bsi);
|
||||
}
|
||||
|
||||
/* Now this conditional statement is redundent. Remove it.
|
||||
/* Now this conditional statement is redundant. Remove it.
|
||||
But, do not remove exit condition! Update exit condition
|
||||
using new condition. */
|
||||
if (!bb_with_exit_edge_p (bb_for_stmt (stmt)))
|
||||
|
@ -424,7 +424,7 @@ if_convertable_modify_expr_p (struct loop *loop, basic_block bb, tree m_expr)
|
|||
|
||||
/* Return true, iff STMT is if-convertable.
|
||||
Statement is if-convertable if,
|
||||
- It is if-converatable MODIFY_EXPR
|
||||
- It is if-convertable MODIFY_EXPR
|
||||
- IT is LABEL_EXPR, GOTO_EXPR or COND_EXPR.
|
||||
STMT is inside block BB, which is inside loop LOOP. */
|
||||
|
||||
|
@ -462,7 +462,7 @@ if_convertable_stmt_p (struct loop *loop, basic_block bb, tree stmt)
|
|||
|
||||
/* Return true, iff BB is if-convertable.
|
||||
Note: This routine does _not_ check basic block statements and phis.
|
||||
Basic block is not if-converatable if,
|
||||
Basic block is not if-convertable if,
|
||||
- Basic block is non-empty and it is after exit block (in BFS order).
|
||||
- Basic block is after exit block but before latch.
|
||||
- Basic block edge(s) is not normal.
|
||||
|
@ -493,7 +493,7 @@ if_convertable_bb_p (struct loop *loop, basic_block bb, bool exit_bb_seen)
|
|||
}
|
||||
}
|
||||
|
||||
/* Be less adveturous and handle only normal edges. */
|
||||
/* Be less adventurous and handle only normal edges. */
|
||||
for (e = bb->succ; e; e = e->succ_next)
|
||||
if (e->flags &
|
||||
(EDGE_ABNORMAL_CALL | EDGE_EH | EDGE_ABNORMAL | EDGE_IRREDUCIBLE_LOOP))
|
||||
|
@ -541,7 +541,7 @@ if_convertable_loop_p (struct loop *loop, bool for_vectorizer ATTRIBUTE_UNUSED)
|
|||
if (loop->num_nodes <= 2)
|
||||
{
|
||||
if (dump_file && (dump_flags & TDF_DETAILS))
|
||||
fprintf (dump_file, "less thant 2 basic blocks\n");
|
||||
fprintf (dump_file, "less than 2 basic blocks\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -708,7 +708,7 @@ find_phi_replacement_condition (basic_block bb, tree *cond,
|
|||
switch_args = false;
|
||||
}
|
||||
|
||||
/* Create temp. for the condition. Vectorizier prefers to have gimple
|
||||
/* Create temp. for the condition. Vectorizer prefers to have gimple
|
||||
value as condition. Various targets use different means to communicate
|
||||
condition in vector compare operation. Using gimple value allows compiler
|
||||
to emit vector compare and select RTL without exposing compare's result. */
|
||||
|
@ -778,12 +778,12 @@ replace_phi_with_cond_modify_expr (tree phi, tree cond, bool switch_args,
|
|||
arg_1 = PHI_ARG_DEF (phi, 1);
|
||||
}
|
||||
|
||||
/* Build new RHS using selected condtion and arguments. */
|
||||
/* Build new RHS using selected condition and arguments. */
|
||||
rhs = build (COND_EXPR, TREE_TYPE (PHI_RESULT (phi)),
|
||||
unshare_expr (cond), unshare_expr (arg_0),
|
||||
unshare_expr (arg_1));
|
||||
|
||||
/* Create new MODIFY expresstion using RHS. */
|
||||
/* Create new MODIFY expression using RHS. */
|
||||
new_stmt = build (MODIFY_EXPR, TREE_TYPE (PHI_RESULT (phi)),
|
||||
unshare_expr (PHI_RESULT (phi)), rhs);
|
||||
|
||||
|
@ -1099,4 +1099,3 @@ struct tree_opt_pass pass_if_conversion =
|
|||
| TODO_verify_stmts
|
||||
| TODO_verify_flow /* todo_flags_finish */
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue