[MLton] cvs commit: Added -inline-into-main {true|false}.

Stephen Weeks MLton@mlton.org
Thu, 3 Jun 2004 08:05:30 -0700

> It seems that what we really want is an inverse to the -inline option.
> That is, a flag that sets a maximum size on functions and prevents
> inlining (or contifying) into functions if doing so would exceed their
> maximum size.  

That sounds nice.  Unfortunately, such a flag will make it even
trickier to inline the right functions (like +) into main (and other
functions) while not inlining others.  There's also the problem that
we would need to modify the XML inliner as well as the SXML inliner.
For Joe's program, the main function is already huge at the start of
the SSA pipeline.  So, no amount of turning off SSA inlining and
contification will solve it.

> Because, in general, it doesn't seem to me that avoiding growing the
> size of the main function will necessarily solve the problem.  What
> prevents any other function from growing to an arbirary size and
> exhibiting the same behavior in the backend?

Nothing.  This is a problem.