aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@arm.com>2017-10-12 14:25:36 +0000
committerBin Cheng <amker@gcc.gnu.org>2017-10-12 14:25:36 +0000
commit6dc29d3adcadf6f138898a3f43663f806c1a41ce (patch)
treeeacd92a2484af59bbca3bd89ef85b70786163ba9
parentf0c216e1162d40748b3bc085146f386ca2109f46 (diff)
downloadgcc-6dc29d3adcadf6f138898a3f43663f806c1a41ce.zip
gcc-6dc29d3adcadf6f138898a3f43663f806c1a41ce.tar.gz
gcc-6dc29d3adcadf6f138898a3f43663f806c1a41ce.tar.bz2
tree-loop-distribution.c (break_alias_scc_partitions): Add comment and set PTYPE_SEQUENTIAL for merged partition.
* tree-loop-distribution.c (break_alias_scc_partitions): Add comment and set PTYPE_SEQUENTIAL for merged partition. From-SVN: r253678
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-loop-distribution.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cba344b..d0eb167 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-12 Bin Cheng <bin.cheng@arm.com>
+
+ * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
+ and set PTYPE_SEQUENTIAL for merged partition.
+
2017-10-12 Richard Biener <rguenther@suse.de>
PR tree-optimization/69728
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index 98ad50e..8e8ac7e 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -2066,7 +2066,7 @@ break_alias_scc_partitions (struct graph *rdg,
auto_vec<enum partition_type> scc_types;
struct partition *partition, *first;
- /* If all paritions in a SCC has the same type, we can simply merge the
+ /* If all partitions in a SCC have the same type, we can simply merge the
SCC. This loop finds out such SCCS and record them in bitmap. */
bitmap_set_range (sccs_to_merge, 0, (unsigned) num_sccs);
for (i = 0; i < num_sccs; ++i)
@@ -2079,6 +2079,10 @@ break_alias_scc_partitions (struct graph *rdg,
if (pg->vertices[j].component != i)
continue;
+ /* Note we Merge partitions of parallel type on purpose, though
+ the result partition is sequential. The reason is vectorizer
+ can do more accurate runtime alias check in this case. Also
+ it results in more conservative distribution. */
if (first->type != partition->type)
{
bitmap_clear_bit (sccs_to_merge, i);
@@ -2100,7 +2104,7 @@ break_alias_scc_partitions (struct graph *rdg,
if (bitmap_count_bits (sccs_to_merge) != (unsigned) num_sccs)
{
/* Run SCC finding algorithm again, with alias dependence edges
- skipped. This is to topologically sort paritions according to
+ skipped. This is to topologically sort partitions according to
compilation time known dependence. Note the topological order
is stored in the form of pg's post order number. */
num_sccs_no_alias = graphds_scc (pg, NULL, pg_skip_alias_edge);
@@ -2143,6 +2147,8 @@ break_alias_scc_partitions (struct graph *rdg,
data = (struct pg_vdata *)pg->vertices[k].data;
gcc_assert (data->id == k);
data->partition = NULL;
+ /* The result partition of merged SCC must be sequential. */
+ first->type = PTYPE_SEQUENTIAL;
}
}
}