]> Joshua Wise's Git repositories - snipe.git/blobdiff - codegen/peephole.sml
Initial import of l2c
[snipe.git] / codegen / peephole.sml
index cdbba9c09c486165488b55618188d8fc7d20fc1e..7880a4532a5744d1c0f9a13fdcbb47cbacdcdb6b 100644 (file)
@@ -1,5 +1,5 @@
-(* peephole optimizer
- * Gathers tiberium, fires rockets
+(* L2 compiler
+ * peephole optimizer
  * optimizes away redundant insns such as:
      mov a, b
      mov a, b
      
      neg a
      neg a
- * Author: Chris Lu <czl@andrew>
+ * Author: Chris Lu <czl@andrew.cmu.edu>
  *)
 
 signature PEEPHOLE =
 sig
-  type tiberium = x86.insn list
-  type rockets = x86.insn list
-  val peephole : tiberium -> rockets
+  val peephole : x86.insn list -> x86.insn list
 end
 
 structure Peephole :> PEEPHOLE =
 struct
-  type tiberium = x86.insn list
-  type rockets = x86.insn list
   structure X = x86
 
-  (* val peephole : tiberium -> rockets *)
+  (* val peephole : x86.insn list -> x86.insn list *)
 
   fun peephole ((insn1 as X.MOVL(a1,b1))::(insn2 as X.MOVL(a2,b2))::l) =
         if(x86.opereq(a1, b1) orelse (x86.opereq(a1, a2) andalso x86.opereq(b1, b2))) then
This page took 0.022382 seconds and 4 git commands to generate.