+2015-07-10 Richard Biener <rguenther@suse.de>
+
+ * tree-if-conv.c (if_convertible_gimple_assign_stmt_p):
+ Use ifcvt_could_trap_p also when not flag_tree_loop_if_convert_stores.
+ (if_convertible_loop_p_1): For this always compute bb predicates.
+ (if_convertible_loop_p): And free them.
+
2015-07-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* ipa-icf.c (sem_item_optimizer::do_congruence_step): Fix typo
return true;
}
- if (gimple_assign_rhs_could_trap_p (stmt))
+ if (ifcvt_could_trap_p (stmt, refs))
{
if (ifcvt_can_use_mask_load_store (stmt))
{
}
}
- if (flag_tree_loop_if_convert_stores)
- {
- data_reference_p dr;
+ data_reference_p dr;
- for (i = 0; refs->iterate (i, &dr); i++)
- {
- dr->aux = XNEW (struct ifc_dr);
- DR_WRITTEN_AT_LEAST_ONCE (dr) = -1;
- DR_RW_UNCONDITIONALLY (dr) = -1;
- }
- predicate_bbs (loop);
+ for (i = 0; refs->iterate (i, &dr); i++)
+ {
+ dr->aux = XNEW (struct ifc_dr);
+ DR_WRITTEN_AT_LEAST_ONCE (dr) = -1;
+ DR_RW_UNCONDITIONALLY (dr) = -1;
}
+ predicate_bbs (loop);
for (i = 0; i < loop->num_nodes; i++)
{
return false;
}
- if (flag_tree_loop_if_convert_stores)
- for (i = 0; i < loop->num_nodes; i++)
- free_bb_predicate (ifc_bbs[i]);
+ for (i = 0; i < loop->num_nodes; i++)
+ free_bb_predicate (ifc_bbs[i]);
/* Checking PHIs needs to be done after stmts, as the fact whether there
are any masked loads or stores affects the tests. */
res = if_convertible_loop_p_1 (loop, &loop_nest, &refs, &ddrs,
any_mask_load_store);
- if (flag_tree_loop_if_convert_stores)
- {
- data_reference_p dr;
- unsigned int i;
-
- for (i = 0; refs.iterate (i, &dr); i++)
- free (dr->aux);
- }
+ data_reference_p dr;
+ unsigned int i;
+ for (i = 0; refs.iterate (i, &dr); i++)
+ free (dr->aux);
free_data_refs (refs);
free_dependence_relations (ddrs);