[MLton-commit] r5781
Matthew Fluet
fluet at mlton.org
Thu Jul 19 14:01:45 PDT 2007
Regularize the treatment of some simplify passes.
- move SSA and SSA2 IL profiling into separate modules. In the
future, it would be useful to provide better IL profiling, for
example, using loop forests (which would help identify hot loops).
- run orderFunctions after adding profiling to ILs
- emit .pre.rssa and .post.rssa files for RSSA simplify
----------------------------------------------------------------------
U mlton/trunk/mlton/ssa/shrink2.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/ssa/shrink2.fun
===================================================================
--- mlton/trunk/mlton/ssa/shrink2.fun 2007-07-19 21:00:36 UTC (rev 5780)
+++ mlton/trunk/mlton/ssa/shrink2.fun 2007-07-19 21:01:44 UTC (rev 5781)
@@ -513,13 +513,16 @@
fun meaningArgs m =
Block.args (Vector.sub (blocks, LabelMeaning.blockIndex m))
fun save (f, s) =
- File.withOut
- (concat ["/tmp/", Func.toString (Function.name f),
- ".", s, ".dot"],
- fn out =>
- Layout.outputl
- (#graph (Function.layoutDot (f, fn _ => NONE)),
- out))
+ let
+ val {destroy, graph, ...} =
+ Function.layoutDot (f, fn _ => NONE)
+ in
+ File.withOut
+ (concat ["/tmp/", Func.toString (Function.name f),
+ ".", s, ".dot"],
+ fn out => Layout.outputl (graph, out))
+ ; destroy ()
+ end
val () = if true then () else save (f, "pre")
(* *)
val () =
More information about the MLton-commit
mailing list