Re: [commit: ghc] master: Add more primops for atomic ops on byte arrays (d8abf85)

2014-06-24 Thread Mateusz Kowalczyk
On 06/24/2014 07:47 PM, g...@git.haskell.org wrote:
 Repository : ssh://g...@git.haskell.org/ghc
 
 On branch  : master
 Link   : 
 http://ghc.haskell.org/trac/ghc/changeset/d8abf85f8ca176854e9d5d0b12371c4bc402aac3/ghc
 
 ---
 
 commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3
 Author: Johan Tibell johan.tib...@gmail.com
 Date:   Mon Jun 9 11:43:21 2014 +0200
 
 Add more primops for atomic ops on byte arrays
 
 Summary:
 Add more primops for atomic ops on byte arrays
 
 Adds the following primops:
 
  * atomicReadIntArray#
  * atomicWriteIntArray#
  * fetchSubIntArray#
  * fetchOrIntArray#
  * fetchXorIntArray#
  * fetchAndIntArray#
 
 Makes these pre-existing out-of-line primops inline:
 
  * fetchAddIntArray#
  * casIntArray#
 
 
 ---
 
 d8abf85f8ca176854e9d5d0b12371c4bc402aac3
  compiler/cmm/CmmMachOp.hs  |  19 ++
  compiler/cmm/CmmSink.hs|   4 +
  compiler/cmm/PprC.hs   |   4 +
  compiler/codeGen/StgCmmPrim.hs |  94 +++
  compiler/llvmGen/Llvm/AbsSyn.hs|   7 +
  compiler/llvmGen/Llvm/PpLlvm.hs|  18 +-
  compiler/llvmGen/LlvmCodeGen/CodeGen.hs|  71 --
  compiler/nativeGen/CPrim.hs|  50 +++-
  compiler/nativeGen/PPC/CodeGen.hs  |   4 +
  compiler/nativeGen/SPARC/CodeGen.hs|   4 +
  compiler/nativeGen/X86/CodeGen.hs  |  92 +++
  compiler/nativeGen/X86/Instr.hs|  38 ++-
  compiler/nativeGen/X86/Ppr.hs  |   8 +
  compiler/prelude/primops.txt.pp|  76 +-
  includes/stg/MiscClosures.h|   1 -
  libraries/ghc-prim/cbits/atomic.c  | 280 
 +
  libraries/ghc-prim/ghc-prim.cabal  |   1 +
  rts/Linker.c   |   1 -
  rts/PrimOps.cmm|  12 -
  testsuite/tests/concurrent/should_run/.gitignore   |   1 +
  .../tests/concurrent/should_run/AtomicPrimops.hs   | 245 ++
  .../concurrent/should_run/AtomicPrimops.stdout |   7 +
  testsuite/tests/concurrent/should_run/all.T|   1 +
  23 files changed, 984 insertions(+), 54 deletions(-)
 
 Diff suppressed because of size. To see it, use:
 
 git diff-tree --root --patch-with-stat --no-color --find-copies-harder 
 --ignore-space-at-eol --cc d8abf85f8ca176854e9d5d0b12371c4bc402aac3
 ___
 ghc-commits mailing list
 ghc-comm...@haskell.org
 http://www.haskell.org/mailman/listinfo/ghc-commits
 

I think the above killed compilation on 32-bit boxes. See the
usually-green boxes turn red at [1], specifically
validator1-linux-x86-head, freebsd-i386-head and solaris-x86-head. The
error looks like:

inplace/bin/ghc-stage1 -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O
   -package-name ghc-prim-0.3.1.0 -hide-all-packages -i
-ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build
-ilibraries/ghc-prim/dist-install/build/autogen
-Ilibraries/ghc-prim/dist-install/build
-Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.
  -optP-include
-optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h
-package rts-1.0 -package-name ghc-prim -XHaskell2010 -O2
-no-user-package-db -rtsopts  -odir
libraries/ghc-prim/dist-install/build -hidir
libraries/ghc-prim/dist-install/build -stubdir
libraries/ghc-prim/dist-install/build -split-objs -dynamic-too -c
libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs -o
libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o -dyno
libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.dyn_o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.9.20140624 for i386-unknown-linux):
RegAllocLinear.allocRegsAndSpill: no spill candidates
allocating vreg:  VirtualRegI n1Q6
assignment:   [(c1PV,InMem 2),(n1Q5,InBoth (RealRegSingle 3)
0),(n1Q6,InMem 1),(n1Q7,InMem 3),(n1Q9,InReg (RealRegSingle 2))]
freeRegs: FreeRegs 4282318848
initFreeRegs: FreeRegs 4282318861
Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
make[1]: ***
[libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o] Error 1

It'd be great if the devs would look at [1] every day or so.

[1]: http://haskell.inf.elte.hu/builders/

-- 
Mateusz K.
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


Re: [commit: ghc] master: Add more primops for atomic ops on byte arrays (d8abf85)

2014-06-24 Thread Johan Tibell
I don't understand the error (are we out of registers in the register
allocator? what can we do about that?). Simon could you please explain.

As for the continuos builds, can't we have them email the list upon
breakages?


