public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-3275] tree-optimization/97098 - fix compile-time hog in SLP live
@ 2020-09-18  7:22 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2020-09-18  7:22 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:080ddd8a81ea39e92542fa7d7e2d7d27ee741710

commit r11-3275-g080ddd8a81ea39e92542fa7d7e2d7d27ee741710
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Sep 18 09:00:12 2020 +0200

    tree-optimization/97098 - fix compile-time hog in SLP live
    
    This fixes a missed early-out in SLP live stmt marking when
    all scalar stmts were already visited (oops).
    
    2020-09-18  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/97098
            * tree-vect-slp.c (vect_bb_slp_mark_live_stmts): Do not
            recurse to children when all stmts were already visited.

Diff:
---
 gcc/tree-vect-slp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index ecce7a982dd..ef62c2dff2e 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -3018,11 +3018,13 @@ vect_bb_slp_mark_live_stmts (bb_vec_info bb_vinfo, slp_tree node,
   unsigned i;
   stmt_vec_info stmt_info;
   stmt_vec_info last_stmt = vect_find_last_scalar_stmt_in_slp (node);
+  bool all_visited = true;
   FOR_EACH_VEC_ELT (SLP_TREE_SCALAR_STMTS (node), i, stmt_info)
     {
       stmt_vec_info orig_stmt_info = vect_orig_stmt (stmt_info);
       if (svisited.contains (orig_stmt_info))
 	continue;
+      all_visited = false;
       bool mark_visited = true;
       gimple *orig_stmt = orig_stmt_info->stmt;
       ssa_op_iter op_iter;
@@ -3091,6 +3093,8 @@ vect_bb_slp_mark_live_stmts (bb_vec_info bb_vinfo, slp_tree node,
       if (mark_visited)
 	svisited.add (orig_stmt_info);
     }
+  if (all_visited)
+    return;
 
   slp_tree child;
   FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (node), i, child)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-09-18  7:22 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18  7:22 [gcc r11-3275] tree-optimization/97098 - fix compile-time hog in SLP live Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).