Changeset 2759 for driver/compiler.ml


Ignore:
Timestamp:
Mar 1, 2013, 7:56:34 PM (8 years ago)
Author:
campbell
Message:

Print out costs, with choice of style.
Note small anti-assertion patch to extracted ASMCosts.
No stack space yet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/compiler.ml

    r2758 r2759  
    11open Extracted.Errors
     2open ClightPrinter
    23
    34let rec run g s =
     
    2526let OK {Extracted.Types.fst = oc; snd = acl} = Extracted.Compiler.compile cl in
    2627let {Extracted.Types.dpi1 = labelled; Extracted.Types.dpi2 = l_costmap} = acl in
    27 print_endline (ClightPrinter.print_program labelled)
     28let style =
     29  match try Sys.argv.(2) with _ -> "instrumented" with
     30  | "plain" -> Cost_plain
     31  | "numbered" -> Cost_numbered l_costmap
     32  | "instrumented" -> Cost_instrumented l_costmap
     33  | x -> failwith ("I have no idea what " ^ x ^ " means")
     34in
     35print_endline (ClightPrinter.print_program style labelled)
    2836(*
    2937let OK mid = Extracted.Compiler.front_end cl in
Note: See TracChangeset for help on using the changeset viewer.