[Haskell-cafe] Relating generated asm to Core
benl at ouroborus.net
Wed Jun 23 23:24:18 EDT 2010
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.
On 23/06/2010, at 1:35 PM, Rami Mukhtar wrote:
> 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.
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe