[GHC] #7664: consider free variables as well as parameters in inline discounts

#7664: consider free variables as well as parameters in inline discounts -----------------------------+---------------------------------------------- Reporter: nfrisby | Owner: Type: feature request | Status: new Priority: normal | Component: Compiler Version: 7.7 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- The inliner assigns discount values for scrutinized parameters but not for scrutinized free variables. 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.) 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. For reference: the function in boyer2 that gets inlined is a join point that arises near the top of the worker for "Rewritefns.onewayunify". -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7664 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7664: consider free variables as well as parameters in inline discounts -------------------------------+-------------------------------------------- Reporter: nfrisby | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: duplicate | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- Changes (by igloo): * status: new => closed * difficulty: => Unknown * resolution: => duplicate Comment: Duplicate of #7663 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7664#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7664: consider free variables as well as parameters in inline discounts -------------------------------+-------------------------------------------- Reporter: nfrisby | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: -------------------------------+-------------------------------------------- Changes (by nfrisby): * status: closed => new * resolution: duplicate => -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7664#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7664: consider free variables as well as parameters in inline discounts -------------------------------+-------------------------------------------- Reporter: nfrisby | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: duplicate | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: 3781 -------------------------------+-------------------------------------------- Changes (by nfrisby): * status: new => closed * resolution: => duplicate * related: => 3781 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7664#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7664: consider free variables as well as parameters in inline discounts -------------------------------+-------------------------------------------- Reporter: nfrisby | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.7 Resolution: duplicate | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: | Blockedby: Blocking: | Related: 3781 -------------------------------+-------------------------------------------- Comment(by nfrisby): Sorry -- apparently got confused twice! I was intending to close #7663 as a duplicate of #3781. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7664#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC