[commit: ghc] : Have a compulary unfolding for unboxed tuple wrappers (557166a)
git at git.haskell.org
git at git.haskell.org
Mon Oct 10 21:43:36 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch :
Link : http://ghc.haskell.org/trac/ghc/changeset/557166a6b670f3dcd3bed4f79af1119b9a3f4832/ghc
>---------------------------------------------------------------
commit 557166a6b670f3dcd3bed4f79af1119b9a3f4832
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Mon Oct 10 17:35:36 2016 -0400
Have a compulary unfolding for unboxed tuple wrappers
as we have no binding for them.
>---------------------------------------------------------------
557166a6b670f3dcd3bed4f79af1119b9a3f4832
compiler/basicTypes/MkId.hs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/compiler/basicTypes/MkId.hs b/compiler/basicTypes/MkId.hs
index ba7b633..edbfc5a 100644
--- a/compiler/basicTypes/MkId.hs
+++ b/compiler/basicTypes/MkId.hs
@@ -495,7 +495,11 @@ mkSimpleDataConRep wrap_name dc
`setUnfoldingInfo` wrap_unf
`setStrictnessInfo` wrap_sig
wrap_arity = dataConRepArity dc
- wrap_unf = mkInlineUnfolding (Just wrap_arity) wrap_rhs
+ wrap_unf
+ -- Somewhat ugly, but there is no code generated for wrappers
+ -- for unboxed tuples. Let's just get rid of them as soon as possible.
+ | is_unbox_tup = mkCompulsoryUnfolding wrap_rhs
+ | otherwise = mkInlineUnfolding (Just wrap_arity) wrap_rhs
wrap_sig = mkClosedStrictSig wrap_arg_dmds (dataConCPR dc)
wrap_arg_dmds = replicate wrap_arity topDmd
rep_strs = [ NotMarkedStrict | _ <- arg_tys ]
@@ -508,6 +512,8 @@ mkSimpleDataConRep wrap_name dc
, map varToCoreExpr wrap_args
]
+ is_unbox_tup = isUnboxedTupleCon dc
+
mkDataConRep :: DynFlags
-> FamInstEnvs
-> Name
More information about the ghc-commits
mailing list