[commit: ghc] wip/T16039: WIP: refactor and generalise (#16039) (c34e638)
git at git.haskell.org
git at git.haskell.org
Thu Dec 27 17:01:53 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T16039
Link : http://ghc.haskell.org/trac/ghc/changeset/c34e638e822aac84c86999a47ea82ded7c05060c/ghc
>---------------------------------------------------------------
commit c34e638e822aac84c86999a47ea82ded7c05060c
Author: Gabor Greif <ggreif at gmail.com>
Date: Wed Dec 12 13:43:09 2018 +0100
WIP: refactor and generalise (#16039)
>---------------------------------------------------------------
c34e638e822aac84c86999a47ea82ded7c05060c
compiler/simplCore/SetLevels.hs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs
index e2aa945..87e0e18 100644
--- a/compiler/simplCore/SetLevels.hs
+++ b/compiler/simplCore/SetLevels.hs
@@ -969,7 +969,7 @@ notWorthFloating :: CoreExpr -> [Var] -> Bool
-- we replace e with (lvl79 x y) and then run FloatOut again, don't want
-- to replace (lvl79 x y) with (lvl83 x y)!
-notWorthFloating (App (App (Var v) Type{}) Var{}) _ | v `hasKey` noinlineIdKey = True
+--notWorthFloating (App (App (Var v) Type{}) Var{}) _ | v `hasKey` noinlineIdKey = True
notWorthFloating e abs_vars
= go e (count isId abs_vars)
@@ -982,6 +982,9 @@ notWorthFloating e abs_vars
go (App e arg) n
| Type {} <- arg = go e n
| Coercion {} <- arg = go e n
+ | App (Var v) Type {} <- e
+ , v `hasKey` noinlineIdKey
+ , is_triv arg = True
| n==0 = False
| is_triv arg = go e (n-1)
| otherwise = False
More information about the ghc-commits
mailing list