[commit: ghc] wip/T14677: WIP: exclude casts for now (eef0c05)
git at git.haskell.org
git at git.haskell.org
Sat Jan 27 19:18:09 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T14677
Link : http://ghc.haskell.org/trac/ghc/changeset/eef0c057551ef860c1ace2e1c7509bcdc3c8eb91/ghc
>---------------------------------------------------------------
commit eef0c057551ef860c1ace2e1c7509bcdc3c8eb91
Author: Gabor Greif <ggreif at gmail.com>
Date: Sat Jan 27 20:16:52 2018 +0100
WIP: exclude casts for now
>---------------------------------------------------------------
eef0c057551ef860c1ace2e1c7509bcdc3c8eb91
compiler/codeGen/StgCmmClosure.hs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index 1736bba..2c6cf19 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -68,7 +68,7 @@ module StgCmmClosure (
import GhcPrelude
-import CoreSyn( isValueUnfolding, maybeUnfoldingTemplate )
+import CoreSyn( isValueUnfolding, maybeUnfoldingTemplate, Expr(Cast) )
import CoreOpt( exprIsSatConApp_maybe )
import StgSyn
import SMRep
@@ -331,7 +331,10 @@ mkLFImported id
| isValueUnfolding unf
, Just expr <- maybeUnfoldingTemplate unf
, Just con <- exprIsSatConApp_maybe expr
- = LFCon con
+ , let casted (Cast _ _) = True
+ casted _ = False
+ , not $ casted expr
+ = pprTrace "mkLFImported" (ppr unf <+> ppr expr <+> ppr con) LFCon con
| arity > 0
= LFReEntrant TopLevel noOneShotInfo arity True (panic "arg_descr")
More information about the ghc-commits
mailing list