[commit: ghc] wip/T15002: Fix #15002 more carefully (dbbda65)
git at git.haskell.org
git at git.haskell.org
Mon Apr 9 19:07:05 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/T15002
Link : http://ghc.haskell.org/trac/ghc/changeset/dbbda65ba43670eb9d17c28b635c646c9ee4def7/ghc
>---------------------------------------------------------------
commit dbbda65ba43670eb9d17c28b635c646c9ee4def7
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Mon Apr 9 14:54:06 2018 -0400
Fix #15002 more carefully
`noCSE` checks a bunch of conditions, and adding that check to all
branches of `cseBind` causes regressions. So, to understand the
situation better, let’s just check `isJoinId` and see if that fixes the
bug without causing regressions.
Maybe `noCSE` is only about what should be added to the the CSEnv, and
the question of “which RHSs” should be CSEd needs to be answered
differently.
>---------------------------------------------------------------
dbbda65ba43670eb9d17c28b635c646c9ee4def7
compiler/simplCore/CSE.hs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs
index 6bdf4f0..865ab6a 100644
--- a/compiler/simplCore/CSE.hs
+++ b/compiler/simplCore/CSE.hs
@@ -370,7 +370,7 @@ cse_bind toplevel env (in_id, in_rhs) out_id
-- See Note [Take care with literal strings]
= (env', (out_id, in_rhs))
- | noCSE in_id
+ | isJoinId in_id
= (env', (out_id, in_rhs))
| otherwise
More information about the ghc-commits
mailing list