[commit: ghc] wip/T10918: First stab at #10918 (0f6dc41)

git at git.haskell.org git at git.haskell.org
Fri Nov 6 14:51:48 UTC 2015


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

On branch  : wip/T10918
Link       : http://ghc.haskell.org/trac/ghc/changeset/0f6dc41746adf9a80dfd4c3984e85a9c1bcddb8d/ghc

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

commit 0f6dc41746adf9a80dfd4c3984e85a9c1bcddb8d
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Thu Oct 1 23:22:19 2015 +0200

    First stab at #10918


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

0f6dc41746adf9a80dfd4c3984e85a9c1bcddb8d
 compiler/simplCore/CallArity.hs  | 7 +++++--
 compiler/simplCore/SimplUtils.hs | 2 +-
 libraries/Cabal                  | 2 +-
 libraries/array                  | 2 +-
 libraries/deepseq                | 2 +-
 libraries/directory              | 2 +-
 libraries/filepath               | 2 +-
 libraries/haskeline              | 2 +-
 libraries/hoopl                  | 2 +-
 libraries/hpc                    | 2 +-
 libraries/parallel               | 2 +-
 libraries/primitive              | 2 +-
 libraries/process                | 2 +-
 libraries/stm                    | 2 +-
 libraries/terminfo               | 2 +-
 libraries/transformers           | 2 +-
 libraries/unix                   | 2 +-
 libraries/vector                 | 2 +-
 utils/haddock                    | 2 +-
 utils/hsc2hs                     | 2 +-
 20 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/compiler/simplCore/CallArity.hs b/compiler/simplCore/CallArity.hs
index bd997c3..9a59c22 100644
--- a/compiler/simplCore/CallArity.hs
+++ b/compiler/simplCore/CallArity.hs
@@ -510,7 +510,7 @@ callArityAnal arity int (Let bind e)
 -- Which bindings should we look at?
 -- See Note [Which variables are interesting]
 isInteresting :: Var -> Bool
-isInteresting v = 0 < length (typeArity (idType v))
+isInteresting v = True -- 0 < length (typeArity (idType v))
 
 interestingBinds :: CoreBind -> [Var]
 interestingBinds = filter isInteresting . bindersOf
@@ -531,7 +531,7 @@ callArityBind boring_vars ae_body int (NonRec v rhs)
   | otherwise
   = -- pprTrace "callArityBind:NonRec"
     --          (vcat [ppr v, ppr ae_body, ppr int, ppr ae_rhs, ppr safe_arity])
-    (final_ae, NonRec v' rhs')
+    (final_ae, NonRec v'' rhs')
   where
     is_thunk = not (exprIsHNF rhs)
     -- If v is boring, we will not find it in ae_body, but always assume (0, False)
@@ -562,6 +562,9 @@ callArityBind boring_vars ae_body int (NonRec v rhs)
 
     v' = v `setIdCallArity` trimmed_arity
 
+    v'' | called_once = v' `setIdDemandInfo` oneifyDmd (idDemandInfo v')
+        | otherwise   = v'
+
 
 -- Recursive let. See Note [Recursion and fixpointing]
 callArityBind boring_vars ae_body int b@(Rec binds)
diff --git a/compiler/simplCore/SimplUtils.hs b/compiler/simplCore/SimplUtils.hs
index 1577efd..aa82ea4 100644
--- a/compiler/simplCore/SimplUtils.hs
+++ b/compiler/simplCore/SimplUtils.hs
@@ -1039,7 +1039,7 @@ preInlineUnconditionally dflags env top_lvl bndr rhs
     act = idInlineActivation bndr
     try_once in_lam int_cxt     -- There's one textual occurrence
         | not in_lam = isNotTopLevel top_lvl || early_phase
-        | otherwise  = int_cxt && canInlineInLam rhs
+        | otherwise  = (int_cxt && canInlineInLam rhs) || isSingleUsed (idDemandInfo bndr)
 
 -- Be very careful before inlining inside a lambda, because (a) we must not
 -- invalidate occurrence information, and (b) we want to avoid pushing a
