Project

General

Profile

« Previous | Next » 

Revision d0b1ec56

Added by Xavier Thirioux over 10 years ago

- changed the basic optimization scheme (option -O 2), which unfolds
local variables and global variables that are either cheap to evaluate
or used no more than once.

git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/trunk@339 041b043f-8d7c-46b2-b46e-ef0dd855326e

View differences:

src/optimize_prog.ml
56 56
	| _       -> decl
57 57
    ) prog 
58 58

  
59
(* Distribution of when inside sub-expressions, i.e. (a+b) when c --> a when c + b when c 
60
   May increase clock disjointness of variables, which is useful for code optimization
61
*)
59 62
let apply_stack expr stack =
60 63
 List.fold_left (fun expr (v, t) -> mkexpr expr.expr_loc (Expr_when (expr, v, t))) expr stack
61 64

  

Also available in: Unified diff