Revision 45f0f48d src/optimize_machine.ml
src/optimize_machine.ml  

31  31 
 MLocalAssign (i,v) > MLocalAssign (i, e_expr v) 
32  32 
 MStateAssign (i,v) > MStateAssign (i, e_expr v) 
33  33 
 MReset i > instr 
34 
 MNoReset i > instr 

34  35 
 MStep (il, i, vl) > MStep(il, i, List.map e_expr vl) 
35  36 
 MBranch (g,hl) > 
36  37 
MBranch 
...  ...  
51  52 
 Cst _  StateVar _ > expr 
52  53  
53  54 
let eliminate_dim elim dim = 
54 
Dimension.expr_replace_expr (fun v > try dimension_of_value (IMap.find v elim) with Not_found > mkdim_ident dim.dim_loc v) dim 

55 
Dimension.expr_replace_expr 

56 
(fun v > try 

57 
dimension_of_value (IMap.find v elim) 

58 
with Not_found > mkdim_ident dim.dim_loc v) 

59 
dim 

55  60  
56  61 
let unfold_expr_offset m offset expr = 
57  62 
List.fold_left 
...  ...  
100  105 
 MLocalAssign (v, expr) > MLocalAssign (v, simplify_expr_offset m expr) 
101  106 
 MStateAssign (v, expr) > MStateAssign (v, simplify_expr_offset m expr) 
102  107 
 MReset id > instr 
108 
 MNoReset id > instr 

103  109 
 MStep (outputs, id, inputs) > MStep (outputs, id, List.map (simplify_expr_offset m) inputs) 
104  110 
 MBranch (cond, brl) 
105  111 
> MBranch(simplify_expr_offset m cond, List.map (fun (l, il) > l, simplify_instrs_offset m il) brl) 
Also available in: Unified diff