[RFC] Kill gen_sequence

Richard Henderson rth@redhat.com
Mon Jun 10 10:33:00 GMT 2002


On Thu, Jun 06, 2002 at 02:33:43AM -0700, David S. Miller wrote:
> 2) Alpha setjmp receiver.  It is trying to optimize setjmping to the
>    current PC.  I didn't see how that could be all that useful so
>    I simply deleted the optimization.

That's not what it does.

After a setjmp, we must reload the GP.  This is inherently a pc-relative
operation.  Thus we must have the PC of the GP reload in a register.
This may be accomplished either by branching to the next instruction, or
being adjacent to the setjmp receiver label (since longjmp places the
jump address in a known location).

Except that if we have a frame pointer (via -O0 or alloca), the generic
code re-computes the frame pointer before invoking the setjmp receiver
pattern, thus the GP reload may not be adjacent to the label, thus we 
have to be prepared to reload the PC.

So this optimization applies any time we don't need a frame pointer,
which is of course fairly common.

>    I could be wrong, and if I am this could be easily implemented
>    in some other way.

Emitting a NOTE_INSN_DELETED note, probably.



r~



More information about the Gcc-patches mailing list