[commit: ghc] master: CSE: Fix cut and paste error (9f9b90f)
git at git.haskell.org
git at git.haskell.org
Fri Apr 28 18:19:12 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/9f9b90f1fb85fef568f535664f55c4674603e65b/ghc
>---------------------------------------------------------------
commit 9f9b90f1fb85fef568f535664f55c4674603e65b
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Fri Apr 28 13:25:17 2017 -0400
CSE: Fix cut and paste error
extendCSRecEnv took the map to be extended from cs_map instead of
cs_rec_map. Oops!
Test Plan: Validate
Reviewers: simonpj, austin
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3510
>---------------------------------------------------------------
9f9b90f1fb85fef568f535664f55c4674603e65b
compiler/simplCore/CSE.hs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index 1495f18..95df5f8 100644
--- a/compiler/simplCore/CSE.hs
+++ b/compiler/simplCore/CSE.hs
@@ -282,7 +282,7 @@ with mutual recursion it's quite hard; but for self-recursive bindings
Note the \f in the domain of the mapping!
* When we come across the binding for 'g', look up (\g. (\y. ...g...))
- Bingo we get a hit. So we can repace the 'g' binding with
+ Bingo we get a hit. So we can replace the 'g' binding with
g = f
We can't use cs_map for this, because the key isn't an expression of
@@ -572,7 +572,7 @@ extendCSEnv cse expr triv_expr
extendCSRecEnv :: CSEnv -> OutId -> OutExpr -> OutExpr -> CSEnv
-- See Note [CSE for recursive bindings]
extendCSRecEnv cse bndr expr triv_expr
- = cse { cs_rec_map = extendCoreMap (cs_map cse) (Lam bndr expr) triv_expr }
+ = cse { cs_rec_map = extendCoreMap (cs_rec_map cse) (Lam bndr expr) triv_expr }
lookupCSRecEnv :: CSEnv -> OutId -> OutExpr -> Maybe OutExpr
-- See Note [CSE for recursive bindings]
More information about the ghc-commits
mailing list