[commit: ghc] wip/nested-cpr: Special-case Var in mkRename (f3eec59)

git at git.haskell.org git at git.haskell.org
Thu Dec 5 14:13:46 UTC 2013


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

On branch  : wip/nested-cpr
Link       : http://ghc.haskell.org/trac/ghc/changeset/f3eec593dc08cfe6b616693cb3699f76a9da68e7/ghc

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

commit f3eec593dc08cfe6b616693cb3699f76a9da68e7
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Thu Dec 5 09:11:34 2013 +0000

    Special-case Var in mkRename


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

f3eec593dc08cfe6b616693cb3699f76a9da68e7
 compiler/stranal/WwLib.lhs |    1 +
 1 file changed, 1 insertion(+)

diff --git a/compiler/stranal/WwLib.lhs b/compiler/stranal/WwLib.lhs
index 4ab2609..8eeac2a 100644
--- a/compiler/stranal/WwLib.lhs
+++ b/compiler/stranal/WwLib.lhs
@@ -596,6 +596,7 @@ mkWWcpr_help inner ty res
 -- mkRename e v body
 -- binds v to e in body. This will later be removed by the simplifiers
 mkRename :: CoreExpr -> Var -> CoreExpr -> CoreExpr
+mkRename e v (Var v') | v == v' = e
 mkRename e v body = ASSERT( idType v `eqType` exprType e) 
                     mkCoreLet (NonRec v e) body
 



More information about the ghc-commits mailing list