Changeset 2890 for extracted/untrusted


Ignore:
Timestamp:
Mar 15, 2013, 11:11:45 PM (7 years ago)
Author:
sacerdot
Message:

Exported again, now the execution is correct up to LIN for a simple program.

Location:
extracted/untrusted
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extracted/untrusted/build.ml

    r2773 r2890  
    2727    Identifiers.foldi PreIdentifiers.LabelTag (fun label stmt graph ->
    2828      let live = liveafter label in
    29       match Glue.option_of_matitaoption (Liveness.eliminable globals live stmt) with
    30 
    31       | Some _ ->
     29      if Liveness.eliminable globals live stmt = Bool.True then
    3230
    3331          (* This statement is eliminable and should be ignored. Eliminable
     
    3937          graph
    4038
    41       | None ->
     39      else
    4240
    4341          (* Create interference edges. The general rule is, every
  • extracted/untrusted/compute_colouring.ml

    r2884 r2890  
    44  (* Build an interference graph for this function, and color
    55     it. Define a function that allows consulting the coloring. *)
    6 
    7 let liveafter n =
    8 let {Types.fst = setreg;
    9      Types.snd = setReg} = Obj.magic (liveafter n) in
    10 let res =
    11  Pset.fold (fun reg acc -> "r_" ^ string_of_int (Glue.int_of_matitapos reg) ^ "," ^ acc)
    12   setreg "" in
    13 prerr_endline ("LINE " ^ string_of_int (Glue.int_of_matitapos n) ^ ": " ^ res);
    14 liveafter n in
    156
    167  let uses = Uses.examine_internal globals int_fun in
     
    5950  (* Define a new function that consults both colorings at once. *)
    6051
    61 let print_Register =
    62  function
    63   | I8051.Register00     -> "Register00"
    64   | I8051.Register01     -> "Register01"
    65   | I8051.Register02     -> "Register02"
    66   | I8051.Register03     -> "Register03"
    67   | I8051.Register04     -> "Register04"
    68   | I8051.Register05     -> "Register05"
    69   | I8051.Register06     -> "Register06"
    70   | I8051.Register07     -> "Register07"
    71   | I8051.Register10     -> "Register10"
    72   | I8051.Register11     -> "Register11"
    73   | I8051.Register12     -> "Register12"
    74   | I8051.Register13     -> "Register13"
    75   | I8051.Register14     -> "Register14"
    76   | I8051.Register15     -> "Register15"
    77   | I8051.Register16     -> "Register16"
    78   | I8051.Register17     -> "Register17"
    79   | I8051.Register20     -> "Register20"
    80   | I8051.Register21     -> "Register21"
    81   | I8051.Register22     -> "Register22"
    82   | I8051.Register23     -> "Register23"
    83   | I8051.Register24     -> "Register24"
    84   | I8051.Register25     -> "Register25"
    85   | I8051.Register26     -> "Register26"
    86   | I8051.Register27     -> "Register27"
    87   | I8051.Register30     -> "Register30"
    88   | I8051.Register31     -> "Register31"
    89   | I8051.Register32     -> "Register32"
    90   | I8051.Register33     -> "Register33"
    91   | I8051.Register34     -> "Register34"
    92   | I8051.Register35     -> "Register35"
    93   | I8051.Register36     -> "Register36"
    94   | I8051.Register37     -> "Register37"
    95   | I8051.RegisterA      -> "RegisterA"
    96   | I8051.RegisterB      -> "RegisterB"
    97   | I8051.RegisterDPL    -> "RegisterDPL"
    98   | I8051.RegisterDPH    -> "RegisterDPH"
    99   | I8051.RegisterCarry  -> "RegisterCarry"
    100 in
    101 
    102 
    10352  let lookup r =
    10453   match r with
     
    10857           Interference.Decision_spill (Glue.matitanat_of_int (Untrusted_interference.Vertex.Map.find (Untrusted_interference.lookup H.graph r) S.coloring))
    10958       | Coloring.Color color ->
    110 prerr_endline ("SPILLED r_" ^ string_of_int (Glue.int_of_matitapos r) ^ " = " ^ print_Register color);
    11159           Interference.Decision_colour color)
    11260    | Types.Inr r -> Interference.Decision_colour r
Note: See TracChangeset for help on using the changeset viewer.