[Haskell-cafe] Relating generated asm to Core

Ben Lippmeier benl at ouroborus.net
Wed Jun 23 23:24:18 EDT 2010


Hi Rami, 
You'll want to first look at the Cmm (C minus minus) code, which is the imperative intermediate language that GHC uses before conversion to assembly.

Do something like "ghc -c Whatever.hs -ddump-cmm". The names of the blocks of cmm code should match the ones in core. If not, then you might want to also look at the output of -ddump-stg.

Keep in mind that the assembly output by GHC will not look like that output by, say, GCC, because of the lazy evaluation method. You'll want to try and ignore the vast swathes thunking code and just focus on the inner loops of your particular algorithm.

Ben.



On 23/06/2010, at 1:35 PM, Rami Mukhtar wrote:

> Hi,
>  
> Can anyone tell me a way to identify the generated assembly (as found in the intermediate files produced by GHC) corresponding to a particular fragment of Core code.  
>  
> Thanks,
> 
> Rami
> 
> The information in this e-mail may be confidential and subject to legal professional privilege and/or copyright. National ICT Australia Limited accepts no liability for any damage caused by this email or its attachments.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100623/aacfe609/attachment.html


More information about the Haskell-Cafe mailing list