TODO_dump_func
| TODO_update_ssa
| TODO_cleanup_cfg
- | TODO_verify_ssa
- | TODO_update_smt_usage, /* todo_flags_finish */
+ | TODO_verify_ssa, /* todo_flags_finish */
0 /* letter */
};
0, /* properties_provided */
0, /* properties_destroyed */
0, /* todo_flags_start */
- TODO_cleanup_cfg | TODO_dump_func
- | TODO_ggc_collect | TODO_verify_ssa
- | TODO_verify_stmts | TODO_update_smt_usage
- | TODO_update_ssa, /* todo_flags_finish */
+ TODO_cleanup_cfg
+ | TODO_dump_func
+ | TODO_ggc_collect
+ | TODO_verify_ssa
+ | TODO_verify_stmts
+ | TODO_update_ssa, /* todo_flags_finish */
0 /* letter */
};
Often this will allow for removal of an ADDR_EXPR and INDIRECT_REF
node or for recovery of array indexing from pointer arithmetic.
- CHANGED is an optional pointer to a boolean variable set to true if
- either the LHS or RHS was changed in the USE_STMT.
-
Return true if the propagation was successful (the propagation can
be not totally successful, yet things may have been changed). */
static bool
-forward_propagate_addr_expr_1 (tree stmt, tree use_stmt, bool *changed)
+forward_propagate_addr_expr_1 (tree stmt, tree use_stmt)
{
tree name = GIMPLE_STMT_OPERAND (stmt, 0);
tree lhs, rhs, array_ref;
TREE_OPERAND (lhs, 0) = unshare_expr (GIMPLE_STMT_OPERAND (stmt, 1));
fold_stmt_inplace (use_stmt);
tidy_after_forward_propagate_addr (use_stmt);
- if (changed)
- *changed = true;
}
/* Trivial case. The use statement could be a trivial copy. We
GIMPLE_STMT_OPERAND (use_stmt, 1)
= unshare_expr (GIMPLE_STMT_OPERAND (stmt, 1));
tidy_after_forward_propagate_addr (use_stmt);
- if (changed)
- *changed = true;
return true;
}
TREE_OPERAND (rhs, 0) = unshare_expr (GIMPLE_STMT_OPERAND (stmt, 1));
fold_stmt_inplace (use_stmt);
tidy_after_forward_propagate_addr (use_stmt);
- if (changed)
- *changed = true;
return true;
}
if (fold_stmt_inplace (use_stmt))
{
tidy_after_forward_propagate_addr (use_stmt);
- if (changed)
- *changed = true;
return true;
}
else
res = forward_propagate_addr_into_variable_array_index (offset_stmt, lhs,
stmt, use_stmt);
- if (res && changed)
- *changed = true;
return res;
}
tree offset_stmt = SSA_NAME_DEF_STMT (TREE_OPERAND (rhs, 0));
res = forward_propagate_addr_into_variable_array_index (offset_stmt, lhs,
stmt, use_stmt);
- if (res && changed)
- *changed = true;
return res;
}
return false;
}
/* STMT is a statement of the form SSA_NAME = ADDR_EXPR <whatever>.
- SOME is a pointer to a boolean value indicating whether we
- propagated the address expression anywhere.
Try to forward propagate the ADDR_EXPR into all uses of the SSA_NAME.
Often this will allow for removal of an ADDR_EXPR and INDIRECT_REF
Returns true, if all uses have been propagated into. */
static bool
-forward_propagate_addr_expr (tree stmt, bool *some)
+forward_propagate_addr_expr (tree stmt)
{
int stmt_loop_depth = bb_for_stmt (stmt)->loop_depth;
tree name = GIMPLE_STMT_OPERAND (stmt, 0);
push_stmt_changes (&use_stmt);
- result = forward_propagate_addr_expr_1 (stmt, use_stmt, some);
- *some |= result;
+ result = forward_propagate_addr_expr_1 (stmt, use_stmt);
all &= result;
pop_stmt_changes (&use_stmt);
if (TREE_CODE (rhs) == ADDR_EXPR)
{
- bool some = false;
- if (forward_propagate_addr_expr (stmt, &some))
+ if (forward_propagate_addr_expr (stmt))
{
release_defs (stmt);
todoflags |= TODO_remove_unused_locals;
}
else
bsi_next (&bsi);
- if (some)
- todoflags |= TODO_update_smt_usage;
}
else if ((TREE_CODE (rhs) == BIT_NOT_EXPR
|| TREE_CODE (rhs) == NEGATE_EXPR)