diff options
author | Dominik Inführ <dominik.infuehr@theobroma-systems.com> | 2017-07-05 15:09:34 +0200 |
---|---|---|
committer | Christoph Muellner <christoph.muellner@theobroma-systems.com> | 2018-04-27 12:17:53 +0200 |
commit | a3ba4a0362e6707ca4ac86ee8590faecc10ae5d4 (patch) | |
tree | cc4b7fa01a67dbbfd732006de37283f3c7bce46f | |
parent | 7c9039cf2c981fe243d2807ce4305f30555c5da3 (diff) |
tree-vect-slp: Enable vectorization when -fnoalias is given.
GCC 6+ detects more SLP instances compared to earlier versions.
Cost analysis is done for all instances together and not all
combinations. Additional instances make vectorization unprofitable,
fix it by ignoring all but first instance when -fnoalias is given.
-rw-r--r-- | gcc/tree-vect-slp.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index e2f1c6c7096c..4c5dc880678f 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2526,6 +2526,18 @@ vect_slp_analyze_operations (vec<slp_instance> slp_instances, void *data) vect_free_slp_instance (instance); slp_instances.ordered_remove (i); } + else if (noalias != 0 && i > 0) + { + dump_printf_loc (MSG_NOTE, vect_location, + "removing SLP instance operations starting from: "); + dump_gimple_stmt (MSG_NOTE, TDF_SLIM, + SLP_TREE_SCALAR_STMTS + (SLP_INSTANCE_TREE (instance))[0], 0); + dump_printf_loc (MSG_NOTE, vect_location, + "remove all but first instance\n"); + vect_free_slp_instance (instance); + slp_instances.ordered_remove (i); + } else { /* Compute the costs of the SLP instance. */ |