GC changes

Jamie Lokier egcs@tantalophile.demon.co.uk
Mon Jan 15 10:28:00 GMT 2001


Jamie Lokier wrote:
> > > > We already need a switch to disable GC unfriendly optimizations.
> > 
> > Which ones would that be?
> 
> The rule is: if a memory object may be accessed after an insn, a pointer
> to the object(*) must be present in a register or on the stack.

Actually there is another approach.  You could generate unwind stubs
similar to exception handling, with a table indexed by program counter
to the stubs.  For most program addresses the stub would be empty, but
for certain places where only an offset address is present, the stub
would generate the non-offset address.

This has the advantage that no optimisation is penalised.  It's quite
complex to implement though.

-- Jamie


More information about the Gcc mailing list