u = _8; */
static gimple *
-gimple_expand_vec_set_expr (gimple_stmt_iterator *gsi)
+gimple_expand_vec_set_expr (struct function *fun, gimple_stmt_iterator *gsi)
{
enum tree_code code;
gcall *new_stmt = NULL;
tree pos = TREE_OPERAND (lhs, 1);
tree view_op0 = TREE_OPERAND (op0, 0);
machine_mode outermode = TYPE_MODE (TREE_TYPE (view_op0));
- if (auto_var_in_fn_p (view_op0, cfun->decl)
+ if (auto_var_in_fn_p (view_op0, fun->decl)
&& !TREE_ADDRESSABLE (view_op0) && can_vec_set_var_idx_p (outermode))
{
location_t loc = gimple_location (stmt);
function based on type of selected expansion. */
static gimple *
-gimple_expand_vec_cond_expr (gimple_stmt_iterator *gsi,
+gimple_expand_vec_cond_expr (struct function *fun, gimple_stmt_iterator *gsi,
hash_map<tree, unsigned int> *vec_cond_ssa_name_uses)
{
tree lhs, op0a = NULL_TREE, op0b = NULL_TREE;
}
gassign *def_stmt = dyn_cast<gassign *> (SSA_NAME_DEF_STMT (op0));
- if (def_stmt)
+ if (def_stmt
+ /* When the compare has EH we do not want to forward it when
+ it has multiple uses and in general because of the complication
+ with EH redirection. */
+ && !stmt_can_throw_internal (fun, def_stmt))
{
tcode = gimple_assign_rhs_code (def_stmt);
op0a = gimple_assign_rhs1 (def_stmt);
VEC_COND_EXPR assignments. */
static unsigned int
-gimple_expand_vec_exprs (void)
+gimple_expand_vec_exprs (struct function *fun)
{
gimple_stmt_iterator gsi;
basic_block bb;
hash_map<tree, unsigned int> vec_cond_ssa_name_uses;
auto_bitmap dce_ssa_names;
- FOR_EACH_BB_FN (bb, cfun)
+ FOR_EACH_BB_FN (bb, fun)
{
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
{
- gimple *g = gimple_expand_vec_cond_expr (&gsi,
+ gimple *g = gimple_expand_vec_cond_expr (fun, &gsi,
&vec_cond_ssa_name_uses);
if (g != NULL)
{
gsi_replace (&gsi, g, false);
}
- gimple_expand_vec_set_expr (&gsi);
+ gimple_expand_vec_set_expr (fun, &gsi);
if (gsi_end_p (gsi))
break;
}
return true;
}
- virtual unsigned int execute (function *)
+ virtual unsigned int execute (function *fun)
{
- return gimple_expand_vec_exprs ();
+ return gimple_expand_vec_exprs (fun);
}
}; // class pass_gimple_isel