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: a .NET alternative (GJC et al)


Fergus Henderson <fjh@cs.mu.oz.au> writes:

[GC, backend cooperation

> The reason that this technique works is that the back-end compiler
> can't do any fancy optimizations on locals.p and local.q, since
> &locals has been stored in a global variable and so any function
> call might update them.

But there is a subtle form of backend cooperation lurking here: You
assume that the backend does not know too much about the functions
being called.  In fact, if there isn't a collector, the stack frame
marking does not have any externally visible effect, so it is legal to
optimize it away completely.

In order to make things work, you have to throw in a few volatile
qualifiers here and there, I think, which will deteriorate performance
further.


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