This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix df-related ICE due to bbpart pass bug (PR target/81621)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>, Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 3 Aug 2017 10:46:45 +0200
- Subject: [PATCH] Fix df-related ICE due to bbpart pass bug (PR target/81621)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=jakub at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B0F1D37E67
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
The following testcase ICEs on s390x. The problem is that the bbpart pass
calls
df_set_flags (DF_DEFER_INSN_RESCAN);
because it wants to defer rescanning, but doesn't actually df_finish_pass
(it does in one case, but then calls df_set_flags with another changeable flag,
so it has the same issue), and if the IRA pass is invoked soon after it
without any df_finish_pass calls in between, we end up with deferred insn
rescanning during IRA which heavily relies on immediate insn rescanning.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
trunk?
2017-08-03 Jakub Jelinek <jakub@redhat.com>
PR target/81621
* bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
after setting changeable df flags.
* gcc.dg/pr81621.c: New test.
--- gcc/bb-reorder.c.jj 2017-07-21 10:28:13.000000000 +0200
+++ gcc/bb-reorder.c 2017-08-02 19:43:58.797243254 +0200
@@ -2904,7 +2904,7 @@ pass_partition_blocks::execute (function
crossing_edges = find_rarely_executed_basic_blocks_and_crossing_edges ();
if (!crossing_edges.exists ())
- return 0;
+ return TODO_df_finish;
crtl->has_bb_partition = true;
@@ -2970,7 +2970,7 @@ pass_partition_blocks::execute (function
df_analyze ();
}
- return 0;
+ return TODO_df_finish;
}
} // anon namespace
--- gcc/testsuite/gcc.dg/pr81621.c.jj 2017-08-02 19:52:08.435831121 +0200
+++ gcc/testsuite/gcc.dg/pr81621.c 2017-08-02 19:52:00.026924067 +0200
@@ -0,0 +1,5 @@
+/* PR target/81621 */
+/* { dg-do compile { target freorder } } */
+/* { dg-options "-Og -fno-split-wide-types -freorder-blocks-and-partition" } */
+
+#include "graphite/scop-10.c"
Jakub