This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[dataflow][RFC] Call df_ri_add_problem with DF_RI_LIFE at sms_schedule
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jan 2007 08:49:11 +0900 (JST)
- Subject: [dataflow][RFC] Call df_ri_add_problem with DF_RI_LIFE at sms_schedule
When running testsuite on SH, there is an ICE
FAIL: gcc.dg/20050321-1.c (internal compiler error)
with a segfault:
Program received signal SIGSEGV, Segmentation fault.
0x08262d40 in init_alias_analysis () at ../../TMP/dataflow/gcc/alias.c:2563
2563 else if (REG_N_SETS (regno) == 1
(gdb) bt
#0 0x08262d40 in init_alias_analysis () at ../../TMP/dataflow/gcc/alias.c:2563
#1 0x087e02fb in sched_init () at ../../TMP/dataflow/gcc/haifa-sched.c:2627
#2 0x087f71a6 in sms_schedule () at ../../TMP/dataflow/gcc/modulo-sched.c:912
where regno is 236 which comes from the insn
(insn 142 102 143 6 (set (reg/f:SI 236)
(symbol_ref:SI ("__fpscr_values") [flags 0x40] <var_decl 0xb7f98540 __fpscr_values>)) -1 (nil)
(nil))
The above insn is added at mode-switching pass which runs just
before SMS pass where the segfault happens in problematic case.
With the attached patch, the error went away, though I'm not
sure whether this is the right thing or not. Bootstrapped and
regtested on i686-pc-linux-gnu and sh4-unknown-linux-gnu with no
new failures.
Regards,
kaz
--
* modulo-sched.c (sms_schedule): Call df_ri_add_problem
with DF_RI_LIFE.
diff -uprN ORIG/dataflow/gcc/modulo-sched.c LOCAL/dataflow/gcc/modulo-sched.c
--- ORIG/dataflow/gcc/modulo-sched.c 2007-01-24 09:06:41.000000000 +0900
+++ LOCAL/dataflow/gcc/modulo-sched.c 2007-01-27 21:27:41.000000000 +0900
@@ -1,5 +1,5 @@
/* Swing Modulo Scheduling implementation.
- Copyright (C) 2004, 2005, 2006
+ Copyright (C) 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Contributed by Ayal Zaks and Mustafa Hagog <zaks,mustafa@il.ibm.com>
@@ -906,7 +906,7 @@ sms_schedule (void)
df_set_flags (DF_LR_RUN_DCE);
df_rd_add_problem ();
df_ru_add_problem ();
- df_ri_add_problem (0);
+ df_ri_add_problem (DF_RI_LIFE);
df_chain_add_problem (DF_DU_CHAIN + DF_UD_CHAIN);
df_analyze ();
sched_init ();