From: Bin Cheng <Bin.Cheng@arm.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: nd <nd@arm.com>
Subject: [PATCH PR81369/01]Sort partitions by post order for all cases
Date: Fri, 14 Jul 2017 14:32:00 -0000 [thread overview]
Message-ID: <VI1PR0802MB2176981E51639B76489281C4E7AD0@VI1PR0802MB2176.eurprd08.prod.outlook.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
Hi,
This patch fixes ICE reported by PR81369. It simply sinks call to
sort_partitions_by_post_order so that it's executed for all cases.
This is necessary to schedule reduction partition as the last one.
Bootstrap and test on x86_64 and AArch64. Is it OK?
Thanks,
bin
2017-07-12 Bin Cheng <bin.cheng@arm.com>
PR target/81369
* tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
function sort_partitions_by_post_order.
gcc/testsuite/ChangeLog
2017-07-12 Bin Cheng <bin.cheng@arm.com>
PR target/81369
* gcc.dg/tree-ssa/pr81369.c: New.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-pr81369-1.txt.patch --]
[-- Type: text/x-patch; name="0001-pr81369-1.txt.patch", Size: 1588 bytes --]
From 685bab237e38544375dcc9a950ae2816b8e4385b Mon Sep 17 00:00:00 2001
From: Bin Cheng <binche01@e108451-lin.cambridge.arm.com>
Date: Wed, 12 Jul 2017 12:04:49 +0100
Subject: [PATCH 1/2] pr81369-1.txt
---
gcc/testsuite/gcc.dg/tree-ssa/pr81369.c | 23 +++++++++++++++++++++++
gcc/tree-loop-distribution.c | 3 ++-
2 files changed, 25 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr81369.c
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr81369.c b/gcc/testsuite/gcc.dg/tree-ssa/pr81369.c
new file mode 100644
index 0000000..b40477b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr81369.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribution" } */
+
+typedef __PTRDIFF_TYPE__ intptr_t;
+int wo;
+
+void
+sy (long int *as)
+{
+ for (;;)
+ {
+ *as = wo;
+ while (as < (long int *) (void *) 2)
+ {
+ int *y9;
+
+ if (wo != 0)
+ *y9 = (int) (intptr_t) &wo;
+ wo /= (wo != 0 && *y9 != 0);
+ ++as;
+ }
+ }
+}
diff --git a/gcc/tree-loop-distribution.c b/gcc/tree-loop-distribution.c
index be0a660..fe678a5 100644
--- a/gcc/tree-loop-distribution.c
+++ b/gcc/tree-loop-distribution.c
@@ -1997,8 +1997,9 @@ merge_dep_scc_partitions (struct graph *rdg,
data->partition = NULL;
}
}
- sort_partitions_by_post_order (pg, partitions);
}
+
+ sort_partitions_by_post_order (pg, partitions);
gcc_assert (partitions->length () == (unsigned)num_sccs);
free_partition_graph_vdata (pg);
free_graph (pg);
--
1.9.1
next reply other threads:[~2017-07-14 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-14 14:32 Bin Cheng [this message]
2017-07-17 10:11 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=VI1PR0802MB2176981E51639B76489281C4E7AD0@VI1PR0802MB2176.eurprd08.prod.outlook.com \
--to=bin.cheng@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=nd@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).