Changeset 2884


Ignore:
Timestamp:
Mar 15, 2013, 6:37:14 PM (4 years ago)
Author:
sacerdot
Message:

Debugging print added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extracted/untrusted/compute_colouring.ml

    r2742 r2884  
    44  (* Build an interference graph for this function, and color
    55     it. Define a function that allows consulting the coloring. *)
     6
     7let liveafter n =
     8let {Types.fst = setreg;
     9     Types.snd = setReg} = Obj.magic (liveafter n) in
     10let res =
     11 Pset.fold (fun reg acc -> "r_" ^ string_of_int (Glue.int_of_matitapos reg) ^ "," ^ acc)
     12  setreg "" in
     13prerr_endline ("LINE " ^ string_of_int (Glue.int_of_matitapos n) ^ ": " ^ res);
     14liveafter n in
    615
    716  let uses = Uses.examine_internal globals int_fun in
     
    5059  (* Define a new function that consults both colorings at once. *)
    5160
     61let 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"
     100in
     101
     102
    52103  let lookup r =
    53104   match r with
     
    57108           Interference.Decision_spill (Glue.matitanat_of_int (Untrusted_interference.Vertex.Map.find (Untrusted_interference.lookup H.graph r) S.coloring))
    58109       | Coloring.Color color ->
     110prerr_endline ("SPILLED r_" ^ string_of_int (Glue.int_of_matitapos r) ^ " = " ^ print_Register color);
    59111           Interference.Decision_colour color)
    60112    | Types.Inr r -> Interference.Decision_colour r
Note: See TracChangeset for help on using the changeset viewer.