From aebbc43842ec0c49058b718c685e08edf11ce614 Mon Sep 17 00:00:00 2001 From: David Monniaux Date: Wed, 1 Apr 2020 16:15:54 +0200 Subject: route through LICMaux --- backend/LICM.v | 5 +---- backend/LICMaux.ml | 4 ++++ extraction/extraction.v | 3 +++ 3 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 backend/LICMaux.ml diff --git a/backend/LICM.v b/backend/LICM.v index d45eef43..0a0a1c7d 100644 --- a/backend/LICM.v +++ b/backend/LICM.v @@ -3,10 +3,7 @@ Require Import AST Linking. Require Import Memory Registers Op RTL. Require Inject. -Definition gen_injections (f : function) (max_pc : node) (max_reg : reg): - PTree.t (list Inject.inj_instr) := PTree.empty (list Inject.inj_instr). - -Opaque gen_injections. +Axiom gen_injections : function -> node -> reg -> PTree.t (list Inject.inj_instr). Definition transf_program : program -> res program := Inject.transf_program gen_injections. diff --git a/backend/LICMaux.ml b/backend/LICMaux.ml new file mode 100644 index 00000000..542b6ea8 --- /dev/null +++ b/backend/LICMaux.ml @@ -0,0 +1,4 @@ +open RTL;; + +let gen_injections (f : function) (max_pc : node) (max_reg : reg) = + PTree.empty;; diff --git a/extraction/extraction.v b/extraction/extraction.v index 1bb5a709..b102503b 100644 --- a/extraction/extraction.v +++ b/extraction/extraction.v @@ -87,6 +87,9 @@ Extract Inlined Constant Inlining.inlining_info => "Inliningaux.inlining_info". Extract Inlined Constant Inlining.inlining_analysis => "Inliningaux.inlining_analysis". Extraction Inline Inlining.ret Inlining.bind. +(* Loop invariant code motion *) +Extract Inlined Constant LICM.gen_injections => "LICMaux.gen_injections". + (* Allocation *) Extract Constant Allocation.regalloc => "Regalloc.regalloc". -- cgit