Opened 4 years ago

Closed 3 years ago

#11717 closed feature request (fixed)

Way to dump cmm only once

Reported by: nomeata Owned by: tvv
Priority: normal Milestone: 8.2.1
Component: Compiler (CodeGen) Version: 8.1
Keywords: newcomer Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D2393
Wiki Page:


The current way to dump Cmm output is -ddump-cmm, but that dumps Cmm repeatedly, of every stage, similar to -ddump-verbose-core2core. This is often confusing.

I propose that -ddump-cmm dumps only the initial Cmm code, that the flag -ddump-simpl-cmm dumps the final Cmm code, and that -ddump-verbose-cmm dumps every stage.

Shoudn’t be hard to do for a newcomer.

Change History (6)

comment:1 Changed 4 years ago by nomeata

Also note that there currently seems to be a

              Dump the results of C-- to C-- optimising passes

comment:2 Changed 3 years ago by osa1

+1 I'm hoping to implement this soon.

comment:3 Changed 3 years ago by tvv

Owner: set to tvv

comment:4 Changed 3 years ago by tvv

Differential Rev(s): Phab:D2393

comment:5 Changed 3 years ago by Ben Gamari <ben@…>

In 1ba79fa/ghc:

CodeGen: Way to dump cmm only once (#11717)

The `-ddump-cmm` put all stages of Cmm processing into one output.
This patch changes its behavior and adds two more options to make
Cmm dumping flexible.

- `-ddump-cmm-from-stg` dumps only initial version of  Cmm right after
   STG->Cmm codegen
- `-ddump-cmm` dumps the final result of the Cmm pipeline processing
- `-ddump-cmm-verbose` dumps intermediate output of each Cmm pipeline
- `-ddump-cmm-proc` and `-ddump-cmm-caf` seems were lost. Now enabled

Test Plan: ./validate

Reviewers: thomie, simonmar, austin, bgamari

Reviewed By: thomie, simonmar

Subscribers: simonpj, thomie

Differential Revision:

GHC Trac Issues: #11717

comment:6 Changed 3 years ago by bgamari

Milestone: 8.2.1
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.