This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Prevent scheduler moving cc0 setter between blocks.
- From: Nick Clifton <nickc at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: vmakarov at redhat dot com, dhazeghi at yahoo dot com
- Date: Tue, 29 Jul 2003 17:50:55 +0100
- Subject: Prevent scheduler moving cc0 setter between blocks.
- References: <m3vftmwtnw.fsf@redhat.com> <3F256E6B.44747941@redhat.com><m37k611l81.fsf@redhat.com> <3F2681E1.114B1813@redhat.com>
Hi Richard,
The v850 port is currently failing to build because of a bug in the
non-dfa scheduler: The code is allowing a cc0 setter instruction to
be pulled into an earlier block, breaking the cc0 setter/user
dependency and causing an internal failure when the code tries to
schedule the unaccompanied cc0 user instruction.
This patch, developed by Vlad, fixes the problem. May I apply it
please ?
Cheers
Nick
2003-07-28 Vladimir Makarov <vmakarov@redhat.com>
* sched-deps.c (sched_analyze_2): Prevent interblock move of CC0
setter.
Index: sched-deps.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-deps.c,v
retrieving revision 1.59
diff -c -p -r1.59 sched-deps.c
*** sched-deps.c 6 Jul 2003 12:35:55 -0000 1.59
--- sched-deps.c 28 Jul 2003 18:35:25 -0000
*************** sched_analyze_2 (struct deps *deps, rtx
*** 625,630 ****
--- 625,633 ----
case CC0:
/* User of CC0 depends on immediately preceding insn. */
set_sched_group_p (insn);
+ /* Don't move CC0 setter to another block (it can set up the
+ same flag for previous CC0 users which is safe). */
+ CANT_MOVE (prev_nonnote_insn (insn)) = 1;
return;
#endif