limit check insertion

Matthew Fluet fluet@CS.Cornell.EDU
Wed, 24 Oct 2001 10:19:39 -0400 (EDT)


> The  code  size increase is really amazing.  Ah, it must be because the limit
> check includes the GC loop.  I.e., checking once per block wouldn't (I  would
> claim)  make the code much bigger as long as the code to actually call the GC
> was shared.  I.e., you have to pass
>     how many bytes you need
>     something indicating your frame layout
> and then you have to go to C code.  That C code can do the looping.  I  don't
> think that it does currently.

This is true; all of the checks and looping are done directly in assembly.
On the other hand, moving the entire GC check to C/runtime code poses
another performance hit -- we can do the checks in assembly without
spilling stack slots from registers, and, in the common case, we can just
keep going on the execution with values in registers.  On the otherhand,
if the GC check is a runtime call, then we need to ensure that all roots
are on the stack, so we need to spill to the stack before doing the check.

Moot point probably, since -native-live-stack is false by default, but
this is what we were hoping for.