From 7adad809b9f300ce6db1ea0a7cdcacfb334729d5 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Mon, 6 Feb 2017 14:10:17 +0100 Subject: Inlined open of Errors --- backend/Regalloc.ml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'backend/Regalloc.ml') diff --git a/backend/Regalloc.ml b/backend/Regalloc.ml index 200d0237..a4710cb0 100644 --- a/backend/Regalloc.ml +++ b/backend/Regalloc.ml @@ -471,7 +471,7 @@ let rec dce_block blk after = let dead_code_elimination f liveness = { f with fn_code = - PTree.map (fun pc blk -> Datatypes.snd(dce_block blk (PMap.get pc liveness))) + PTree.map (fun pc blk -> snd(dce_block blk (PMap.get pc liveness))) f.fn_code } @@ -1171,16 +1171,15 @@ and success f alloc = end; f' -open !Errors let regalloc f = init_trace(); reset_temps(); let f1 = Splitting.rename_function f in match RTLtyping.type_function f1 with - | Error msg -> - Errors.Error(MSG (coqstring_of_camlstring "RTL code after splitting is ill-typed:") :: msg) - | OK tyenv -> + | Errors.Error msg -> + Errors.Error(Errors.MSG (coqstring_of_camlstring "RTL code after splitting is ill-typed:") :: msg) + | Errors.OK tyenv -> let f2 = function_of_RTL_function f1 tyenv in let liveness = liveness_analysis f2 in let f3 = dead_code_elimination f2 liveness in @@ -1189,12 +1188,12 @@ let regalloc f = PrintXTL.print_function !pp f3 end; try - OK(first_round f3 liveness) + Errors.OK(first_round f3 liveness) with | Timeout -> - Error(msg (coqstring_of_camlstring "Spilling fails to converge")) + Errors.Error(Errors.msg (coqstring_of_camlstring "Spilling fails to converge")) | Type_error_at pc -> - Error [MSG(coqstring_of_camlstring "Ill-typed XTL code at PC "); - POS pc] + Errors.Error [Errors.MSG(coqstring_of_camlstring "Ill-typed XTL code at PC "); + Errors.POS pc] | Bad_LTL -> - Error(msg (coqstring_of_camlstring "Bad LTL after spilling")) + Errors.Error(Errors.msg (coqstring_of_camlstring "Bad LTL after spilling")) -- cgit