Ignore:
Timestamp:
Oct 7, 2011, 1:48:26 PM (9 years ago)
Author:
tranquil
Message:

indexing branch is compiling again:

  • clight interpreter updated
  • clight labeller yet to be completed with single-entry loop detection
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051-indexed-labels-branch/src/clight/clightUtils.ml

    r486 r1319  
    22open Clight
    33
    4 
     4(*
    55(* TODO: Alignment constraints? *)
    66let rec size_of_ctype = function
     
    7272  | Tpointer (sp,_) | Tarray (sp,_,_) | Tcomp_ptr (sp,_) -> sp
    7373  | _ -> assert false (* do not use on those arguments *)
     74*)
     75
     76let max_loop_index_lbld =
     77    let f_expr _ _ = () in
     78  let f_stmt stmt _ sub_stmts_res =
     79        let curr_max = List.fold_left max 0 sub_stmts_res in
     80        match stmt with
     81          | Clight.Swhile (Some x, _, _) | Clight.Sdowhile (Some x, _, _)
     82          | Clight.Sfor (Some x, _, _, _, _) -> max x curr_max (* = curr_max+1 ? *)
     83            | _ -> curr_max in
     84  ClightFold.statement2 f_expr f_stmt
Note: See TracChangeset for help on using the changeset viewer.