[commit: ghc] master: Restrict Lint's complaints about recursive INLINEs somewhat (118efb0)

git at git.haskell.org git at git.haskell.org
Fri Aug 18 13:51:44 UTC 2017


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

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

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

commit 118efb075367f4c8f686dfb34c0be8d464319c2f
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Wed Aug 2 09:48:58 2017 +0100

    Restrict Lint's complaints about recursive INLINEs somewhat
    
    This patch makes the Lint warning about recursive functions with an
    INLINE only apply if there is a stable unfolding.  If not (e.g. some
    other pass took it out) we don't need to worry.  Not a big deal.


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

118efb075367f4c8f686dfb34c0be8d464319c2f
 compiler/coreSyn/CoreLint.hs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/coreSyn/CoreLint.hs b/compiler/coreSyn/CoreLint.hs
index 390a317..e85cfe8 100644
--- a/compiler/coreSyn/CoreLint.hs
+++ b/compiler/coreSyn/CoreLint.hs
@@ -548,6 +548,7 @@ lintSingleBinding top_lvl_flag rec_flag (binder,rhs)
                                   (mkInvalidJoinPointMsg binder binder_ty)
 
        ; when (lf_check_inline_loop_breakers flags
+               && isStableUnfolding (realIdUnfolding binder)
                && isStrongLoopBreaker (idOccInfo binder)
                && isInlinePragma (idInlinePragma binder))
               (addWarnL (text "INLINE binder is (non-rule) loop breaker:" <+> ppr binder))



More information about the ghc-commits mailing list