diff options
author | Richard Biener <rguenther@suse.de> | 2020-06-10 18:07:37 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2020-06-10 18:08:29 +0200 |
commit | 371cc683371bedb0e53ebcee0c0e89604a1e74b1 (patch) | |
tree | 6d6e1ce414c714c78681b4245f2fe6c437fe0573 /gcc/tree-vect-patterns.c | |
parent | 36e95a9e539a08275a0a6ef542a7fae5baa5710f (diff) | |
download | gcc-371cc683371bedb0e53ebcee0c0e89604a1e74b1.zip gcc-371cc683371bedb0e53ebcee0c0e89604a1e74b1.tar.gz gcc-371cc683371bedb0e53ebcee0c0e89604a1e74b1.tar.bz2 |
avoid stmt-info allocation for debug stmts
The following avoids allocating stmt info structs for debug stmts.
2020-06-10 Richard Biener <rguenther@suse.de>
* tree-vect-loop.c (vect_determine_vectorization_factor):
Skip debug stmts.
(_loop_vec_info::_loop_vec_info): Likewise.
(vect_update_vf_for_slp): Likewise.
(vect_analyze_loop_operations): Likewise.
(update_epilogue_loop_vinfo): Likewise.
* tree-vect-patterns.c (vect_determine_precisions): Likewise.
(vect_pattern_recog): Likewise.
* tree-vect-slp.c (vect_detect_hybrid_slp): Likewise.
(_bb_vec_info::_bb_vec_info): Likewise.
* tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized):
Likewise.
Diffstat (limited to 'gcc/tree-vect-patterns.c')
-rw-r--r-- | gcc/tree-vect-patterns.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c index 930f47e..636ad59 100644 --- a/gcc/tree-vect-patterns.c +++ b/gcc/tree-vect-patterns.c @@ -5112,8 +5112,9 @@ vect_determine_precisions (vec_info *vinfo) basic_block bb = bbs[nbbs - i - 1]; for (gimple_stmt_iterator si = gsi_last_bb (bb); !gsi_end_p (si); gsi_prev (&si)) - vect_determine_stmt_precisions - (vinfo, vinfo->lookup_stmt (gsi_stmt (si))); + if (!is_gimple_debug (gsi_stmt (si))) + vect_determine_stmt_precisions + (vinfo, vinfo->lookup_stmt (gsi_stmt (si))); } } else @@ -5478,6 +5479,8 @@ vect_pattern_recog (vec_info *vinfo) basic_block bb = bbs[i]; for (si = gsi_start_bb (bb); !gsi_end_p (si); gsi_next (&si)) { + if (is_gimple_debug (gsi_stmt (si))) + continue; stmt_vec_info stmt_info = vinfo->lookup_stmt (gsi_stmt (si)); /* Scan over all generic vect_recog_xxx_pattern functions. */ for (j = 0; j < NUM_PATTERNS; j++) @@ -5494,7 +5497,7 @@ vect_pattern_recog (vec_info *vinfo) { gimple *stmt = gsi_stmt (si); stmt_vec_info stmt_info = bb_vinfo->lookup_stmt (stmt); - if (stmt_info && !STMT_VINFO_VECTORIZABLE (stmt_info)) + if (!stmt_info || !STMT_VINFO_VECTORIZABLE (stmt_info)) continue; /* Scan over all generic vect_recog_xxx_pattern functions. */ |