[commit: ghc] wip/rwbarton-float-unboxed: WIP: Less floating out of unboxed strings (8f99cfa)
git at git.haskell.org
git at git.haskell.org
Mon Feb 27 18:25:42 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/rwbarton-float-unboxed
Link : http://ghc.haskell.org/trac/ghc/changeset/8f99cfa49be0fc0767f0c73967ff2472de5cfcd6/ghc
>---------------------------------------------------------------
commit 8f99cfa49be0fc0767f0c73967ff2472de5cfcd6
Author: Reid Barton <rwbarton at gmail.com>
Date: Mon Feb 27 13:25:19 2017 -0500
WIP: Less floating out of unboxed strings
>---------------------------------------------------------------
8f99cfa49be0fc0767f0c73967ff2472de5cfcd6
compiler/simplCore/SetLevels.hs | 2 +-
compiler/simplCore/Simplify.hs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs
index 94d5bcd..6d6e38e 100644
--- a/compiler/simplCore/SetLevels.hs
+++ b/compiler/simplCore/SetLevels.hs
@@ -561,7 +561,7 @@ lvlMFE env strict_ctxt ann_expr
= -- Don't float it out
lvlExpr env ann_expr
- | float_is_new_lam || need_join || exprIsTopLevelBindable expr expr_ty
+ | float_is_new_lam || need_join || not (isUnliftedType expr_ty)
|| expr_ok_for_spec && not (isTopLvl dest_lvl)
-- No wrapping needed if the type is lifted, or is a literal string
-- or if we are wrapping it in one or more value lambdas
diff --git a/compiler/simplCore/Simplify.hs b/compiler/simplCore/Simplify.hs
index 4ef2994..8d0fb56 100644
--- a/compiler/simplCore/Simplify.hs
+++ b/compiler/simplCore/Simplify.hs
@@ -682,7 +682,7 @@ bindingOk :: TopLevelFlag -> CoreExpr -> Type -> Bool
-- True iff we can have a binding of this expression at this level
-- Precondition: the type is the type of the expression
bindingOk top_lvl expr expr_ty
- | isTopLevel top_lvl = exprIsTopLevelBindable expr expr_ty
+ | isTopLevel top_lvl = not (isUnliftedType expr_ty)
| otherwise = True
{-
More information about the ghc-commits
mailing list