This is the mail archive of the
mailing list for the GCC project.
Re: GC changes
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.