This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

exception-section patch, part 7



This is similar to patch #6. Loop optimization would ignore notes when
choosing insertion points. Here I adjust the insertion point so that
no NOTE_INSN_EH_HANDLER_{BEG,END} occur between the target and the actual
insertion point.

Sun Jun 28 19:49:33 1998  Bruno Haible  <bruno@linuix.math.u-bordeaux.fr>

        * loop.c (find_and_verify_loops): Take care of EH_HANDLER_* notes when
          choosing an insertion point for moved insns.

diff -c3p egcs-19980628/gcc/loop.c.bak egcs-19980628/gcc/loop.c
*** egcs-19980628/gcc/loop.c.bak	Sun Jun 21 19:33:00 1998
--- egcs-19980628/gcc/loop.c	Tue Jun 30 13:06:47 1998
*************** find_and_verify_loops (f)
*** 2553,2558 ****
--- 2553,2571 ----
  		      && uid_loop_num[INSN_UID (loc)] == target_loop_num)
  		    break;
  
+ 		/* Adjust LOC so that it is at the same EH_HANDLER nesting
+ 		   level as TARGET.  */
+ 		if (loc)
+ 		  for (loc = target; loc; loc = PREV_INSN (loc))
+ 		    if ((GET_CODE (loc) == BARRIER
+ 			 && uid_loop_num[INSN_UID (loc)] == target_loop_num)
+ 			|| (GET_CODE (loc) == NOTE
+ 			    && ((NOTE_LINE_NUMBER (loc)
+ 				 == NOTE_INSN_EH_HANDLER_BEG)
+ 				|| (NOTE_LINE_NUMBER (loc)
+ 				    == NOTE_INSN_EH_HANDLER_END))))
+ 		      break;
+ 
  		if (loc == 0)
  		  for (loc = target; loc; loc = NEXT_INSN (loc))
  		    if (GET_CODE (loc) == BARRIER


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]