Project

General

Profile

Revision b3f91fdb src/main_lustre_compiler.ml

View differences:

src/main_lustre_compiler.ml
123 123
      exit 0
124 124
    end;
125 125

  
126
  (* Perform global inlining *)
127
  let prog =
128
    if !Options.global_inline &&
129
      (match !Options.main_node with | "" -> false | _ -> true) then
130
      Inliner.global_inline basename prog type_env clock_env
131
    else (* if !Option.has_local_inline *)
132
      Inliner.local_inline basename prog type_env clock_env
133
  in
134

  
135 126
  (* Delay calculus *)
136 127
  (* TO BE DONE LATER (Xavier)
137 128
    if(!Options.delay_calculus)
......
159 150
  Typing.uneval_prog_generics prog;
160 151
  Clock_calculus.uneval_prog_generics prog;
161 152

  
153
  (* Perform global inlining *)
154
  let prog =
155
    if !Options.global_inline &&
156
      (match !Options.main_node with | "" -> false | _ -> true) then
157
      Inliner.global_inline basename prog type_env clock_env
158
    else (* if !Option.has_local_inline *)
159
      Inliner.local_inline basename prog type_env clock_env
160
  in
161
(*Format.eprintf "Inliner.global_inline<<@.%a@.>>@." Printers.pp_prog prog;*)
162 162
  (* Computes and stores generic calls for each node,
163 163
     only useful for ANSI C90 compliant generic node compilation *)
164 164
  if !Options.ansi then Causality.NodeDep.compute_generic_calls prog;
......
170 170
  if !Options.output = "lustre" then
171 171
    Normalization.unfold_arrow_active := false;
172 172
  let prog = Normalization.normalize_prog prog in
173

  
173 174
  Log.report ~level:2 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@," Printers.pp_prog prog);
174 175
  (* Checking array accesses *)
175 176
  if !Options.check then

Also available in: Unified diff