[commit: ghc] master: Mark mapUnionFV as INLINABLE rather than INLINE (d122935)

git at git.haskell.org git at git.haskell.org
Fri Sep 23 22:33:28 UTC 2016


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

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

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

commit d122935340ddf97a5a8496070de1f9bb34328440
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Fri Sep 23 23:25:43 2016 +0100

    Mark mapUnionFV as INLINABLE rather than INLINE
    
    It is a self-recursive function so will always be the loop-breaker
    and hence never able to be inlined. It is dubious whether the INLINABLE
    pragma will ever help as it is not a very polymorphic function
    but some specialisation could occur.


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

d122935340ddf97a5a8496070de1f9bb34328440
 compiler/utils/FV.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/utils/FV.hs b/compiler/utils/FV.hs
index 8e01220..b5cf096 100644
--- a/compiler/utils/FV.hs
+++ b/compiler/utils/FV.hs
@@ -184,7 +184,7 @@ mapUnionFV :: (a -> FV) -> [a] -> FV
 mapUnionFV _f [] _fv_cand _in_scope acc = acc
 mapUnionFV f (a:as) fv_cand in_scope acc =
   mapUnionFV f as fv_cand in_scope $! f a fv_cand in_scope $! acc
-{-# INLINE mapUnionFV #-}
+{-# INLINABLE mapUnionFV #-}
 
 -- | Union many free variable computations.
 unionsFV :: [FV] -> FV



More information about the ghc-commits mailing list