diff --git a/libraries/Cabal b/libraries/Cabal
index 75d2807..e6304ff 160000
--- a/libraries/Cabal
+++ b/libraries/Cabal
@@ -1 +1 @@
-Subproject commit 75d2807a2bb11762f4db70540d2cc9049e9c7968
+Subproject commit e6304ff660ca629b1b664f0848a601959e31cb31
diff --git a/libraries/array b/libraries/array
index dd75c73..2f5b772 160000
--- a/libraries/array
+++ b/libraries/array
@@ -1 +1 @@
-Subproject commit dd75c73d191b3f07209c38f78ebe9dcc26fc5ed4
+Subproject commit 2f5b772f4475d70a68c6f9d10390ac9812afdb7d
diff --git a/libraries/deepseq b/libraries/deepseq
index 36bfcd2..c6cb196 160000
--- a/libraries/deepseq
+++ b/libraries/deepseq
@@ -1 +1 @@
-Subproject commit 36bfcd2a6236f2e019de76c256b05ee670492373
+Subproject commit c6cb196fb1bd5f16bb5945add2d6ece3f7910e90
diff --git a/libraries/directory b/libraries/directory
index a7a5b0b..7233248 160000
--- a/libraries/directory
+++ b/libraries/directory
@@ -1 +1 @@
-Subproject commit a7a5b0b738aad432a9cad512a26d7564120ef0e8
+Subproject commit 7233248952648ed4dd213f91ed52af2317a3f23b
diff --git a/libraries/filepath b/libraries/filepath
index 564c5a7..81375ae 160000
--- a/libraries/filepath
+++ b/libraries/filepath
@@ -1 +1 @@
-Subproject commit 564c5a78d028ebde6a27f61ff9f686fce490c809
+Subproject commit 81375ae0c892b5951f2c1184c655a8f3a5193c9c
diff --git a/libraries/haskeline b/libraries/haskeline
index fb5b288..7a72748 160000
--- a/libraries/haskeline
+++ b/libraries/haskeline
@@ -1 +1 @@
-Subproject commit fb5b2884dd00843f6d2fbbeca87b241822088b83
+Subproject commit 7a72748b3898e68c99e3d5ae7d06c58dd190b149
diff --git a/libraries/hoopl b/libraries/hoopl
index 84255f0..b38e92f 160000
--- a/libraries/hoopl
+++ b/libraries/hoopl
@@ -1 +1 @@
-Subproject commit 84255f0fe07f3fd1f5bc96e60b64c582394edcf1
+Subproject commit b38e92f67cabfa0d0ed12ac93c2d431f2391de70
diff --git a/libraries/hpc b/libraries/hpc
index e20c61c..886429b 160000
--- a/libraries/hpc
+++ b/libraries/hpc
@@ -1 +1 @@
-Subproject commit e20c61c358e749ea62f6687089ad2a878d5d1a66
+Subproject commit 886429bf84097bbc16cdb6602b60ba1b9156cf6a
diff --git a/libraries/parallel b/libraries/parallel
index ec04d05..f606922 160000
--- a/libraries/parallel
+++ b/libraries/parallel
@@ -1 +1 @@
-Subproject commit ec04d059b13fc348789d87adfbabb9351f8574db
+Subproject commit f6069229df73045770fe4521991b9d22fd58e680
diff --git a/libraries/primitive b/libraries/primitive
index 83d3d23..29cb0db 160000
--- a/libraries/primitive
+++ b/libraries/primitive
@@ -1 +1 @@
-Subproject commit 83d3d23d2fa1583ecd1b59464cc889924e1b5fff
+Subproject commit 29cb0db59803c9d9181f7c4ce35ef1c6cbc6ccfb
diff --git a/libraries/process b/libraries/process
index 7428b61..e0983fb 160000
--- a/libraries/process
+++ b/libraries/process
@@ -1 +1 @@
-Subproject commit 7428b614841e6b6416e501453546b0af19a0cd1f
+Subproject commit e0983fbbfa8a3d81c7b99e83a3169fc686caab62
diff --git a/libraries/stm b/libraries/stm
index e917b59..f7db2c3d 160000
--- a/libraries/stm
+++ b/libraries/stm
@@ -1 +1 @@
-Subproject commit e917b5944ce0a5b4e32dcc8f00eaddbec1256e98
+Subproject commit f7db2c3df86ec644e5e06baa8090a1cb525754e2
diff --git a/libraries/terminfo b/libraries/terminfo
index 68e88c4..1b5ab01 160000
--- a/libraries/terminfo
+++ b/libraries/terminfo
@@ -1 +1 @@
-Subproject commit 68e88c453237763084f5032d133ee7347980f8b2
+Subproject commit 1b5ab01452eaa6c21de7174ad4312a017a13d0ab
diff --git a/libraries/transformers b/libraries/transformers
index 5ccb747..078c7da 160000
--- a/libraries/transformers
+++ b/libraries/transformers
@@ -1 +1 @@
-Subproject commit 5ccb747e67d579e3f212fd3526469c35282e532e
+Subproject commit 078c7daf36ea1fa1ecb63b04dbe667a443e13044
diff --git a/libraries/unix b/libraries/unix
index 137fa1b..4260c25 160000
--- a/libraries/unix
+++ b/libraries/unix
@@ -1 +1 @@
-Subproject commit 137fa1b06a79a9baa0d5fcf2ec11f964c3423f6a
+Subproject commit 4260c25687d3a4bc1ffacdacfbe7e47082ff2550
diff --git a/libraries/vector b/libraries/vector
index 6c17dd6..c0308f1 160000
--- a/libraries/vector
+++ b/libraries/vector
@@ -1 +1 @@
-Subproject commit 6c17dd6fadc5e7e3e09f7892380ce1339f296efd
+Subproject commit c0308f1c4f57859d9a8b10d504afe56eebbb27c5
diff --git a/utils/haddock b/utils/haddock
index 7f4519f..e083daa 160000
--- a/utils/haddock
+++ b/utils/haddock
@@ -1 +1 @@
-Subproject commit 7f4519f0bb2a490fd9c1b42d37ae4f14390551b4
+Subproject commit e083daa4a46ae2f9a244b6bcedc5951b3a78f260
diff --git a/utils/hsc2hs b/utils/hsc2hs
index bb205d8..293f41c 160000
--- a/utils/hsc2hs
+++ b/utils/hsc2hs
@@ -1 +1 @@
-Subproject commit bb205d806c1368e483edde288cbf8ed2cfca2ba6
+Subproject commit 293f41c78e956b78363ede463e7ff52eb6bc997d



More information about the ghc-commits mailing list