comments

Stephen Weeks MLton@sourcelight.com
Wed, 14 Mar 2001 13:12:22 -0800 (PST)


> A syntactic inliner would have inlined loop at the call
> to sum even though its body has a recursive call;

I disagree.  For example, the inliner described in Appel's book would not do
anything here.  Would your inliner in "Flow directed inlining" do anything with
loop? 

I don't see any connection between the contification transformation and inlining
on this example.  No beta-reduction has been done -- no actual arguments have
been substituted for formal parameters.  There are still the same number of
calls to loop.  In particular, the outer call loop (v, 0, 0) is still there.

> The meta-level comment here is that anyone who
> isn't very familiar with contification might be confused 
> (legitimately, I think) into questioning whether the end
> effect of contification is any different from what a better
> known aggressive code-motion optimization like inlining
> might achieve.
> 
> It's not a big deal, but I think it would be nice to add
> a bit of clarification about what the differences are.

OK.  Assuming you agree with my point above, I'll add something similar to the
paper.