localRef vs. loopInvariant pass ordering
   
    Henry Cejtin
     
    henry@sourcelight.com
       
    Fri, 30 Nov 2001 23:32:55 -0600
    
    
  
In  the  logs you (Matthew?) say that the localRef pass should definitely run
after the loopInvariant because more will be handled since  the  ref's  might
not be passed around afterwards.  That makes sense, but are you sure that the
extra args introduced (to carry values that used to  be  in  the  ref  cells)
won't be candidates for loop-invariant hoisting?  If so then there would be a
gain to running a loopInvariant pass after localRef.
By  the  way,  really  impressive  to  see  the  compiler  figure  out   that
MLton.Random.rand  was  only  called  once  and must return an even value and
hence knew that one of the functions was dead code.