|| gimple_has_side_effects (stmt_to_move))
return false;
- if (gimple_uses_undefined_value_p (stmt_to_move))
- return false;
+ ssa_op_iter it;
+ tree use;
+ FOR_EACH_SSA_TREE_OPERAND (use, stmt_to_move, it, SSA_OP_USE)
+ if (ssa_name_maybe_undef_p (use))
+ return false;
/* Allow assignments but allow some builtin/internal calls.
As const calls don't match any of the above, yet they could
bool cfgchanged = false;
calculate_dominance_info (CDI_DOMINATORS);
+ mark_ssa_maybe_undefs ();
/* Search every basic block for COND_EXPR we may be able to optimize.
}
-/* Return TRUE iff STMT, a gimple statement, references an undefined
- SSA name. */
-
-bool
-gimple_uses_undefined_value_p (gimple *stmt)
-{
- ssa_op_iter iter;
- tree op;
-
- FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE)
- if (ssa_undefined_value_p (op))
- return true;
-
- return false;
-}
-
-
/* Return TRUE iff there are any non-PHI uses of VAR that dominate the
end of BB. If we return TRUE and BB is a loop header, then VAR we
be assumed to be defined within the loop, even if it is marked as
extern bool ssa_defined_default_def_p (tree t);
extern bool ssa_undefined_value_p (tree, bool = true);
-extern bool gimple_uses_undefined_value_p (gimple *);
bool ssa_name_any_use_dominates_bb_p (tree var, basic_block bb);