This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Commit_one_edge_insertion fix
- To: egcs-patches at egcs dot cygnus dot com, rth at cygnus dot com
- Subject: Commit_one_edge_insertion fix
- From: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Date: Fri, 29 Oct 1999 22:54:14 +0200
Hi
The new gcse code tends to mess up LOOP_BEG notes and force loop to give up
Here is simple fix to flow.c to not emit code between LOOP_BEG and jump to
the ending condition of loop.
Similar happends for the LOOP_END note too, but I didn't made the patch yet.
BTW
adding the staetements to the end of basic block is done at three places
in
gcc (at least gcse, flow and reg-stack).
Maybe it would be nice to write function to return insn to emit insns after.
But I didn't found nice name for it.
Honza
Fri Oct 29 13:50:53 CEST 1999 Jam Hubicka
* flow.c (commit_one_edge_insertion): Do not emit code between LOOP_BEG
note and JUMP insn.
*** flow.c.old Fri Oct 29 10:58:15 1999
--- flow.c Fri Oct 29 11:03:00 1999
*************** commit_one_edge_insertion (e)
*** 1585,1590 ****
--- 1585,1593 ----
abort ();
before = bb->end;
+ if (GET_CODE ( PREV_INSN (before)) == NOTE
+ && NOTE_LINE_NUMBER ( PREV_INSN (before)) == NOTE_INSN_LOOP_BEG)
+ before = PREV_INSN (bb->end);
}
else
{