Re: Discovering which optimizations took place

Matthew Fluet <[email protected]>
Newsgroups gmane.comp.lang.ml.mlton.user
Message-ID <CAMrhFL63zE9Sj5KNUtAr4MUqjEvtpBPqrtVzAS2qPPg2cnyGCw@mail.gmail.com>
On Fri, Nov 14, 2014 at 7:19 PM, Aggelos Biboudis <[email protected]> wrote:
>
> Hi Matthew,
>
> At first, I should thank you for the elaborate answer and the way you describe, is way more effective than trying naively to figure out things with .s directly. As I did at first.
>
> As a first step I will try to familiarize myself with the -keep-pass flag.
>
> Thx for the tip with the ordering of .pre vs .post! This will save me some time!

If you decide to seriously investigate the effects of particular
optimizations, there is also a (mostly undocumented) "-ssa-passes"
option that allows you to give an explicit list of SSA optimization
passes to execute.  The format is a ":" separated list of SSA pass
names (such as appear with -verbose 2, but minus the numeric suffix;
that will be added automatically).  The "orderFunctions" pass will
reorder the functions and blocks of a program into a canonical order,
which can make text diff comparison a bit more helpful.  For example,
the "introduceLoops" pass will reverse the collection of functions in
the program, so you could do something like:
  -ssa-passes "...:orderFunctions:introduceLoops:orderFunctions:..."
and then z.orderFunctions1.post.ssa and z.orderFunctions2.pre.ssa
should align better for a text diff comparison.  The drawback of
"-ssa-passes" is that you need to give the full optimization pipeline
list in order to match the default behavior of the compiler.

> And just to clear things up (for me): This is the part that helped me to see that pattern matching over environments will result in gen_0 only through the flatMap argument deconstruction (v2). SSA svg really helps!

Great!

-Matthew

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.