diff options
author | Sylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr> | 2021-04-28 18:14:53 +0200 |
---|---|---|
committer | Sylvain Boulmé <sylvain.boulme@univ-grenoble-alpes.fr> | 2021-04-28 18:14:53 +0200 |
commit | af2c82cfd7f2318fcd81da2ea4cf3fd695db3b40 (patch) | |
tree | 7a5f98548a3e3e0497231627166738253cbce506 /scheduling/BTLtoRTL.v | |
parent | 71d69df10047aa5710adb4bcdc75e18bec4dbf27 (diff) | |
download | compcert-kvx-af2c82cfd7f2318fcd81da2ea4cf3fd695db3b40.tar.gz compcert-kvx-af2c82cfd7f2318fcd81da2ea4cf3fd695db3b40.zip |
start the new "BTL" IR.
Diffstat (limited to 'scheduling/BTLtoRTL.v')
-rw-r--r-- | scheduling/BTLtoRTL.v | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scheduling/BTLtoRTL.v b/scheduling/BTLtoRTL.v new file mode 100644 index 00000000..b64fd87a --- /dev/null +++ b/scheduling/BTLtoRTL.v @@ -0,0 +1,23 @@ +Require Import Coqlib Maps. +Require Import AST Integers Values Events Memory Globalenvs Smallstep. +Require Import RTL Op Registers OptionMonad BTL. + +Require Import Errors Linking. + +(** External oracle *) +Parameter btl2rtl: function -> RTL.code * node * (PTree.t node). + +Local Open Scope error_monad_scope. + +Definition transf_function (f: function) : res RTL.function := + let (tcte, dupmap) := btl2rtl f in + let (tc, te) := tcte in + let f' := RTL.mkfunction (fn_sig f) (fn_params f) (fn_stacksize f) tc te in + do u <- verify_function dupmap f f'; + OK f'. + +Definition transf_fundef (f: fundef) : res RTL.fundef := + transf_partial_fundef transf_function f. + +Definition transf_program (p: program) : res RTL.program := + transform_partial_program transf_fundef p. |