[commit: ghc] master: Add NOINLINE pragma to hPutStr' (21cdfe5)

git at git.haskell.org git at git.haskell.org
Mon Dec 11 19:26:51 UTC 2017


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

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

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

commit 21cdfe5ff5b9506c324164dd59e1b1d603784819
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Mon Dec 11 12:54:18 2017 -0500

    Add NOINLINE pragma to hPutStr'
    
    There appears to be no benefit in inlining this function.
    If you turn up the unfolding threshold a lot then it eventually
    inlines which produces a bit unoptimisable program.
    
    Reviewers: hvr, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D4246


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

21cdfe5ff5b9506c324164dd59e1b1d603784819
 libraries/base/GHC/IO/Handle/Text.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libraries/base/GHC/IO/Handle/Text.hs b/libraries/base/GHC/IO/Handle/Text.hs
index 57b9534..f15c627 100644
--- a/libraries/base/GHC/IO/Handle/Text.hs
+++ b/libraries/base/GHC/IO/Handle/Text.hs
@@ -537,6 +537,7 @@ hPutStrLn handle str = hPutStr' handle str True
   -- overhead of a single putChar '\n', which is quite high now that we
   -- have to encode eagerly.
 
+{-# NOINLINE hPutStr' #-}
 hPutStr' :: Handle -> String -> Bool -> IO ()
 hPutStr' handle str add_nl =
   do



More information about the ghc-commits mailing list