This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix haifa handling of scope notes
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Date: Sat, 29 Dec 2001 21:44:59 +0100
- Subject: Fix haifa handling of scope notes
Hi,
the RIchards fix to haifa sched breaks my bootstrap on cfg branch. THe failure is caused
by function ending by NOTE_BLOCK_END note followed by barrier. Haifa
decides to put NOTE_BLOCK_END after barrier afterwards and makes cfglayout sanity
checking to die.
Bootstrapped on the branch, testing mainline.
BTW concerning the cfglayout fixes, I believe the code still is incorrect as it
is not able to handle multiple scope region sibbling in single basic block correctly
at least. Whats about using my patch for scope regions at insn basis?
I believe the new code to be more correct, easier, shorter and it can be classified as
bugfix...
Honza
Sat Dec 29 21:43:30 CET 2001 Jan Hubicka <jh@suse.cz>
* haifa-sched.c (reemit_other_notes): Set last insn properly.
Index: haifa-sched.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/haifa-sched.c,v
retrieving revision 1.190.2.1
diff -c -3 -p -r1.190.2.1 haifa-sched.c
*** haifa-sched.c 2001/12/29 16:53:35 1.190.2.1
--- haifa-sched.c 2001/12/29 20:37:19
*************** reemit_other_notes (head, tail)
*** 1613,1618 ****
--- 1613,1620 ----
if (NEXT_INSN (insert_after))
PREV_INSN (NEXT_INSN (insert_after)) = note_tail;
NEXT_INSN (insert_after) = note_tail;
+ if (insert_after == get_last_insn ())
+ set_last_insn (note_tail);
}
else
{