]> Joshua Wise's Git repositories - snipe.git/blobdiff - top/top.sml
woo it generated some code
[snipe.git] / top / top.sml
index 4b58d00cb08d8fbb9cab41e7ba2c6e0ec842f355..6a132c68931fb415686e29b2689e81d7a0cf0ab2 100644 (file)
@@ -29,12 +29,12 @@ struct
   exception EXIT
   
   val alloptimizations =
-    [ConstantFold.optimizer,
+    [(*ConstantFold.optimizer,
      StupidFunctionElim.optimizer,
      FeckfulnessAnalysis.optimizer,
      ConstantFold.optimizer,
      LabelCoalescing.optimizer,
-     Peephole.optimizer]
+     Peephole.optimizer*)] : Optimizer.optimization list
   
   val uniqopts =
     foldr
@@ -107,7 +107,7 @@ struct
         val _ = Flag.guard Flags.verbose say "  Generating proto-x86_64 code..."
         val assem = Codegen.codegen ir
         val _ = Flag.guard Flags.assem
-                  (fn () => List.app (TextIO.print o (x86.print)) assem) ()
+                  (fn () => List.app (TextIO.print o (Blarg.print)) assem) ()
 
         val _ = Flag.guard Flags.verbose say "  Optimizing pre-liveness..."
         val assem = Optimizer.optimize_preliveness (!enabledopts) assem
@@ -119,7 +119,7 @@ struct
                     (fn (asm, liv) =>
                       TextIO.print (
                         let
-                          val xpp = x86.print asm
+                          val xpp = Blarg.print asm
                           val xpp = String.extract (xpp, 0, SOME (size xpp - 1))
                           val spaces = implode (List.tabulate (40 - size xpp, fn _ => #" ")) handle size => ""
                           val lpp = Liveness.prettyprint liv
@@ -142,14 +142,14 @@ struct
                   (fn () => List.app (TextIO.print o
                     (fn (t, i) =>
                       (Temp.name t) ^ " => " ^ (
-                        if (i <= x86.regtonum x86.R13D)
-                          then (x86.pp_oper (x86.REG (x86.numtoreg i), Temp.Long))
+                        if (i <= Blarg.regtonum Blarg.R3)
+                          then (Blarg.pp_oper (Blarg.REG (Blarg.numtoreg i)))
                         else
-                          "spill[" ^ Int.toString (i - x86.regtonum x86.R13D) ^ "]")
+                          "spill[" ^ Int.toString (i - Blarg.regtonum Blarg.R3) ^ "]")
                         ^ "--"^ Int.toString i ^ "\n"))
                     colors) ()
 
-        val _ = Flag.guard Flags.verbose say "  Solidifying x86_64 code..."
+(*        val _ = Flag.guard Flags.verbose say "  Solidifying blargCPU code..."
         val x86 = Solidify.solidify colors assem
 
         val _ = Flag.guard Flags.verbose say "  Optimizing final assembly..."
@@ -159,9 +159,9 @@ struct
         val x86d = [x86.DIRECTIVE(".globl " ^ name),
                     x86.DIRECTIVE(name ^ ":")]
                     @ x86p
-        val code = Stringify.stringify realname x86d
+        val code = Stringify.stringify realname x86d*)
       in
-        code
+        ""
       end
 
   fun main (name, args) =
This page took 0.02841 seconds and 4 git commands to generate.