diff options
author | Richard Biener <rguenther@suse.de> | 2020-10-27 14:16:45 +0100 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-10-27 15:08:21 +0100 |
commit | 686c1b70c70a8df4f8633c1b8eeb84a1fdaa48b2 (patch) | |
tree | 5ddf948d33ea588e4d85f7c1a9c7ed9295aac263 /gcc | |
parent | 16ad9ae85bb5b9acf80f9d1cf2be5a989ef7ba49 (diff) | |
download | gcc-686c1b70c70a8df4f8633c1b8eeb84a1fdaa48b2.zip gcc-686c1b70c70a8df4f8633c1b8eeb84a1fdaa48b2.tar.gz gcc-686c1b70c70a8df4f8633c1b8eeb84a1fdaa48b2.tar.bz2 |
Adjust BB vectorization function splitting
This adjusts the condition when to split at control altering stmts,
only when there's a definition. It also removes the only use
of --param slp-max-insns-in-bb which a previous change left doing
nothing (but repeatedly print a message for each successive
instruction...).
2020-10-27 Richard Biener <rguenther@suse.de>
* tree-vect-slp.c (vect_slp_bbs): Remove no-op
slp-max-insns-in-bb check.
(vect_slp_function): Dump when splitting the function.
Adjust the split condition for control altering stmts.
* params.opt (-param=slp-max-insns-in-bb): Remove.
* doc/invoke.texi (-param=slp-max-insns-in-bb): Likewise.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/doc/invoke.texi | 4 | ||||
-rw-r--r-- | gcc/params.opt | 4 | ||||
-rw-r--r-- | gcc/tree-vect-slp.c | 36 |
3 files changed, 23 insertions, 21 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index edea7ee..f82eeea 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -13749,10 +13749,6 @@ code to iterate. 2 allows partial vector loads and stores in all loops. The parameter only has an effect on targets that support partial vector loads and stores. -@item slp-max-insns-in-bb -Maximum number of instructions in basic block to be -considered for SLP vectorization. - @item avoid-fma-max-bits Maximum number of bits for which we avoid creating FMAs. diff --git a/gcc/params.opt b/gcc/params.opt index e05f7ff..563c67c 100644 --- a/gcc/params.opt +++ b/gcc/params.opt @@ -855,10 +855,6 @@ The number of prefetches that can run at the same time. Common Joined UInteger Var(param_sink_frequency_threshold) Init(75) IntegerRange(0, 100) Param Optimization Target block's relative execution frequency (as a percentage) required to sink a statement. --param=slp-max-insns-in-bb= -Common Joined UInteger Var(param_slp_max_insns_in_bb) Init(1000) Param Optimization -Maximum number of instructions in basic block to be considered for SLP vectorization. - -param=sms-dfa-history= Common Joined UInteger Var(param_sms_dfa_history) IntegerRange(0, 16) Param Optimization The number of cycles the swing modulo scheduler considers when checking conflicts using DFA. diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index f544b55..ba43adb 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -4336,14 +4336,6 @@ vect_slp_bbs (vec<basic_block> bbs) if (!vect_find_stmt_data_reference (NULL, stmt, &datarefs, &dataref_groups, current_group)) ++current_group; - - if (insns > param_slp_max_insns_in_bb) - { - if (dump_enabled_p ()) - dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, - "not vectorized: too many instructions in " - "region.\n"); - } } } @@ -4386,14 +4378,26 @@ vect_slp_function (function *fun) /* Split when a BB is not dominated by the first block. */ if (!bbs.is_empty () && !dominated_by_p (CDI_DOMINATORS, bb, bbs[0])) - split = true; + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "splitting region at dominance boundary bb%d\n", + bb->index); + split = true; + } /* Split when the loop determined by the first block is exited. This is because we eventually insert invariants at region begin. */ else if (!bbs.is_empty () && bbs[0]->loop_father != bb->loop_father && !flow_loop_nested_p (bbs[0]->loop_father, bb->loop_father)) - split = true; + { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "splitting region at loop %d exit at bb%d\n", + bbs[0]->loop_father->num, bb->index); + split = true; + } if (split && !bbs.is_empty ()) { @@ -4404,11 +4408,17 @@ vect_slp_function (function *fun) else bbs.safe_push (bb); - /* When we have a stmt ending this block we have to insert on - edges when inserting after it. Avoid this for now. */ + /* When we have a stmt ending this block and defining a + value we have to insert on edges when inserting after it for + a vector containing its definition. Avoid this for now. */ if (gimple *last = last_stmt (bb)) - if (is_ctrl_altering_stmt (last)) + if (gimple_get_lhs (last) + && is_ctrl_altering_stmt (last)) { + if (dump_enabled_p ()) + dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, + "splitting region at control altering " + "definition %G", last); r |= vect_slp_bbs (bbs); bbs.truncate (0); } |