On Wed, Jun 25, 2014 at 7:26 AM, Mateusz Kowalczyk fuuze...@fuuzetsu.co.uk
wrote:

 On 06/24/2014 07:47 PM, g...@git.haskell.org wrote:
  Repository : ssh://g...@git.haskell.org/ghc
 
  On branch  : master
  Link   :
 http://ghc.haskell.org/trac/ghc/changeset/d8abf85f8ca176854e9d5d0b12371c4bc402aac3/ghc
 
  ---
 
  commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3
  Author: Johan Tibell johan.tib...@gmail.com
  Date:   Mon Jun 9 11:43:21 2014 +0200
 
  Add more primops for atomic ops on byte arrays
 
  Summary:
  Add more primops for atomic ops on byte arrays
 
  Adds the following primops:
 
   * atomicReadIntArray#
   * atomicWriteIntArray#
   * fetchSubIntArray#
   * fetchOrIntArray#
   * fetchXorIntArray#
   * fetchAndIntArray#
 
  Makes these pre-existing out-of-line primops inline:
 
   * fetchAddIntArray#
   * casIntArray#
 
 
  ---
 
  d8abf85f8ca176854e9d5d0b12371c4bc402aac3
   compiler/cmm/CmmMachOp.hs  |  19 ++
   compiler/cmm/CmmSink.hs|   4 +
   compiler/cmm/PprC.hs   |   4 +
   compiler/codeGen/StgCmmPrim.hs |  94 +++
   compiler/llvmGen/Llvm/AbsSyn.hs|   7 +
   compiler/llvmGen/Llvm/PpLlvm.hs|  18 +-
   compiler/llvmGen/LlvmCodeGen/CodeGen.hs|  71 --
   compiler/nativeGen/CPrim.hs|  50 +++-
   compiler/nativeGen/PPC/CodeGen.hs  |   4 +
   compiler/nativeGen/SPARC/CodeGen.hs|   4 +
   compiler/nativeGen/X86/CodeGen.hs  |  92 +++
   compiler/nativeGen/X86/Instr.hs|  38 ++-
   compiler/nativeGen/X86/Ppr.hs  |   8 +
   compiler/prelude/primops.txt.pp|  76 +-
   includes/stg/MiscClosures.h|   1 -
   libraries/ghc-prim/cbits/atomic.c  | 280
 +
   libraries/ghc-prim/ghc-prim.cabal  |   1 +
   rts/Linker.c   |   1 -
   rts/PrimOps.cmm|  12 -
   testsuite/tests/concurrent/should_run/.gitignore   |   1 +
   .../tests/concurrent/should_run/AtomicPrimops.hs   | 245
 ++
   .../concurrent/should_run/AtomicPrimops.stdout |   7 +
   testsuite/tests/concurrent/should_run/all.T|   1 +
   23 files changed, 984 insertions(+), 54 deletions(-)
 
  Diff suppressed because of size. To see it, use:
 
  git diff-tree --root --patch-with-stat --no-color
 --find-copies-harder --ignore-space-at-eol --cc
 d8abf85f8ca176854e9d5d0b12371c4bc402aac3
  ___
  ghc-commits mailing list
  ghc-comm...@haskell.org
  http://www.haskell.org/mailman/listinfo/ghc-commits
 

 I think the above killed compilation on 32-bit boxes. See the
 usually-green boxes turn red at [1], specifically
 validator1-linux-x86-head, freebsd-i386-head and solaris-x86-head. The
 error looks like:

 inplace/bin/ghc-stage1 -hisuf hi -osuf  o -hcsuf hc -static  -H32m -O
-package-name ghc-prim-0.3.1.0 -hide-all-packages -i
 -ilibraries/ghc-prim/. -ilibraries/ghc-prim/dist-install/build
 -ilibraries/ghc-prim/dist-install/build/autogen
 -Ilibraries/ghc-prim/dist-install/build
 -Ilibraries/ghc-prim/dist-install/build/autogen -Ilibraries/ghc-prim/.
   -optP-include
 -optPlibraries/ghc-prim/dist-install/build/autogen/cabal_macros.h
 -package rts-1.0 -package-name ghc-prim -XHaskell2010 -O2
 -no-user-package-db -rtsopts  -odir
 libraries/ghc-prim/dist-install/build -hidir
 libraries/ghc-prim/dist-install/build -stubdir
 libraries/ghc-prim/dist-install/build -split-objs -dynamic-too -c
 libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs -o
 libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o -dyno
 libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.dyn_o
 ghc-stage1: panic! (the 'impossible' happened)
   (GHC version 7.9.20140624 for i386-unknown-linux):
 RegAllocLinear.allocRegsAndSpill: no spill candidates
 allocating vreg:  VirtualRegI n1Q6
 assignment:   [(c1PV,InMem 2),(n1Q5,InBoth (RealRegSingle 3)
 0),(n1Q6,InMem 1),(n1Q7,InMem 3),(n1Q9,InReg (RealRegSingle 2))]
 freeRegs: FreeRegs 4282318848
 initFreeRegs: FreeRegs 4282318861
 Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug
 make[1]: ***
 [libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.o] Error 1

 It'd be great if the devs would look at [1] every day or so.

 [1]: http://haskell.inf.elte.hu/builders/

 

Re: [commit: ghc] master: Add more primops for atomic ops on byte arrays (d8abf85)

2014-06-24 Thread Mateusz Kowalczyk
On 06/25/2014 07:37 AM, Johan Tibell wrote:
 I don't understand the error (are we out of registers in the register
 allocator? what can we do about that?). Simon could you please explain.
 
 As for the continuos builds, can't we have them email the list upon
 breakages?
 

We could but I think there is no mechanism to tell what's meaningful
breakage and how to present it. I think this should be part of the
discussion in the “Offering GHC builder build slaves” thread and someone
just needs to sit down and hook it up. This includes fancier things such
as blaming commit ranges for specific test changes c.

Short-term solution would be to subscribe to ghc-bui...@haskell.org and
filter out the contents so only failing builds are shown, taking care to
exclude the slaves which are failing constantly due to unrelated reasons.

-- 
Mateusz K.
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs