patch to reduce register pressure from strength reduction

Joern Rennecke amylaar@cygnus.co.uk
Wed Feb 3 00:16:00 GMT 1999


> 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;
+ 		}
  	    }
  	}
  


More information about the Gcc-patches mailing list