* [PATCH] vect_slp_analyze_node_dependences TLC
@ 2015-11-10 10:10 Richard Biener
0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2015-11-10 10:10 UTC (permalink / raw)
To: gcc-patches
Some TLC also preparing for further enhancements.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied.
Richard.
2015-11-10 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
Handle memory using/clobbering stmts without a STMT_VINFO_DATA_REF
conservatively.
Index: gcc/tree-vect-data-refs.c
===================================================================
--- gcc/tree-vect-data-refs.c (revision 230020)
+++ gcc/tree-vect-data-refs.c (working copy)
@@ -573,21 +595,22 @@ vect_slp_analyze_node_dependences (slp_i
gimple *access = SLP_TREE_SCALAR_STMTS (node)[k];
if (access == last_access)
continue;
- stmt_vec_info access_stmt_info = vinfo_for_stmt (access);
- gimple_stmt_iterator gsi = gsi_for_stmt (access);
- gsi_next (&gsi);
- for (; gsi_stmt (gsi) != last_access; gsi_next (&gsi))
+ data_reference *dr_a = STMT_VINFO_DATA_REF (vinfo_for_stmt (access));
+ for (gimple_stmt_iterator gsi = gsi_for_stmt (access);
+ gsi_stmt (gsi) != last_access; gsi_next (&gsi))
{
gimple *stmt = gsi_stmt (gsi);
- stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
- if (!STMT_VINFO_DATA_REF (stmt_info)
- || (DR_IS_READ (STMT_VINFO_DATA_REF (stmt_info))
- && DR_IS_READ (STMT_VINFO_DATA_REF (access_stmt_info))))
+ if (! gimple_vuse (stmt)
+ || (DR_IS_READ (dr_a) && ! gimple_vdef (stmt)))
continue;
- ddr_p ddr = initialize_data_dependence_relation
- (STMT_VINFO_DATA_REF (access_stmt_info),
- STMT_VINFO_DATA_REF (stmt_info), vNULL);
+ /* If we couldn't record a (single) data reference for this
+ stmt we have to give up. */
+ data_reference *dr_b = STMT_VINFO_DATA_REF (vinfo_for_stmt (stmt));
+ if (!dr_b)
+ return false;
+
+ ddr_p ddr = initialize_data_dependence_relation (dr_a, dr_b, vNULL);
if (vect_slp_analyze_data_ref_dependence (ddr))
{
/* ??? If the dependence analysis failed we can resort to the
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-11-10 10:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-10 10:10 [PATCH] vect_slp_analyze_node_dependences TLC 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).