Large .hc files generated when compiling on SPARC T2
marlowsd at gmail.com
Tue Jan 6 07:17:48 EST 2009
Simon Peyton-Jones wrote:
> As I understand it from Roman, this is unique to SPARC. Specifically, gcc is uniquely slow.
> I believe that our Current Plan is to avoid the problem by generating native code directly, and get rid of gcc in the pipeline. Ah, that's what you are doing!
> Of course you need to bootstrap. I'm not sure how to help there. At least you only have to compile Parser.hs once. Simon M may have suggestions for Happy flags that trade execution time for code size.
We should be using the best Happy flags already (-agc).
> | -----Original Message-----
> | From: cvs-ghc-bounces at haskell.org [mailto:cvs-ghc-bounces at haskell.org] On Behalf Of Ben
> | Lippmeier
> | Sent: 02 January 2009 10:06
> | To: cvs-ghc at haskell.org; Duncan Coutts; Roman Leshchinskiy
> | Subject: Large .hc files generated when compiling on SPARC T2
> | Hi all,
> | I've started work on the SPARC T2 backend. There's a blog at
> | http://ghcsparc.blogspot.com/ with the current progress. I've got the
> | binary of 6.8.3 installed and am trying to compile 6.10 and the head.
> | I'm running into some huge compile times that I'm hoping someone will
> | have some suggestions about. When compiling Parser.hs the intermediate
> | .hc file is 4MB big, and is taking GCC 4.2.1 more than 2 hours to get
> | through.
> | Another attempted compile of GHC 6.8.3 is stuck on
> | libraries/template-haskell/Language/Haskell/TH/Syntax.hs with a 4MB
> | intermediate .hc file.
> | I have two questions:
> | 1) How do we feel about the 4MB intermediate file? I'll swallow that the
> | parser might generate a large one due to every parser state being
> | represented by a separate function, but Syntax.hs seems excessive.
> | Compiling Syntax.hs with verboseness turned on shows:
> | *** Core Linted result of Float out (not lambdas, not constants):
> | *** Float inwards:
> | Result size = 15185
> | *** Core Linted result of Float inwards:
> | *** Simplify:
> | Result size = 49570 <----- BIG JUMP HERE -------------
> | *** Core Linted result of Simplifier phase 2, iteration 1 out of 4:
> | Result size = 49385
> | *** Core Linted result of Simplifier phase 2, iteration 2 out of 4:
> | Result size = 48077
> | Syntax.hs is 24kb, but Syntax.hc is 4MB.
> | 2) I killed an attempted compile of Parser.hs after about 20 min and got:
> | ghc: 994183176 bytes, 41 GCs, 9129984/21708800 avg/max bytes residency
> | (7 samples), 69M in use, 0.01 INIT (0.00 elapsed), 20.06 MUT (1090.72
> | elapsed), 4.16 GC (4.41 elapsed) :ghc
> | I'm worried about the 20.06 MUT (1090.72 elapsed) part. Would this
> | indicate that the mutator did 20s of useful work, but spent about 1070s
> | in page fault?
> | Thanks,
> | Ben.
> | _______________________________________________
> | Cvs-ghc mailing list
> | Cvs-ghc at haskell.org
> | http://www.haskell.org/mailman/listinfo/cvs-ghc
> Cvs-ghc mailing list
> Cvs-ghc at haskell.org
More information about the Cvs-ghc