* [PATCH] Properly release pattern stmts
@ 2014-02-17 15:26 Richard Biener
2014-02-17 15:31 ` Jakub Jelinek
0 siblings, 1 reply; 2+ messages in thread
From: Richard Biener @ 2014-02-17 15:26 UTC (permalink / raw)
To: gcc-patches; +Cc: Jakub Jelinek
This makes sure pattern stmts do not appear to be in the IL,
first by setting their BB to NULL again (the vectorizer sets this
for convenience I guess) and second by releasing SSA names we
temporarily allocated.
Esp. the non-NULL BB may confuse passes walking over
non-released SSA names.
Bootstrapped and tested on x86_64-unknown-linux-gnu, ok?
Thanks,
Richard.
2014-02-17 Richard Biener <rguenther@suse.de>
* tree-vect-stmts.c (free_stmt_vec_info): Clear BB and
release SSA defs of pattern stmts.
Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c (revision 207757)
+++ gcc/tree-vect-stmts.c (working copy)
@@ -7389,13 +7389,25 @@ free_stmt_vec_info (gimple stmt)
if (patt_info)
{
gimple_seq seq = STMT_VINFO_PATTERN_DEF_SEQ (patt_info);
+ gimple patt_stmt = STMT_VINFO_STMT (patt_info);
+ gimple_set_bb (patt_stmt, NULL);
+ tree lhs = gimple_get_lhs (patt_stmt);
+ if (TREE_CODE (lhs) == SSA_NAME)
+ release_ssa_name (lhs);
if (seq)
{
gimple_stmt_iterator si;
for (si = gsi_start (seq); !gsi_end_p (si); gsi_next (&si))
- free_stmt_vec_info (gsi_stmt (si));
+ {
+ gimple seq_stmt = gsi_stmt (si);
+ gimple_set_bb (seq_stmt, NULL);
+ lhs = gimple_get_lhs (patt_stmt);
+ if (TREE_CODE (lhs) == SSA_NAME)
+ release_ssa_name (lhs);
+ free_stmt_vec_info (seq_stmt);
+ }
}
- free_stmt_vec_info (STMT_VINFO_RELATED_STMT (stmt_info));
+ free_stmt_vec_info (patt_stmt);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Properly release pattern stmts
2014-02-17 15:26 [PATCH] Properly release pattern stmts Richard Biener
@ 2014-02-17 15:31 ` Jakub Jelinek
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2014-02-17 15:31 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches
On Mon, Feb 17, 2014 at 04:25:25PM +0100, Richard Biener wrote:
>
> This makes sure pattern stmts do not appear to be in the IL,
> first by setting their BB to NULL again (the vectorizer sets this
> for convenience I guess) and second by releasing SSA names we
> temporarily allocated.
>
> Esp. the non-NULL BB may confuse passes walking over
> non-released SSA names.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu, ok?
>
> Thanks,
> Richard.
>
> 2014-02-17 Richard Biener <rguenther@suse.de>
>
> * tree-vect-stmts.c (free_stmt_vec_info): Clear BB and
> release SSA defs of pattern stmts.
Ok.
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-17 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17 15:26 [PATCH] Properly release pattern stmts Richard Biener
2014-02-17 15:31 ` Jakub Jelinek
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).