[MLton-devel] eliminating Call from Machine.Transfer.t

Matthew Fluet fluet@CS.Cornell.EDU
Fri, 20 Dec 2002 23:36:23 -0500 (EST)


> I would like to eliminate the distinction in Machine.Kind.t between
> Func and Jump and to eliminate Call from Machine.Transfer.t, leaving
> only Goto.  To do this, I need to make explicit the stack push that
> is currently implicit in call.  This will cause no problems with the C
> codegen, but I am worried it may mess up the liveness information in
> the x86 codegen.  Should I be worried?  Or can I go ahead and
> eliminate the distinction?  Nothing else in machine or the C codegen
> cares.

Short answer: I think it will mess up liveness in the x86 codegen, but we
ought to be able to work around it.  IIRC, the liveness analysis for stack
slots and pseudo-regs does not check for modifications of stack top -- it
doesn't matter for pseudo-regs, and stack top shouldn't be modified until
the generate-transfers pass which will do all the stack top modifications,
and after which, we don't care about liveness (at least not in the same
way as it had been being used before).  It may be the case that modifying
stack top in the Machine IL won't make a difference -- control flow over
points where stack top changes are very stylized: either a non-tail call,
in which case there is a push followed by a pop, so stack slots "line up"
on either side of the call; or jumping to an exception, in which case
there is no intra-function control flow / liveness to follow.  I'll take a
look at things on Sunday or Monday and see if it's possible to work
around.




-------------------------------------------------------
This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
Time is running out!  Thinkgeek.com has the coolest gifts for
your favorite geek.   Let your fingers do the typing.   Visit Now.
T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel