[commit: ghc] wip/T15002: Fix #15002 more carefully (e0d22dd)

git at git.haskell.org git at git.haskell.org
Mon Apr 9 18:58:29 UTC 2018


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

On branch  : wip/T15002
Link       : http://ghc.haskell.org/trac/ghc/changeset/e0d22dded6953cd1d55736f2f40895c492970873/ghc

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

commit e0d22dded6953cd1d55736f2f40895c492970873
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.


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

e0d22dded6953cd1d55736f2f40895c492970873
 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