This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix -fsched-stalled-insns on ia64 (PR middle-end/33670)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>, Maxim Kuvyrkov <maxim at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 5 Nov 2007 14:06:32 -0500
- Subject: [PATCH] Fix -fsched-stalled-insns on ia64 (PR middle-end/33670)
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
The newly added pr33670.c which the last haifa-sched.c patch
fixed on ppc64 still ICEs on ia64. The problem is that check_sched_flags
asserts that -fsched-stalled-insns{,=N} isn't used on ia64 unless
-mno-sched-ar-data-spec is also used (which turns off DO_SPECULATION).
Maxim said in bugzilla he doesn't remember why he enforced it and that he
doesn't think it is needed, so the following patch just removes those
assertions.
Bootstrapped/regtested on ia64-linux, additionally I have also run
make check with RUNTESTFLAGS=--target_board=unix/-fsched-stalled-insns=0
and there were no regressions against normal make check.
Ok for trunk?
2007-11-05 Maxim Kuvyrkov <maxim@codesourcery.com>
Jakub Jelinek <jakub@redhat.com>
PR middle-end/33670
* haifa-sched.c (check_sched_flags): Remove.
(sched_init): Don't call it.
--- gcc/haifa-sched.c.jj 2007-11-05 08:11:58.000000000 -0500
+++ gcc/haifa-sched.c 2007-11-05 08:33:57.000000000 -0500
@@ -582,7 +582,6 @@ static void add_jump_dependencies (rtx,
#ifdef ENABLE_CHECKING
static int has_edge_p (VEC(edge,gc) *, int);
static void check_cfg (rtx, rtx);
-static void check_sched_flags (void);
#endif
#endif /* INSN_SCHEDULING */
@@ -2692,9 +2691,6 @@ sched_init (void)
else
/* So we won't read anything accidentally. */
spec_info = 0;
-#ifdef ENABLE_CHECKING
- check_sched_flags ();
-#endif
}
else
/* So we won't read anything accidentally. */
@@ -4517,20 +4513,6 @@ check_cfg (rtx head, rtx tail)
gcc_assert (bb == 0);
}
-
-/* Perform a few consistency checks of flags in different data structures. */
-static void
-check_sched_flags (void)
-{
- unsigned int f = current_sched_info->flags;
-
- if (flag_sched_stalled_insns)
- gcc_assert (!(f & DO_SPECULATION));
- if (f & DO_SPECULATION)
- gcc_assert (!flag_sched_stalled_insns
- && spec_info
- && spec_info->mask);
-}
#endif /* ENABLE_CHECKING */
#endif /* INSN_SCHEDULING */
Jakub