tools for comparing ghc's debug outputs?
claus.reinke at talk21.com
Thu Jul 31 08:26:56 EDT 2008
>> I seem to recall someone mentioning a tool for normalizing
>> the output of things like -ddump-simpl to make diffs easier
>> by reducing irrelevant differences due to gensym-generated
>> names. Was that just wishful thinking, or does such a thing exist?-)
> I would also find such a tool very useful, but to the best of my
> knowledge there's nothing out there yet.
Surprising - how do all of you optimization tuners manage without?
> You can get quite far by using the -dsuppress-uniques flag, which
> removes irrelevant differences due solely to the unique numbers
> assigned to names. However, I've found that diff output from that is
> still hard to deal with because GHC reorders functions in the Core
> output under some circumstances. I've been meaning to find the time to
> try and fix this.
Thanks. Simon PJ also mentioned that (undocumented?) flag, but I
must be using it wrong, because
ghc --make -O2 Main.hs -dsuppress-uniques -ddump-simpl >simpl-slow
still gives me plenty of _labels in the output (6.9.20080514). How is
this flag supposed to be used?
I've had some success by simply doing a brute-force #s/_[^ _]*\>//g'
over the files before diffing, to remove anything that looks like a final
addon-label. That isn't quite right (__inline_me becomes __inline, etc),
but at least it helps to fold away lots of unwanted detail.
More information about the Glasgow-haskell-users