|
| I guess it's quite possible that this is caused by one of Simon's
| patches from Friday.

Darn, you are almost certainly right. It's hard for me to build a profiled GHC 
right now on my laptop.  But can you try adding these two lines to 
CoreUtils.eta_expand?  Add the two lines highlighted with arrows below.

eta_expand n _ expr _
  | n == 0    -- Saturated, so nothing to do
  = expr

eta_expand n us (Note n@(SCC _) expr) ty             <----------
  = Note n (eta_expand n us expr ty)                 <----------

        -- Short cut for the case where there already
        -- is a lambda; no point in gratuitously adding more
eta_expand n us (Lam v body) ty



If that fixes it, commit the patch and I'll add comments.

Note for Simon M: this is relying on the fact that
        scc "f" (\x.e)   ==   \x. scc "f" e
which is, I hope, true!

Simon


| -----Original Message-----
| From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
| Behalf Of Thomas Schilling
| Sent: 07 December 2008 22:36
| To: cvs-ghc@haskell.org
| Subject: Panic when building head with profiling
|
| With HEAD from today, I get the following GHC panic when building
| stage2 in profiling way (BuildFlavour = devel2):
|
| <<ghc: 31163276 bytes, 7 GCs, 2801664/5439488 avg/max bytes residency
| (2 samples), 64M in use, 0.00 INIT (0.00 elapsed), 0.06 MUT (0.14
| elapsed), 0.05 GC (0.07 elapsed) :ghc>>
| /Users/nominolo/code/ghc/ng-api/ghc/stage1-inplace/ghc
| -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -package-name ghc-6.11.20081205
| -hide-all-packages -no-user-package-conf -i -idist-stage2/build
| -inativeGen -ibasicTypes -icmm -icodeGen -icoreSyn -icprAnalysis
| -ideSugar -ighci -ihsSyn -iiface -imain -iparser -iprelude -iprofiling
| -irename -isimplCore -isimplStg -ispecialise -istgSyn -istranal
| -itypecheck -itypes -iutils -ivectorise -idist-stage2/build/autogen
| -Idist-stage2/build/autogen -Idist-stage2/build
| -I../libffi/build/include -Istage2plus -I../libraries/base/cbits
| -I../libraries/base/include -I. -Iparser -Iutils -optP-DUSE_EDITLINE
| -optP-DGHCI -optP-include
| -optPdist-stage2/build/autogen/cabal_macros.h -odir dist-stage2/build
| -hidir dist-stage2/build -stubdir dist-stage2/build -package
| Cabal-1.5.5 -package array-0.2.0.0 -package base-4.0.0.0 -package
| bytestring-0.9.1.4 -package containers-0.2.0.0 -package
| directory-1.0.0.2 -package editline-0.2.1.0 -package filepath-1.1.0.1
| -package haskell98-1.0.1.0 -package hpc-0.5.0.2 -package
| old-time-1.0.0.1 -package process-1.0.1.1 -package
| template-haskell-2.3.0.0 -package unix-2.3.1.0 -O -Wall
| -fno-warn-name-shadowing -fno-warn-orphans -XCPP -XMagicHash
| -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface
| -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses
| -XFlexibleInstances -XRank2Types -XScopedTypeVariables
| -XDeriveDataTypeable -prof -hisuf p_hi -hcsuf p_hc -osuf p_o
| -idist-stage2/build  -H64m -O -fasm -W -fno-warn-unused-matches
| -fwarn-unused-imports -Rghc-timing -Rghc-timing -O0 -DDEBUG  -c
| iface/BinIface.hs -o dist-stage2/build/BinIface.p_o  -ohi
| dist-stage2/build/BinIface.p_hi
| ghc: panic! (the 'impossible' happened)
|   (GHC version 6.11.20081205 for i386-apple-darwin):
|         CoreToStg.myCollectArgs
|     (__scc {binzuusages ghc-6.11.20081205:BinIface !}
|      ghc-6.11.20081205:Binary.a74{v rLR} [gid]
|        @ [ghc-6.11.20081205:HscTypes.Usage{tc rbj}]
|        $dBinary37{v r7qF} [gid]
|        bh{v s9jS} [lid])
|       eta_s9kP{v} [lid]
|
| I guess it's quite possible that this is caused by one of Simon's
| patches from Friday.
|
| _______________________________________________
| Cvs-ghc mailing list
| Cvs-ghc@haskell.org
| http://www.haskell.org/mailman/listinfo/cvs-ghc

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to