Skip to content
Snippets Groups Projects
Commit 70354a07 authored by erwan's avatar erwan
Browse files

Do not split struct and array access

It is useless (I hope) and it sometimes creates combinatory loops.
parent fdd977a6
No related branches found
No related tags found
No related merge requests found
OASISFormat: 0.4
Name: lustre-v6
Version: 1.708
Version: 1.709
Synopsis: The Lustre V6 Verimag compiler
Description: This package contains:
(1) lus2lic: the (current) name of the compiler (and interpreter via -exec).
......
......@@ -137,6 +137,12 @@ let rec (break_it : val_exp -> val_exp list) =
(* fixpoint *)
(List.flatten (List.map break_it vel))
let (is_an_access : Lic.by_pos_op -> bool) = function
| STRUCT_ACCESS _
| ARRAY_ACCES _ -> true
| _ -> false
let (split_tuples:Lic.eq_info Lxm.srcflagged list -> Lic.eq_info Lxm.srcflagged list) =
fun eql ->
let split_one_eq eq =
......@@ -267,7 +273,7 @@ and (split_val_exp : LicPrg.t -> bool -> bool -> Lic.val_exp -> Lic.val_exp * sp
let lpl = List.map (fun nv -> LeftVarLic(nv, lxm)) nv_l in
let eq = Lxm.flagit (lpl, rhs) lxm in
nve, (eql@[eq], vl@nv_l)
)
)
| CallByPosLic(by_pos_op_eff, vel) -> (
(* recursively split the arguments *)
let lxm = by_pos_op_eff.src in
......@@ -289,7 +295,10 @@ and (split_val_exp : LicPrg.t -> bool -> bool -> Lic.val_exp -> Lic.val_exp * sp
rhs, (eql, vl)
in
let rhs = { ve with ve_core = rhs } in
if top_level || by_pos_op_eff.it = TUPLE then
if top_level || by_pos_op_eff.it = TUPLE ||
(* useless (I hope) and would sometimes create combinatory loops *)
is_an_access by_pos_op_eff.it
then
rhs, (eql, vl)
else
(* create the var for the current call *)
......
(** Automatically generated from Makefile *)
let tool = "lus2lic"
let branch = "master"
let commit = "708"
let sha_1 = "23dd9907980de51df48fb244655208a2c583034e"
let commit = "709"
let sha_1 = "fdd977a6a66cd5c069e3efffa039de0880522887"
let str = (branch ^ "." ^ commit ^ " (" ^ sha_1 ^ ")")
let maintainer = "jahier@imag.fr"
(** Time-stamp: <modified the 17/07/2017 (at 17:02) by Erwan Jahier> *)
(** Time-stamp: <modified the 18/07/2017 (at 11:01) by Erwan Jahier> *)
(** topological sort of actions (that may optimize test openning) *)
......@@ -112,8 +112,8 @@ let (f : Action.t list -> ActionsDeps.t -> Lxm.t -> Soc.gao list) =
let _,names = List.split l in
let dep = String.concat ">" names in
let msg = "A combinational cycle been detected "^
(Lxm.details lxm)^" on \n "^(Action.to_string x)^ "\n "^ dep ^
">a0\n where \n\t'>' means 'should be done after'\n\t" ^ legend ^
(Lxm.details lxm)^": "^ dep ^
">a0 where \n\t'>' means 'should be done after'\n\t" ^ legend ^
"\n\nHint: \n\t- try to use --expand-nodes or --expand-node-call; sometimes it works. \n\t- -knc migth ease to see where the cycle is.\n\t- -dbg deps will dump more (too much?) information\n"
(* ^ (ActionsDeps.to_string deps) ^ "\n" *)
in
......
==> lus2lic0.sum <==
Test Run By jahier on Mon Jul 17 17:05:43
Test Run By jahier on Tue Jul 18 11:26:32
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic0 tests ===
......@@ -66,7 +66,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
==> lus2lic1.sum <==
Test Run By jahier on Mon Jul 17 17:05:44
Test Run By jahier on Tue Jul 18 11:26:33
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic1 tests ===
......@@ -245,7 +245,9 @@ PASS: ./lus2lic {-2c deconne.lus -n deconne}
PASS: ./lus2lic {-2c dep.lus -n dep}
PASS: sh dep.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c dep.lus {}
FAIL: Generate c code : ./lus2lic {-2c depend.lus -n depend}
PASS: ./lus2lic {-2c depend.lus -n depend}
PASS: sh depend.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c depend.lus {}
PASS: ./lus2lic {-2c dependeur.lus -n dependeur}
PASS: sh dependeur.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c dependeur.lus {}
......@@ -273,7 +275,9 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c exclusion.lus {}
PASS: ./lus2lic {-2c filliter.lus -n filliter}
PASS: sh filliter.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c filliter.lus {}
FAIL: Generate c code : ./lus2lic {-2c filter.lus -n filter}
PASS: ./lus2lic {-2c filter.lus -n filter}
PASS: sh filter.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c filter.lus {}
PASS: ./lus2lic {-2c flo.lus -n flo}
PASS: sh flo.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c flo.lus {}
......@@ -408,7 +412,7 @@ PASS: sh multipar.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus {}
==> lus2lic2.sum <==
Test Run By jahier on Mon Jul 17 17:06:38
Test Run By jahier on Tue Jul 18 11:27:29
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic2 tests ===
......@@ -747,7 +751,7 @@ PASS: ./lus2lic {-2c zzz2.lus -n zzz2}
PASS: sh zzz2.sh
==> lus2lic3.sum <==
Test Run By jahier on Mon Jul 17 17:07:52
Test Run By jahier on Tue Jul 18 11:28:29
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic3 tests ===
......@@ -915,7 +919,7 @@ PASS: ./myec2c {-o carV2.c carV2.ec}
PASS: ./lus2lic {-o carligths.lic carligths.lus}
PASS: ./lus2lic {-ec -o carligths.ec carligths.lus}
PASS: ./myec2c {-o carligths.c carligths.ec}
UNRESOLVED: Time out: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node carligths.lus {}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node carligths.lus {}
PASS: ./lus2lic {-o ck2.lic ck2.lus}
PASS: ./lus2lic {-ec -o ck2.ec ck2.lus}
PASS: ./myec2c {-o ck2.c ck2.ec}
......@@ -1011,7 +1015,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node dep.lus {}
PASS: ./lus2lic {-o depend.lic depend.lus}
PASS: ./lus2lic {-ec -o depend.ec depend.lus}
PASS: ./myec2c {-o depend.c depend.ec}
FAIL: Try to compare lus2lic -exec and ecexe: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node depend.lus {}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node depend.lus {}
PASS: ./lus2lic {-o dependeur.lic dependeur.lus}
PASS: ./lus2lic {-ec -o dependeur.ec dependeur.lus}
PASS: ./myec2c {-o dependeur.c dependeur.ec}
......@@ -1050,7 +1054,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node filliter.lus {}
PASS: ./lus2lic {-o filter.lic filter.lus}
PASS: ./lus2lic {-ec -o filter.ec filter.lus}
PASS: ./myec2c {-o filter.c filter.ec}
FAIL: Try to compare lus2lic -exec and ecexe: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node filter.lus {}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node filter.lus {}
PASS: ./lus2lic {-o flo.lic flo.lus}
PASS: ./lus2lic {-ec -o flo.ec flo.lus}
PASS: ./myec2c {-o flo.c flo.ec}
......@@ -1261,7 +1265,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <==
Test Run By jahier on Mon Jul 17 17:10:40
Test Run By jahier on Tue Jul 18 11:30:43
Native configuration is x86_64-unknown-linux-gnu
=== lus2lic4 tests ===
......@@ -1753,11 +1757,11 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
=== lus2lic1 Summary ===
# of expected passes 327
# of unexpected failures 3
# of expected passes 333
# of unexpected failures 1
==> lus2lic2.sum <==
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus 35197 {}
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus 39953 {}
=== lus2lic2 Summary ===
......@@ -1766,9 +1770,9 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus 35197 {}
==> lus2lic3.sum <==
=== lus2lic3 Summary ===
# of expected passes 488
# of unexpected failures 9
# of unresolved testcases 4
# of expected passes 491
# of unexpected failures 7
# of unresolved testcases 3
==> lus2lic4.sum <==
......@@ -1777,15 +1781,15 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus 35197 {}
# of expected passes 465
# of unexpected failures 6
===============================
# Total number of failures: 18
# Total number of failures: 14
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 1 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 54 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 74 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 168 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 67 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 56 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 60 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 134 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 51 seconds
* Ref time:
0.05user 0.02system 6:03.98elapsed 0%CPU (0avgtext+0avgdata 5676maxresident)k
160inputs+0outputs (0major+6200minor)pagefaults 0swaps
0.06user 0.02system 5:01.49elapsed 0%CPU (0avgtext+0avgdata 5636maxresident)k
96inputs+0outputs (0major+6198minor)pagefaults 0swaps
* Quick time (-j 4):
0.06user 0.01system 2:50.47elapsed 0%CPU (0avgtext+0avgdata 5700maxresident)k
96inputs+0outputs (0major+6210minor)pagefaults 0swaps
0.06user 0.01system 2:48.11elapsed 0%CPU (0avgtext+0avgdata 5600maxresident)k
128inputs+0outputs (0major+6203minor)pagefaults 0swaps
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment