Commit_one_edge_insertion fix

Jan Hubicka
Fri Oct 29 13:54:00 GMT 1999

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.
adding the staetements to the end of basic block is done at three places
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.


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
+ 	    before = PREV_INSN (bb->end);

More information about the Gcc-patches mailing list