Project

General

Profile

Revision b3b0dd56 src/main_lustre_compiler.ml

View differences:

src/main_lustre_compiler.ml
211 211
    - eliminate trivial expressions
212 212
 *)
213 213
  let prog =
214
    if !Options.optimization >= 4 then
214
    if !Options.optimization >= 5 then
215 215
      begin
216 216
	Log.report ~level:1 (fun fmt -> fprintf fmt ".. constants elimination@,");
217 217
	Optimize_prog.prog_unfold_consts prog
......
225 225

  
226 226
  (* Optimize machine code *)
227 227
  let machine_code =
228
    if !Options.optimization >= 4 && !Options.output <> "horn" then
229
      begin
230
	Log.report ~level:1 (fun fmt -> fprintf fmt ".. machines optimization (phase 3)@,");
231
	Optimize_machine.machines_cse machine_code
232
      end
233
    else
234
      machine_code
235
  in
236

  
237
  Log.report ~level:1 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
238
  (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
239
  machine_code);
240

  
241
  (* Optimize machine code *)
242
  let machine_code =
228 243
    if !Options.optimization >= 2 && !Options.output <> "horn" then
229 244
      begin
230 245
	Log.report ~level:1 (fun fmt -> fprintf fmt ".. machines optimization (phase 1)@,");
......
243 258
    else
244 259
      machine_code
245 260
  in
261

  
246 262
  Log.report ~level:3 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
247 263
  (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
248 264
  machine_code);

Also available in: Unified diff