Skip to content
  • nfrisby's avatar
    ignore RealWorld in size_expr; flag to keep w/w from creating sharing · af12cf66
    nfrisby authored
    size_expr now ignores RealWorld lambdas, arguments, and applications.
    
    Worker-wrapper previously removed all lambdas from a function, if they
    were all unused. Removing *all* value lambdas is no longer
    allowed. Instead (\_ -> E) will become (\_void -> E), where it used to
    become E. The previous behavior can be recovered via the new
    -ffun-to-thunk flag.
    
    Nofib notables:
    
    ----------------------------------------------------------------
            Program               O2          O2 newly ignoring RealWorld
                                              and not turning function
                                              closures into thunks
    ----------------------------------------------------------------
    
     Allocations
    
      comp_lab_zift            333090392%           -5.0%
    reverse-complem            155188304%           -3.2%
    
            rewrite             15380888%           +4.0%
             boyer2              3901064%           +7.5%
    
    rewrite previously benefited from fortunate LoopBreaker choice that is
    now disrupted.
    
    A function in boyer2 goes from $wonewayunify1 size 700 to size 650,
    thus gets inlined into rewritelemmas, thus exposing a parameter
    scrutinisation, thus allowing SpecConstr, which unfortunately involves
    reboxing.
    
    Run Time
    
     fannkuch-redux                 7.89%          -15.9%
    
                hpg                 0.25%           +5.6%
               wang                 0.21%           +5.8%
    
    /shrug
    af12cf66