This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Outdated stuff in gcc.texi
- To: mark at codesourcery dot com, martin at loewis dot home dot cs dot tu-berlin dot de
- Subject: Re: Outdated stuff in gcc.texi
- From: Mike Stump <mrs at windriver dot com>
- Date: Tue, 11 Jan 2000 12:16:20 -0800 (PST)
- Cc: dstarner98 at aasaa dot ofe dot org, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
> Date: Tue, 11 Jan 2000 09:33:08 +0100
> From: "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
> > Loop unrolling and exceptions still don't mix.
> I was surprised by that statement, so I did some experimentation.
> Compiling
> struct A{
> ~A();
> };
> int foo();
> int main()
> {
> for(int i=0;i<4;i++){
> A a;
> foo();
> }
> }
> with -O2 -funroll-loops indeed generates duplicate assembler labels on
> i586-pc-linux-gnu, due to gcc recycling the assembler labels for the
> exception cleanup regions when unrolling.
Not for me it doesn't, maybe your sources are out of date. ;-P
> From: Mark Mitchell <mark@codesourcery.com>
> Date: Tue, 11 Jan 2000 00:59:39 -0800
> Right now we work very hard to put exception regions at the end of the
> function. This involves lots of pushing and popping of sequences,
> etc.; it makes for lots of hair. And, then, things like this don't
> work.
? Maybe there are deeper problems that I don't know about.
> This would simplify a lot of code, solve the unrolling problem,
Not the problem he posted. Am I wrong?
Anyway, below is what I put in. Sometimes reality doesn't match what
I say, sometimes I correct myself, other times I change change
reality. Any problems with it that anybody sees? Any other pointers
to unrolling not working flawlessly with EH?
Tue Jan 11 11:37:58 2000 Mike Stump <mrs@wrs.com>
* unroll.c (unroll_loop): Add EH support.
Doing diffs in ChangeLog~:
--------------
Doing diffs in unroll.c.~1~:
*** unroll.c.~1~ Tue Jan 4 15:03:15 2000
--- unroll.c Tue Jan 11 11:44:51 2000
*************** unroll_loop (loop_end, insn_count, loop_
*** 290,295 ****
--- 290,308 ----
block_begins++;
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
block_ends++;
+ if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG
+ || NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
+ {
+ /* Note, would be nice to add code to unroll EH
+ regions, but until that time, we punt (don't
+ unroll). For the proper way of doing it, see
+ expand_inline_function. */
+
+ if (loop_dump_stream)
+ fprintf (loop_dump_stream,
+ "Unrolling failure: cannot unroll EH regions.\n");
+ return;
+ }
}
}
--------------