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-08-08 16:21:57 +0200 |
commit | d4ac6ce5bac797bc2aa5f14ae7c490b4d16c2632 (patch) | |
tree | 902042c926a9f59b695152f43a8515494580d5f5 | |
parent | 3090be7c3092a14d274327b9690ff53615498001 (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 48ed96bb7b90..516a4cfe46b7 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2864,6 +2864,18 @@ vect_slp_analyze_operations (vec_info *vinfo) vect_free_slp_instance (instance); vinfo->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); + vinfo->slp_instances.ordered_remove (i); + } else i++; } |