re new SML/NJ

Stephen Weeks
Mon, 13 Aug 2001 14:29:41 -0700

> Hmm.  This is my input program:
> Here is the assembly I get using the 20010806 release:
> skipGC_12:

I see what's happening.  The limit check pass is kind of arbitrary about where
it inserts checks.  It tries to move them as early as possible, in the hopes of
combining multiple checks together.  In this case, the branch of test that exits 
the loop does allocation and needs a check.  The limit check pass moves this
limit check earlier, into the loop.  This sucks.  I guess the limit check
inserter needs to be smarter, although I'm not exactly sure what the right
approach is.