limit check insertion
Matthew Fluet
Matthew Fluet <fluet@CS.Cornell.EDU>
Wed, 24 Oct 2001 10:49:33 -0400 (EDT)
> Do you have any stats that might support Henry's conjecture on basic
> block sizes?
No real numbers, but if you just look at a .ssa, probably close to 90% of
the blocks have < 5 statements. If just one of those statements is an
allocation, that's going to put in a limit check.
> I have to admit being quite surprised at the significant
> code blow-up size. I'm also curious about what percentage of those
> blocks where limit checks are inserted actually do any allocation
> at all; does limit-check.fun check whether any allocation occurs in
> the block?
Well, I see tons of limit checks for 0 bytes in the resulting code; so
that seems a little wasteful.
I'm also not convinced that what's checked in solves the vliw problem. I
can still trace around that loop and not encounter a non-zero limit check.
Meanwhile, I see things like this:
L_22 {kind = Jump, live = [SP(16), SP(20), SP(28), SU(8)]}:
LimitCheck {info = GCInfo {frameSize = 32,
live = [SP(16), SP(20), SP(28), SU(8)],
return = L_315},
bytes = 0,
stackCheck = false}
RP(7) = Allocate[(0 <- 0)]
RP(8) = Allocate[(0 <- RP(7), 4 <- SP(28))]
SP(32) = Allocate[(0 <- RP(8))]
...
which seems incorrect if there is no coalescing across blocks; nothing's
accounted for the 16 bytes just allocated.