#2002: problems with very large (list) literals
------------------------------------------+---------------------------------
 Reporter:  Isaac Dupree                  |          Owner:  simonmar   
     Type:  compile-time performance bug  |         Status:  new        
 Priority:  high                          |      Milestone:  6.10 branch
Component:  Compiler                      |        Version:  6.8.2      
 Severity:  normal                        |     Resolution:             
 Keywords:                                |     Difficulty:  Unknown    
 Testcase:                                |   Architecture:  x86        
       Os:  Linux                         |  
------------------------------------------+---------------------------------
Comment (by Isaac Dupree):

 There is still an issue here, with HEAD self-compiling its
 parser/Lexer.{hs|x} generated by `alex` without `-g`.  I have it here with
 15 minutes of 2GHz CPU time and about 250MB memory used constantly
 according to `top`, and no evidence of finishing.

 {{{
 ../compiler/stage1/ghc-inplace -no-user-package-conf -H128m -O0 -fasm
 -istage2/utils  -istage2/basicTypes  -istage2/types  -istage2/hsSyn
 -istage2/prelude  -istage2/rename  -istage2/typecheck  -istage2/deSugar
 -istage2/coreSyn  -istage2/vectorise  -istage2/specialise
 -istage2/simplCore  -istage2/stranal  -istage2/stgSyn  -istage2/simplStg
 -istage2/codeGen  -istage2/main  -istage2/profiling  -istage2/parser
 -istage2/cprAnalysis  -istage2/iface  -istage2/cmm  -istage2/nativeGen
 -istage2/ghci -Wall -fno-warn-name-shadowing -fno-warn-orphans -Istage2
 -package hpc -package bytestring -DGHCI -package template-haskell
 -DGHCI_TABLES_NEXT_TO_CODE -I../libffi/build/include -cpp -fglasgow-exts
 -fno-generics -Rghc-timing -I. -Iparser -Iutil -package unix -package
 Cabal -ignore-package lang -recomp -Rghc-timing -O0 -fasm -DDEBUG -H16M
 '-#include "cutils.h"' -package-name  ghc-6.9.20080602   -fgenerics
 -funbox-strict-fields  -c parser/Lexer.hs -o stage2/parser/Lexer.o  -ohi
 stage2/parser/Lexer.hi
 }}}
 Same with -O as -O0 and -fvia-C instead of -fasm (gcc & friends never
 start, presumably because GHC hasn't gotten that far)... Oh wait, -fvia-C
 after 2 minutes GHC CPU, it goes into cc1 (gcc) which is taking all my RAM
 memory. Hang on a moment, I'll report back when it's done or crashed, I
 need to free up memory :-)

 Hmm... it appears some of the settings in my mk/build.mk (-H128M) are
 being overridden by compiler/Makefile (-H16M).  Odd.

 It's a bit tricky to reproduce, because we obviously we don't expect 6.8
 and previous to succeed.  I first got a working stage1, then proceeded to
 modify mk/config.mk{,.in} to delete the `-g` from the `GHC_ALEX_OPTS`
 line, then removed the file compiler/parser/Lexer.hs (to make sure it
 would be regenerated with the new settings), then `cd compiler` and `make
 stage=2`.  Obviously simpler test cases could exist, but it's not simple
 to see how to simplify this instance of GHC getting overwhelmed without
 wrecking it

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2002#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to