[commit: ghc] wip/nomeata-T2110: In CoreSubst, optimize Coercible values aggressively (1906a7d)
git at git.haskell.org
git at git.haskell.org
Fri Jan 24 14:32:42 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nomeata-T2110
Link : http://ghc.haskell.org/trac/ghc/changeset/1906a7dd0cac64ee0dceeac194ae8b41e556a3fb/ghc
>---------------------------------------------------------------
commit 1906a7dd0cac64ee0dceeac194ae8b41e556a3fb
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Fri Jan 24 13:34:50 2014 +0000
In CoreSubst, optimize Coercible values aggressively
just like boxed type equalities.
>---------------------------------------------------------------
1906a7dd0cac64ee0dceeac194ae8b41e556a3fb
compiler/coreSyn/CoreSubst.lhs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/coreSyn/CoreSubst.lhs b/compiler/coreSyn/CoreSubst.lhs
index 3b39320..3dedbc8 100644
--- a/compiler/coreSyn/CoreSubst.lhs
+++ b/compiler/coreSyn/CoreSubst.lhs
@@ -61,7 +61,7 @@ import Coercion hiding ( substTy, substCo, extendTvSubst, substTyVarBndr, substC
import TyCon ( tyConArity )
import DataCon
-import PrelNames ( eqBoxDataConKey )
+import PrelNames ( eqBoxDataConKey, coercibleDataConKey )
import OptCoercion ( optCoercion )
import PprCore ( pprCoreBindings, pprRules )
import Module ( Module )
@@ -1039,7 +1039,7 @@ maybe_substitute subst b r
trivial | exprIsTrivial r = True
| (Var fun, args) <- collectArgs r
, Just dc <- isDataConWorkId_maybe fun
- , dc `hasKey` eqBoxDataConKey
+ , dc `hasKey` eqBoxDataConKey || dc `hasKey` coercibleDataConKey
, all exprIsTrivial args = True -- See Note [Optimise coercion boxes agressively]
| otherwise = False
More information about the ghc-commits
mailing list