Ticket #7060 (closed bug: fixed)

Opened 12 months ago

Last modified 11 months ago

Option -ddump-rule-rewrites doesn't dump to a file

Reported by: erikd Owned by: pcapriotti
Priority: high Milestone: 7.6.1
Component: Compiler Version: 7.5
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Running the command (using my GHC git HEAD compiler):

~/GHC/bin/ghc -v --make -dumpdir dumpopt/ -ddump-to-file -ddump-rule-rewrites -O1 --make mask-test.hs -o mask-test-opt

and the -ddump-rule-rewrites output still ends up on the console instead of the specified dumpdir.

Change History

Changed 11 months ago by pcapriotti

  • owner set to pcapriotti
  • difficulty set to Unknown
  • milestone set to 7.6.1

Changed 11 months ago by p.capriotti@…

commit 3fcf5bdff7a22e22d7265535369cd8f867141ec1

Author: Paolo Capriotti <p.capriotti@gmail.com>
Date:   Thu Jul 12 17:53:50 2012 +0100

    Use dumpSDoc functions to output rules (#7060)
    
    Make -ddump-rules, -ddump-rule-firings and -ddump-rule-rewrites
    behave like the other -ddump flags, by using the dumpSDoc function
    instance of pprDefiniteTrace.

 compiler/main/TidyPgm.lhs       |   10 +++++-----
 compiler/simplCore/Simplify.lhs |   34 +++++++++++++++++++---------------
 2 files changed, 24 insertions(+), 20 deletions(-)

Changed 11 months ago by pcapriotti

  • status changed from new to closed
  • resolution set to fixed

Changed 11 months ago by simonmar

  • owner pcapriotti deleted
  • priority changed from normal to high
  • status changed from closed to new
  • resolution fixed deleted

This broke the test perf/compiler/T4007 (different output). Also I wonder whether the new output isn't too verbose; before we had

Rule fired: unpack
Rule fired: Class op >>
Rule fired: Class op return
Rule fired: <=#
Rule fired: fold/build
Rule fired: unpack-list

and now we have

====================  ====================
Rule fired
unpack



====================  ====================
Rule fired
Class op >>



====================  ====================
Rule fired
Class op return



====================  ====================
Rule fired
<=#



====================  ====================
Rule fired
fold/build



====================  ====================
Rule fired
unpack-list

Do we really want it to look like this?

Changed 11 months ago by simonmar

  • owner set to pcapriotti

Changed 11 months ago by simonpj

We definitely want the old output!

Changed 11 months ago by p.capriotti@…

commit 2b341fc43b244a3cc8bc174875241821d983e16e

Author: Paolo Capriotti <p.capriotti@gmail.com>
Date:   Tue Jul 17 16:24:26 2012 +0100

    Remove hPrintDump and make rule dump output more consistent (#7060)
    
    The only difference between SevDump and SevOutput in defaultLogAction is
    an extra blank line, so we don't need a separate hPrintDump function.
    
    Also make -ddump-to-file consistent with the stdout version, by avoiding
    to add the extra empty line when dumping rules.

 compiler/main/DynFlags.hs     |    2 +-
 compiler/main/ErrUtils.lhs    |    8 +++++++-
 compiler/utils/Outputable.lhs |   10 +---------
 3 files changed, 9 insertions(+), 11 deletions(-)

Changed 11 months ago by pcapriotti

  • status changed from new to closed
  • resolution set to fixed

Also pushed:

commit f8a00d0e4ac1f94f6ccf3da3ee6c208cdbce8d65
Author: Paolo Capriotti <p.capriotti@gmail.com>
Date:   Tue Jul 17 16:11:02 2012 +0100

    Restore old output for -ddump-rule-firings #7060
    
    Commit 3fcf5bdff7a22e22d7265535369cd8f867141ec1 made the output of
    -ddump-rule-firings and -ddump-rule-rewrites excessively verbose.
    
    Fixed by removing the extra blank lines and separator when the header
    of dump is empty.
Note: See TracTickets for help on using tickets.