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]

Re: patch to reduce register pressure from strength reduction


> And of course we should test this :-)  Can you do a -funroll-loops bootstrap
> with this patch before installing it?

This bootstrap attempt found a different problem - the assembler complained
about duplicate labels.  Loop unrolling had duplicated and EH region.
The appended patch disables unrolling when there are EH notes in the loop:

Wed Feb  3 08:13:38 1999  J"orn Rennecke <amylaar@cygnus.co.uk>

	* unroll.c (unroll_loop): Disable unrolling when seeing EH region
	notes.

*** unroll.c-1999020306	Wed Feb  3 06:42:48 1999
--- unroll.c	Wed Feb  3 08:11:46 1999
*************** unroll_loop (loop_end, insn_count, loop_
*** 284,289 ****
--- 284,300 ----
  		block_begins++;
  	      else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
  		block_ends++;
+ 	      /* EH regions have to be unique.  Till the actual unrolling
+ 		 can remap the EH region numbers, disable unrolling for
+ 		 loops that contain begin / end notes of EH regions.  */
+ 	      else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN__EH_REGION_BEG
+ 		       || NOTE_LINE_NUMBER (insn) == NOTE_INSN__EH_REGION_BEG)
+ 		{
+ 		  if (loop_dump_stream)
+ 		    fprintf (loop_dump_stream,
+ 			     "Unrolling failure: Found EH region note.\n");
+ 		  return;
+ 		}
  	    }
  	}
  

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