aboutsummaryrefslogtreecommitdiffstats
path: root/backend/Regalloc.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2017-02-06 14:10:17 +0100
committerBernhard Schommer <bernhardschommer@gmail.com>2017-02-06 14:10:17 +0100
commit7adad809b9f300ce6db1ea0a7cdcacfb334729d5 (patch)
treeb85c5b100d7368892f24d20771060efa8fff30a8 /backend/Regalloc.ml
parentdfba269766c54c5833023768fb156dd8f7e82554 (diff)
downloadcompcert-kvx-7adad809b9f300ce6db1ea0a7cdcacfb334729d5.tar.gz
compcert-kvx-7adad809b9f300ce6db1ea0a7cdcacfb334729d5.zip
Inlined open of Errors
Diffstat (limited to 'backend/Regalloc.ml')
-rw-r--r--backend/Regalloc.ml19
1 files changed, 9 insertions, 10 deletions
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"))