|
GHC on IA-64: msg#00131lang.haskell.glasgow.bugs
First of all I'd like to note that a registerised build of ghc-6.4.1 "Just Works"tm. I didn't need any special hacks. This is excellent. This registerised ghc build was able to successfully recompile itself. It took about 2 hours (dual cpu Itanium 2 @ 900MHz, make -j4 - thanks to certain Gentoo developers for letting me use their ia64 box!) I only needed one patch to get parallel make to work. I darcs sent the patch ("mkDerivedConstants.c depends on ghcplatform.h") to the ghc-cvs list but it has not come through just yet. It seems that the patch had a very large context and so the email went over the limit of 40KB and so got held for moderation. Perhaps it's time to darcs tag/optimise or increase the size limit of emails that can be sent to the list. Anyway... I used this registerised ghc to compile darcs 1.0.6. I ran into one problem while compiling SHA1.lhs: ghc -cpp -package QuickCheck -package util -package parsec -O -funbox-strict-fields -Wall -Werror -I. -DHAVE_CURSES -DHAVE_CURL -no-auto-all -funfolding-use-threshold20 -c SHA1.lhs Prologue junk?: .proc s64t_ret# s64t_ret: .save ar.pfs, r107 alloc r107 = ar.pfs, 0, 77, 8, 0 .body The source code in SHA1.lhs is fairly heavily unrolled for performance and the darcs build system is using an extra optimisation flag for this file -funfolding-use-threshold20 (in addition to -O -funbox-strict-fields). http://abridgegame.org/cgi-bin/darcs.cgi/darcs/SHA1.lhs?c=annotate The error looks as though it's coming from the mangler. It turns out that just omitting the -funfolding-use-threshold20 flag allows it to compile ok. My suspicion is that with all this heavy unrolling, the code is using and probably spilling lots of registers and that this is enough to upset the mangler on ia64. Now I don't particularly expect anyone to fix this bug since there is a workaround and there don't seem to be any IA-64/GHC experts about any more. I just thought I'd mention all this stuff in case anyone finds it useful in future. Of course if anyone thinks they can see a fix I'd be happy to test it. If anyone wants to look into it, I could narrow down the threshold of the -funfolding-use-threshold flag at which the bug is triggered and compare the assembly output. Duncan
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | building docs fails for stable ghc-6.4.2 (2006/03/23 snapshot), Duncan Coutts |
|---|---|
| Next by Date: | [GHC] #734: Spurious type variable scope error report, GHC |
| Previous by Thread: | building docs fails for stable ghc-6.4.2 (2006/03/23 snapshot), Duncan Coutts |
| Next by Thread: | Re: GHC on IA-64, Duncan Coutts |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |