Ignore:
Timestamp:
Nov 1, 2011, 6:31:24 PM (9 years ago)
Author:
tranquil
Message:
  • corrected a bug
  • implemented copy propagation
  • enhanced constant propagation with some algebraic equalities
  • temporarily added immediates to RTLabs, to be seen if it is useful
File:
1 edited

Legend:

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

    r1421 r1477  
    194194      let (rtlabs_fun, r2) = choose_destination rtlabs_fun lenv e2 in
    195195      let old_entry = rtlabs_fun.RTLabs.f_entry in
    196       let stmt = RTLabs.St_op2 (op2, destr, r1, r2, old_entry) in
     196                        let r1_arg = RTLabs.Reg r1 in
     197                        let r2_arg = RTLabs.Reg r2 in
     198      let stmt = RTLabs.St_op2 (op2, destr, r1_arg, r2_arg, old_entry) in
    197199      let rtlabs_fun = generate rtlabs_fun stmt in
    198200      translate_exprs rtlabs_fun lenv [r1 ; r2] [e1 ; e2]
     
    201203      let (rtlabs_fun, r) = choose_destination rtlabs_fun lenv e in
    202204      let old_entry = rtlabs_fun.RTLabs.f_entry in
    203       let stmt = RTLabs.St_load (chunk, r, destr, old_entry) in
     205      let stmt =
     206                                RTLabs.St_load (chunk, RTLabs.Reg r, destr, old_entry) in
    204207      let rtlabs_fun = generate rtlabs_fun stmt in
    205208      translate_expr rtlabs_fun lenv r e
     
    283286      let (rtlabs_fun, r) = choose_destination rtlabs_fun lenv e2 in
    284287      let old_entry = rtlabs_fun.RTLabs.f_entry in
    285       let stmt = RTLabs.St_store (chunk, addr, r, old_entry) in
     288      let stmt =
     289                                RTLabs.St_store (chunk, RTLabs.Reg addr, RTLabs.Reg r, old_entry) in
    286290      let rtlabs_fun = generate rtlabs_fun stmt in
    287291      translate_exprs rtlabs_fun lenv [addr ; r] [e1 ; e2]
Note: See TracChangeset for help on using the changeset viewer.