diff options
author | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2019-01-27 14:13:33 +0100 |
---|---|---|
committer | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2019-01-27 14:13:33 +0100 |
commit | 218a54543d24f82f2b85e80f55b8300e1b6aee31 (patch) | |
tree | 3f25478497ff8733fc2489281bc8cf70e86f256b /source/mod_student/constant_folding_analysis.ml | |
parent | Almost working live variable analysis (diff) |
Constant folding optimization - sources
Diffstat (limited to 'source/mod_student/constant_folding_analysis.ml')
-rw-r--r-- | source/mod_student/constant_folding_analysis.ml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source/mod_student/constant_folding_analysis.ml b/source/mod_student/constant_folding_analysis.ml new file mode 100644 index 0000000..40419cc --- /dev/null +++ b/source/mod_student/constant_folding_analysis.ml @@ -0,0 +1,31 @@ +open Xi_lib +open Ir +open Ir_utils + +module Make() = struct + + module Implementation(M:sig + val cfg: ControlFlowGraph.t + val initial: Analysis_domain.ConstantFolding.domain + end) = struct + + open M + + let analyse () = + failwith "not yet implemented" + end + + + + (* Skontruuj wartość ekstremalną *) + let make_initial n = + failwith "not yet implemented" + + let analyse proc : Xi_lib.Analysis_domain.ConstantFolding.table = + let initial = make_initial @@ Ir.formal_parameters_of_procedure proc in + let cfg = Ir.cfg_of_procedure proc in + let module Instance = Implementation(struct let cfg = cfg let initial = initial end) in + let result = Instance.analyse () in + result + +end \ No newline at end of file |