Ignore:
Timestamp:
Dec 2, 2011, 7:49:19 PM (8 years ago)
Author:
tranquil
Message:

fighting with a bug of the translation from RTL to ERTL

Location:
Deliverables/D2.2/8051/src/ERTL
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/ERTL/ERTLPrinter.mli

    r486 r1585  
    22(** This module provides a function to print [ERTL] programs.  *)
    33
     4val print_statement : ERTL.statement -> string
     5
    46val print_program : ERTL.program -> string
  • Deliverables/D2.2/8051/src/ERTL/ERTLToLTL.ml

    r1272 r1585  
    104104        match Liveness.eliminable (G.liveafter label) stmt with
    105105        | Some successor ->
    106             LTL.St_skip successor
     106          Printf.printf "dead %s!\n%!" (ERTLPrinter.print_statement stmt);
     107          LTL.St_skip successor
    107108        | None ->
    108109            I.translate_statement stmt
  • Deliverables/D2.2/8051/src/ERTL/liveness.ml

    r1580 r1585  
    207207
    208208let eliminable ((pliveafter, hliveafter) : L.t) (stmt : statement) =
     209  let res =
    209210  match stmt with
    210211  | St_skip _
     
    240241  | St_set_hdw (r, _, l)
    241242  | St_hdw_to_hdw (r, _, l) ->
    242     if I8051.RegisterSet.mem r hliveafter then None else Some l
     243    if I8051.RegisterSet.mem r hliveafter then None else Some l in
     244  Printf.printf "%s %sfound eliminable\n"
     245    (ERTLPrinter.print_statement stmt)
     246    (match res with
     247      | Some _ -> ""
     248      | _ -> "not "); res
    243249
    244250(* This is the abstract semantics of instructions. It defines the
Note: See TracChangeset for help on using the changeset viewer.