From: Bin Cheng Date: Mon, 31 Oct 2016 09:27:31 +0000 (+0000) Subject: tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c6a05b15083a92a3813783be0e86f0224ec2ba3;p=gcc.git tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data dependence check after visited store stmt. * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip unnecessary data dependence check after visited store stmt. From-SVN: r241696 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f29b9b507fc..49698e6af48 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-10-31 Bin Cheng + + * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Skip + unnecessary data dependence check after visited store stmt. + 2016-10-30 Bill Schmidt PR tree-optimization/71915 diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c index c99fa4069be..9346cfeafd2 100644 --- a/gcc/tree-vect-data-refs.c +++ b/gcc/tree-vect-data-refs.c @@ -583,6 +583,7 @@ vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node, if (!dr_b) return false; + bool dependent = false; /* If we run into a store of this same instance (we've just marked those) then delay dependence checking until we run into the last store because this is where it will have @@ -599,22 +600,21 @@ vect_slp_analyze_node_dependences (slp_instance instance, slp_tree node, = STMT_VINFO_DATA_REF (vinfo_for_stmt (store)); ddr_p ddr = initialize_data_dependence_relation (dr_a, store_dr, vNULL); - if (vect_slp_analyze_data_ref_dependence (ddr)) - { - free_dependence_relation (ddr); - return false; - } + dependent = vect_slp_analyze_data_ref_dependence (ddr); free_dependence_relation (ddr); + if (dependent) + break; } } - - ddr_p ddr = initialize_data_dependence_relation (dr_a, dr_b, vNULL); - if (vect_slp_analyze_data_ref_dependence (ddr)) + else { + ddr_p ddr = initialize_data_dependence_relation (dr_a, + dr_b, vNULL); + dependent = vect_slp_analyze_data_ref_dependence (ddr); free_dependence_relation (ddr); - return false; } - free_dependence_relation (ddr); + if (dependent) + return false; } } return true;