[commit: ghc] wip/nomeata-T2110: In CoreSubst, optimize Coercible values aggressively (9ce3aae)
git at git.haskell.org
git at git.haskell.org
Mon Jan 27 10:36:49 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/nomeata-T2110
Link : http://ghc.haskell.org/trac/ghc/changeset/9ce3aaed80324b473865397cffdabe215858e1c4/ghc
>---------------------------------------------------------------
commit 9ce3aaed80324b473865397cffdabe215858e1c4
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.
>---------------------------------------------------------------
9ce3aaed80324b473865397cffdabe215858e1c4
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