]> Joshua Wise's Git repositories - snipe.git/blobdiff - optimize/feckful.sml
Initial import of l5c
[snipe.git] / optimize / feckful.sml
diff --git a/optimize/feckful.sml b/optimize/feckful.sml
new file mode 100644 (file)
index 0000000..ec6bdc5
--- /dev/null
@@ -0,0 +1,13 @@
+structure FeckfulnessAnalysis :> OPTIMIZATION =
+struct
+  structure T = Tree
+  structure TU = TreeUtils
+  
+  fun feckstm (a as T.EFFECT e) =
+        if (TU.effect e)
+        then [a]
+        else []
+    | feckstm a = [a]
+  
+  val optimizer = { shortname = "feckfulness", description = "Removes simple side effect statements that have no effect", func = Optimizer.IRSTM feckstm }
+end
This page took 0.024024 seconds and 4 git commands to generate.