[commit: ghc] master: Add NOINLINE pragma to builtinRules (d11611f)

git at git.haskell.org git at git.haskell.org
Tue Sep 26 02:44:41 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/d11611f5739284cc6aab9b2636ac6485352107ea/ghc

>---------------------------------------------------------------

commit d11611f5739284cc6aab9b2636ac6485352107ea
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Mon Sep 25 18:34:21 2017 -0400

    Add NOINLINE pragma to builtinRules
    
    As mentioned in #14275, GHC will otherwise decide to produce unfoldings
    for this rather large binding, making recompilation more expensive than
    necessary. Since inlining is almost certainly not fruitful mark it as
    NOINLINE.
    
    [skip ci]
    
    Test Plan: Validate
    
    Reviewers: austin
    
    Subscribers: rwbarton, thomie
    
    GHC Trac Issues: #14275
    
    Differential Revision: https://phabricator.haskell.org/D4023


>---------------------------------------------------------------

d11611f5739284cc6aab9b2636ac6485352107ea
 compiler/prelude/PrelRules.hs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/compiler/prelude/PrelRules.hs b/compiler/prelude/PrelRules.hs
index fc211f4..babfe4b 100644
--- a/compiler/prelude/PrelRules.hs
+++ b/compiler/prelude/PrelRules.hs
@@ -1002,6 +1002,9 @@ builtinRules
         ]
      ]
  ++ builtinIntegerRules
+{-# NOINLINE builtinRules #-}
+-- there is no benefit to inlining these yet, despite this, GHC produces
+-- unfoldings for this regardless since the floated list entries look small.
 
 builtinIntegerRules :: [CoreRule]
 builtinIntegerRules =



More information about the ghc-commits mailing list