method vexpr e =
let do_change iosh vi =
let ido = RD.iosh_singleton_lookup iosh vi in
(match ido with
Some id ->
let riviho = getDefRhs id in
(match riviho with
Some(RD.RDExp _e as r, _, defiosh) ->
(match ok_to_replace_with_incdec iosh defiosh fd id vi r with
Some(curdef_stmt_id,redefid, rhsvi, b) ->
(if !debug then (Cilmsg.debug "No, but I can replace it with a post-inc/dec");
if !debug then (Cilmsg.debug "cdsi: %d redefid: %d name: %s"
curdef_stmt_id redefid
rhsvi.vname);
IH.add incdecHash vi.vid (redefid, rhsvi, b);
id_dh_add rhsvi.vid (curdef_stmt_id, redefid);
DoChildren)
| None ->
(if !debug then (Cilmsg.debug "No.");
DoChildren))
| _ -> DoChildren)
| _ -> DoChildren)
in
match e.enode with
Lval (Var vi,NoOffset) ->
(if check_forms vi.vname forms then
(match cur_rd_dat with
Some(_,_s,iosh) -> do_change iosh vi
| None -> let iviho = RD.getRDs sid in
match iviho with
Some(_,_s,iosh) ->
(if !debug then (Cilmsg.debug "Try to change %s outside of instruction." vi.vname);
do_change iosh vi)
| None ->
(if !debug then (Cilmsg.debug "%s in statement w/o RD info" vi.vname);
DoChildren))
else DoChildren)
| _ -> DoChildren