Commit b6403e90 authored by erwan's avatar erwan
Browse files

fix: do not check loop with lic2soc, as it prevent lustre backends (eg, -v4) to work with -knc

parent 747740a6
(* Time-stamp: <modified the 18/08/2017 (at 11:00) by Erwan Jahier> *)
(* Time-stamp: <modified the 05/05/2022 (at 08:35) by Erwan Jahier> *)
(** Check that there is no dependancy loop between equations.
......@@ -10,9 +10,10 @@ Hence it is necessary to duplicate the work (done in ActionsDeps)
here. Note that in ec mode, structs and arrays have been expanded,
which makes things easier.
XXX : Should I rather use Lic2soc.f to check loops?
Yes. So this module is not used anymore.
Should I rather use Lic2soc.f to check loops?
No, because Lic2soc is only necessary when generating C code,
and when generating C code, one cannot use the -knc option
which is useful for, e.g., -lv4.
*)
exception Error of (Lxm.t * string * LicPrg.t)
......
(* Time-stamp: <modified the 29/08/2019 (at 16:45) by Erwan Jahier> *)
(* Time-stamp: <modified the 04/05/2022 (at 10:58) by Erwan Jahier> *)
open Lxm
open AstV6
......@@ -133,21 +133,13 @@ let no_when_not _opt zelic =
profile_info "Replace 'when not' statements by new variables...\n";
L2lNoWhenNot.doit zelic)
let check_loops _opt zelic main_node =
let check_loops opt zelic _main_node =
profile_info "Check loops...\n";
(* let zelic = if opt.Lv6MainArgs.expand_arrays then zelic else
(* L2lCheckLoops only works if struct and array are expanded *)
L2lExpandArrays.doit zelic
let zelic = if opt.Lv6MainArgs.expand_arrays then zelic else
(* L2lCheckLoops only works if struct and array are expanded *)
L2lExpandArrays.doit zelic
in
L2lCheckLoops.doit zelic *)
(* The dep loop check is done by Lic2soc.f
nb : we need to do this check before removing aliases.
because if there is a loop, the remove alias pass is wrong
*)
match main_node with
| None -> ()
(* LicPrg.iter_nodes (fun n _ -> ignore(Lic2soc.f zelic n)) zelic *)
| Some mn -> ignore(Lic2soc.f zelic (Lic.node_key_of_idref mn))
L2lCheckLoops.doit zelic
let check_decl opt zelic =
profile_info "Check safety and memory declarations...\n";
......
(* Time-stamp: <modified the 23/03/2022 (at 09:42) by Erwan Jahier> *)
(* Time-stamp: <modified the 27/04/2022 (at 17:32) by Erwan Jahier> *)
(* let put (os: out_channel) (fmt:('a, unit, string, unit) format4) : 'a = *)
......@@ -1026,7 +1026,7 @@ typedef float _float;
output_string och ((typedef_all licprg stbl main_soc )
^ "#endif // end of _"^base0^"_TYPES
"
^ (if needs_hfile then "#include \""^ base0 ^"_ext.h\"" else ""));
^ (if needs_hfile then "#include \""^ base0 ^"_ext.h\"\n" else ""));
try
Lv6util.entete occ "/*" "*/" ;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment