GHC: Ticket #7664: consider free variables as well as parameters in inline discounts
http://ghc.haskell.org/trac/ghc/ticket/7664
<p>
The inliner assigns discount values for scrutinized parameters but not for scrutinized free variables.
</p>
<p>
Experimenting with an aggressive lambda float at the end of the core2core pipeline identified a situation where (effectively) assigning discounts to free variables gives a performance boost. (The free variables become parameters during the float and hence are then assigned discounts.)
</p>
<p>
For spectral/boyer2, doing the late lambda float and then simplifying results in a -7% improvement in allocation. Without the simplifications, the late lambda float alone does not change allocation: thus the lion's share of the -7% could be attained simply by assigning discounts to scrutinized free variables.
</p>
<p>
For reference: the function in boyer2 that gets inlined is a join point that arises near the top of the worker for "Rewritefns.onewayunify".
</p>
en-usGHChttp://ghc.haskell.org/trac/ghc/chrome/site/ghc_logo.png
http://ghc.haskell.org/trac/ghc/ticket/7664
Trac 1.0.9iglooTue, 05 Feb 2013 15:45:41 GMTstatus changed; difficulty, resolution set
http://ghc.haskell.org/trac/ghc/ticket/7664#comment:1
http://ghc.haskell.org/trac/ghc/ticket/7664#comment:1
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>difficulty</strong>
set to <em>Unknown</em>
</li>
<li><strong>resolution</strong>
set to <em>duplicate</em>
</li>
</ul>
<p>
Duplicate of <a class="closed ticket" href="http://ghc.haskell.org/trac/ghc/ticket/7663" title="feature request: consider free variables as well as parameters in inline discounts (closed: duplicate)">#7663</a>
</p>
TicketnfrisbyWed, 06 Feb 2013 18:22:32 GMTstatus changed; resolution deleted
http://ghc.haskell.org/trac/ghc/ticket/7664#comment:2
http://ghc.haskell.org/trac/ghc/ticket/7664#comment:2
<ul>
<li><strong>status</strong>
changed from <em>closed</em> to <em>new</em>
</li>
<li><strong>resolution</strong>
<em>duplicate</em> deleted
</li>
</ul>
TicketnfrisbyWed, 06 Feb 2013 18:24:04 GMTstatus changed; resolution, related set
http://ghc.haskell.org/trac/ghc/ticket/7664#comment:3
http://ghc.haskell.org/trac/ghc/ticket/7664#comment:3
<ul>
<li><strong>status</strong>
changed from <em>new</em> to <em>closed</em>
</li>
<li><strong>resolution</strong>
set to <em>duplicate</em>
</li>
<li><strong>related</strong>
set to <em>3781</em>
</li>
</ul>
TicketnfrisbyWed, 06 Feb 2013 18:25:26 GMT
http://ghc.haskell.org/trac/ghc/ticket/7664#comment:4
http://ghc.haskell.org/trac/ghc/ticket/7664#comment:4
<p>
Sorry -- apparently got confused twice! I was intending to close <a class="closed ticket" href="http://ghc.haskell.org/trac/ghc/ticket/7663" title="feature request: consider free variables as well as parameters in inline discounts (closed: duplicate)">#7663</a> as a duplicate of <a class="new ticket" href="http://ghc.haskell.org/trac/ghc/ticket/3781" title="bug: Improve inlining for local functions (new)">#3781</a>.
</p>
Ticket