Cannot build ghc HEAD with LLVM ARM due to globalRegMaybe

Moritz Angermann moritz at lichtzwerge.de
Mon Sep 15 16:28:04 UTC 2014


Alright!
Ticket is here, for everyone interested: https://ghc.haskell.org/trac/ghc/ticket/9593

Cheers,
 Moritz

On Sep 15, 2014, at 6:12 PM, Simon Peyton Jones <simonpj at microsoft.com> wrote:

> We don't yet have a firm policy, but my instinct is that. If they have a ticket, a milestone, a priority, they are less likely to get "lost".  It's also easier for people to say on a ticket "is the design right?" than it is on Phab which is optimised for *code* review.
> 
> Simon
> 	
> | -----Original Message-----
> | From: Moritz Angermann [mailto:moritz at lichtzwerge.de]
> | Sent: 15 September 2014 13:51
> | To: Simon Peyton Jones
> | Cc: ghc-devs at haskell.org
> | Subject: Re: Cannot build ghc HEAD with LLVM ARM due to globalRegMaybe
> | 
> | Dear Simon,
> | 
> | No, there is not. Should every patch in Phab, have an associated ticket
> | as well?
> | 
> | Cheers,
> |  Moritz
> | 
> | On Sep 15, 2014, at 2:17 PM, Simon Peyton Jones <simonpj at microsoft.com>
> | wrote:
> | 
> | > Is there a Trac ticket too?
> | >
> | > Simon
> | >
> | > | -----Original Message-----
> | > | From: ghc-devs [mailto:ghc-devs-bounces at haskell.org] On Behalf Of
> | Moritz
> | > | Angermann
> | > | Sent: 15 September 2014 10:19
> | > | To: ghc-devs at haskell.org
> | > | Subject: Re: Cannot build ghc HEAD with LLVM ARM due to
> | globalRegMaybe
> | > |
> | > | Hi Janek,
> | > |
> | > | yea :) I think it went by unnoticed.  Patch is already in Phab,
> | > |
> | > | https://phabricator.haskell.org/D208
> | > |
> | > | Not sure how to speed up the review process, though ;-)
> | > |
> | > | Cheers,
> | > |   Moritz
> | > |
> | > | On Sep 15, 2014, at 11:13 AM, Jan Stolarek <jan.stolarek at p.lodz.pl>
> | > | wrote:
> | > |
> | > | > I think it is best to fill in a bug report and attach a patch - I'm
> | > | afraid this mail may have gone
> | > | > unnoticed :-)
> | > | >
> | > | > Janek
> | > | >
> | > | > Dnia piątek, 12 września 2014, Moritz Angermann napisał:
> | > | >> Hi,
> | > | >>
> | > | >> when trying to compile a ghc HEAD on LLVM ARM, I end up getting an
> | > | >> exception:
> | > | >>
> | > | >>    ghc-stage1: panic! (the 'impossible' happened)
> | > | >>      (GHC version 7.9.20140911 for arm-apple-ios):
> | > | >>        globalRegMaybe
> | > | >>
> | > | >> After some digging I found that a new call to globalRegMaybe was
> | > | introduced
> | > | >> here:
> | > | >>
> | http://git.haskell.org/ghc.git/blob/HEAD:/compiler/cmm/CmmSink.hs#l231
> | > | on
> | > | >> 2014-04-29 in commit:
> | > | >>
> | > |
> | http://git.haskell.org/ghc.git/commitdiff/83a003fcaec93dbfd5b46837f2bf335
> | > | 34
> | > | >> 12b9877
> | > | >>
> | > | >> In a similar timeframe (since 2014-05-02)
> | /include/CodeGen.Platform.hs
> | > | was
> | > | >> changed:
> | > | >>
> | > |
> | http://git.haskell.org/ghc.git/blobdiff/b0534f78a73f972e279eed4447a5687bd
> | > | 6a
> | > | >> 8308e..HEAD:/includes/CodeGen.Platform.hs
> | > | >>
> | > | >> introducing a set of new ifdef/elif/endif pairs. Especially for
> | > | >> MACHREGS_NO_REGS, namely:
> | > | >>
> | > | >>    -#endif
> | > | >>     globalRegMaybe _                        = Nothing
> | > | >>    +#elif MACHREGS_NO_REGS
> | > | >>    +globalRegMaybe _ = Nothing
> | > | >>    +#else
> | > | >>    +globalRegMaybe = panic "globalRegMaybe not defined for this
> | > | platform"
> | > | >>    +#endif
> | > | >>
> | > | >> ARM.hs
> | > | >>
> | > |
> | (http://git.haskell.org/ghc.git/blob/23892440032fcab8a6a753916d5068576741
> | > | 69
> | > | >> ec:/compiler/codeGen/CodeGen/Platform/ARM.hs) however, has:
> | > | >>
> | > | >>    #define MACHREGS_NO_REGS 0
> | > | >>    #define MACHREGS_arm 1
> | > | >>
> | > | >> where MACHREGS_arm 1 has no effect on the subsequently imported
> | > | >> CodeGen.Platform.hs.
> | > | >>
> | > | >> Therefore I propose that a change to ARM.hs is made to set
> | > | >> MACHREGS_NO_REGS to 1.
> | > | >>
> | > | >> Cheers,
> | > | >> Moritz
> | > | >> _______________________________________________
> | > | >> ghc-devs mailing list
> | > | >> ghc-devs at haskell.org
> | > | >> http://www.haskell.org/mailman/listinfo/ghc-devs
> | > | >
> | > | >
> | > |
> | > | _______________________________________________
> | > | ghc-devs mailing list
> | > | ghc-devs at haskell.org
> | > | http://www.haskell.org/mailman/listinfo/ghc-devs
> 

————————————————— 
Moritz Angermann
+49 170 54 33 0 74
moritz at lichtzwerge.de

lichtzwerge GmbH
Freisinger Landstr. 25
85748 Garching b. München

Amtsgericht München HRB 207882
Geschäftsführung: Moritz Angermann, Ralf Sangl
USt-Id: DE291948767

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese
E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den
Absender und vernichten Sie diese Mail.
Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail
ist nicht gestattet.
This e-mail may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this e-mail in
error) please notify the sender immediately and destroy this e-mail.
Any unauthorized copying, disclosure or distribution of the material in
this e-mail is strictly forbidden.



More information about the ghc-devs mailing list