This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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.

-- Jamie

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]