From: Richard Biener Date: Fri, 10 Jul 2015 08:20:15 +0000 (+0000) Subject: tree-if-conv.c (if_convertible_gimple_assign_stmt_p): Use ifcvt_could_trap_p also... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=094fe02336be4ba0bf630ab056d34c0333ff0852;p=gcc.git tree-if-conv.c (if_convertible_gimple_assign_stmt_p): Use ifcvt_could_trap_p also when not flag_tree_loop_if_convert_stores. 2015-07-10 Richard Biener * 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. From-SVN: r225654 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9862267e857..20a13016851 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2015-07-10 Richard Biener + + * 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 * ipa-icf.c (sem_item_optimizer::do_congruence_step): Fix typo diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c index ef2612c959c..a1a584bdf8d 100644 --- a/gcc/tree-if-conv.c +++ b/gcc/tree-if-conv.c @@ -874,7 +874,7 @@ if_convertible_gimple_assign_stmt_p (gimple stmt, 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)) { @@ -1297,18 +1297,15 @@ if_convertible_loop_p_1 (struct loop *loop, } } - 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++) { @@ -1323,9 +1320,8 @@ if_convertible_loop_p_1 (struct loop *loop, 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. */ @@ -1399,14 +1395,10 @@ if_convertible_loop_p (struct loop *loop, bool *any_mask_load_store) 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);