This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to reduce register pressure from strength reduction
- To: law at cygnus dot com
- Subject: Re: patch to reduce register pressure from strength reduction
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Wed, 3 Feb 1999 08:16:39 +0000 (GMT)
- Cc: amylaar at cygnus dot co dot uk, wilson at cygnus dot com, egcs-patches at egcs dot cygnus dot com
> 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;
+ }
}
}