[MLton] modifying flatten.fun to always flatten
Tue, 20 Jan 2004 10:36:44 -0500 (EST)
> > > I ran into acouple problems adopting the first approach, so I have
> > > implimented the second approach. It seems to be doing what I need it to do
> > > and the compiler fixpoints. I would like to know if there is a way to
> > > print the ssa tree to a file before and after the flatten pass. Bassically
> > > I just want to double check I am correctly flattening all tupples.
> > -keep-pass flatten will leave you with z.flatten.pre.ssa and
> > z.flatten.post.ssa. The argument to -keep-pass is actually a regular
> > expression (useful for the passes that are run more than once). Compiling
> > with -show-types true will probably also be useful to you; you'll be
> > able to search for * types in the post.ssa.
> I add these arguments to the flags in the Makefile, correct? Do you
> offhand know where the default location for the generated files will be?
> /build/bin? I did not realize -type-check true generated a file.
Sorry, I was a little unclear. If you have z.sml, and you compile with:
mlton -keep-pass flatten -show-types true z.sml
then, in addition to the executable z, you will have z.flatten.pre.ssa and
z.flatten.post.ssa in the current directory. -show-types true by itself
doesn't generate any files, it just influences whether or not types appear
when printing the ILs.
So, you shouldn't need to add then to the Makefile, unless you want to see
the ILs for a self-compile.