X-Git-Url: http://git.joshuawise.com/snipe.git/blobdiff_plain/5c79bb689ab446551bc7ec4497e6c9b75582837e..5c90fbb8681e975ccd0a1bc407b31daa1daef38a:/optimize/optimizer.sml?ds=inline diff --git a/optimize/optimizer.sml b/optimize/optimizer.sml index fba6485..97d481e 100644 --- a/optimize/optimizer.sml +++ b/optimize/optimizer.sml @@ -5,8 +5,8 @@ sig IRFUNC of (Tree.func -> Tree.func) | IRSTM of (Tree.stm -> Tree.stm list) | IREXP of (Tree.exp -> Tree.exp) | - PRELIVENESS of (x86.insn list -> x86.insn list) | - FINAL of (x86.insn list -> x86.insn list) + PRELIVENESS of (Blarg.insn list -> Blarg.insn list) | + FINAL of (Blarg.insn list -> Blarg.insn list) type optimization = { shortname : string, @@ -15,8 +15,8 @@ sig } val optimize_ir : optimization list -> Tree.program -> Tree.program - val optimize_preliveness : optimization list -> x86.insn list -> x86.insn list - val optimize_final : optimization list -> x86.insn list -> x86.insn list + val optimize_preliveness : optimization list -> Blarg.insn list -> Blarg.insn list + val optimize_final : optimization list -> Blarg.insn list -> Blarg.insn list end structure Optimizer :> OPTIMIZER = @@ -28,8 +28,8 @@ struct IRFUNC of (Tree.func -> Tree.func) | IRSTM of (Tree.stm -> Tree.stm list) | IREXP of (Tree.exp -> Tree.exp) | - PRELIVENESS of (x86.insn list -> x86.insn list) | - FINAL of (x86.insn list -> x86.insn list) + PRELIVENESS of (Blarg.insn list -> Blarg.insn list) | + FINAL of (Blarg.insn list -> Blarg.insn list) type optimization = { shortname : string, @@ -39,7 +39,7 @@ struct fun foldfunc f (T.FUNCTION (id, stml)) = T.FUNCTION (id, List.concat (List.map f stml)) fun expfunc f (T.MOVE (e1, e2)) = [T.MOVE (f e1, f e2)] - | expfunc f (T.RETURN (e, s)) = [T.RETURN (f e, s)] + | expfunc f (T.RETURN (e)) = [T.RETURN (f e)] | expfunc f (T.EFFECT e) = [T.EFFECT (f e)] | expfunc f (a as T.LABEL _) = [a] | expfunc f (T.JUMPIFN (e, l)) = [T.JUMPIFN (f e, l)]