How to read -ddump-hi output (and other phases) from GHC

I'm collecting links to documents describing some of GHC's optimisation output flags, like -ddump-hi and -ddump-simpl. I'll add stuff to this wiki page: http://www.haskell.org/haskellwiki/Performance/GHC So far I've found little bits in the GHC manual, like: 4.16.3. How to read Core syntax http://www.haskell.org/ghc/docs/latest/html/users_guide/options-debugging.ht... (and the Encoding module has the actual rules for the Unique names) http://darcs.haskell.org/ghc/compiler/utils/Encoding.hs 6.2. Faster: producing a program that runs quicker http://www.haskell.org/ghc/docs/latest/html/users_guide/faster.html (see "How do I find out a function's strictness?") Any other hints? Alistair

Hi
4.16.3. How to read Core syntax http://www.haskell.org/ghc/docs/latest/html/users_guide/options-debugging.ht...
I found that -ddump-simpl gives you good information, in a readable form - I much prefer it to reading the .hcr files. Thanks Neil

| > 4.16.3. How to read Core syntax | > http://www.haskell.org/ghc/docs/latest/html/users_guide/options-debugging.ht... | | I found that -ddump-simpl gives you good information, in a readable | form - I much prefer it to reading the .hcr files. The printer for GHC's Core language wasn't originally designed for lots of people to read, although lots of people now do. It's not cast in stone. If someone wants to improve the output, please go ahead. Simon

The .hcr format isn't cast in stone, either. Though I'm working on the implementation, I don't have any immediate plans to use it, myself. So, if other people have suggestions for how it should be different, I'd love to hear them. Aaron On Jun 5, 2007, at 12:23 AM, Simon Peyton-Jones wrote:
| > 4.16.3. How to read Core syntax | > http://www.haskell.org/ghc/docs/latest/html/users_guide/options- debugging.html#id3130643 | | I found that -ddump-simpl gives you good information, in a readable | form - I much prefer it to reading the .hcr files.
The printer for GHC's Core language wasn't originally designed for lots of people to read, although lots of people now do. It's not cast in stone. If someone wants to improve the output, please go ahead.
Simon _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Alistair Bayley skrev:
I'm collecting links to documents describing some of GHC's optimisation output flags, like -ddump-hi and -ddump-simpl. I'll add stuff to this wiki page: http://www.haskell.org/haskellwiki/Performance/GHC Any other hints?
Thanks. I will definitely use such a guide. I only tried reading core once, but I used the --dump-X options together with compilation for profiling. Inserting my own cost-centres then gave me very clear labels in the code at the places I wanted them. I felt this made it easier for me to identify the different functions and other parts of the code within the core file. Johan
participants (5)
-
Aaron Tomb
-
Alistair Bayley
-
Johan Grönqvist
-
Neil Mitchell
-
Simon Peyton-Jones