[GHC] #4012: Compilation results are not deterministic
GHC
ghc-devs at haskell.org
Wed Jun 3 20:13:25 UTC 2015
#4012: Compilation results are not deterministic
-------------------------------------+-------------------------------------
Reporter: kili | Owner:
Type: bug | Status: new
Priority: high | Milestone: 7.12.1
Component: Compiler | Version: 6.12.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Other | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by thoughtpolice):
Yes. I removed `shortOutIndirections` in `SimplCore`:
{{{
diff --git a/compiler/simplCore/SimplCore.hs
b/compiler/simplCore/SimplCore.hs
index 0a2f8e4..95c5cce 100644
--- a/compiler/simplCore/SimplCore.hs
+++ b/compiler/simplCore/SimplCore.hs
@@ -667,7 +667,7 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations
mode)
--
-- ToDo: alas, this means that indirection-shorting does
not happen at all
-- if the simplifier does nothing (not common, I
know, but unsavoury)
- let { binds2 = {-# SCC "ZapInd" #-} shortOutIndirections
binds1 } ;
+ let { binds2 = {-# SCC "ZapInd" #-} if True then binds1 else
shortOutIndirections binds1 } ;
-- Dump the result of this iteration
dump_end_iteration dflags print_unqual iteration_no counts1
binds2 rules1 ;
}}}
Then I compiled the test in comment:76 with `-fno-cse` and observed the
ABI difference went away. So killing CSE may get us a long way for NixOS
I admit I tested this on GHC 7.10, and not the HEAD branch. Brian, you
couldn't reproduce this on HEAD at all? I can double check this, but that
somewhat surprises (and worries!) me.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/4012#comment:98>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list