Skip to content

Commit

Permalink
removed zrapp asm; revert if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Tietz committed Feb 7, 2024
1 parent 39a4d1b commit 2030d40
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 47 deletions.
8 changes: 0 additions & 8 deletions src/ext/zrapp/availexps.ml
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,6 @@ let eh_handle_inst i eh =
(eh_kill_mem eh;
eh_kill_addrof_or_global eh;
eh)
(* todo: didn't find location where stmts are handled *)
(*
| Asm(_,_,_,_,_,_) ->
let _,d = UD.computeUseDefInstr i in
(UD.VS.iter (fun vi ->
eh_kill_vi eh vi) d;
eh)
*)
| VarDecl _ -> raise (Unimplemented "VarDecl") (* VarDecl instruction is not supported for availexps, to make availexps work for programs without VLA *)
(* make sure to set alwaysGenerateVarDecl in cabs2cil.ml to false. To support VLA, implement this. *)

Expand Down
9 changes: 0 additions & 9 deletions src/ext/zrapp/availexpslv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -305,15 +305,6 @@ let lvh_handle_inst i lvh =
end;
lvh
end
(* todo *)
(*
| Asm(_,_,_,_,_,_) -> begin
let _,d = UD.computeUseDefInstr i in
UD.VS.iter (fun vi ->
lvh_kill_vi lvh vi) d;
lvh
end
*)
| VarDecl _ -> raise (Unimplemented "VarDecl") (* VarDecl instruction is not supported for availexpslv, to make availexpslv work for programs without VLA *)
(* make sure to set alwaysGenerateVarDecl in cabs2cil.ml to false. To support VLA, implement this. *)

Expand Down
8 changes: 0 additions & 8 deletions src/ext/zrapp/deadcodeelim.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,6 @@ class usedDefsCollectorClass = object(self)

method! vinst i =
let handle_inst iosh i = match i with
(* todo *)
(*
| Asm(_,_,slvl,_,_,_) -> List.iter (fun (_,s,lv) ->
match lv with (Var v, off) ->
if s.[0] = '+' then
self#add_defids iosh (Lval(Var v, off)) (UD.VS.singleton v)
| _ -> ()) slvl
*)
| Call(_,ce,el,_,_) when not (!callHasNoSideEffects i) ->
List.iter (fun e ->
let u = UD.computeUseExp e in
Expand Down
9 changes: 0 additions & 9 deletions src/ext/zrapp/reachingdefs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,6 @@ let getDefRhs didstmh stmdat defId =
Set((Var vi',NoOffset),_,_,_) -> vi'.vid = vid (* _ -> NoOffset *)
| Call(Some(Var vi',NoOffset),_,_,_,_) -> vi'.vid = vid (* _ -> NoOffset *)
| Call(None,_,_,_,_) -> false
(* todo *)
(*
| Asm(_,_,sll,_,_,_) -> List.exists
(function (_,_,(Var vi',NoOffset)) -> vi'.vid = vid | _ -> false) sll
*)
| _ -> false)
| None -> false) iihl in
(match i with
Expand All @@ -287,10 +282,6 @@ let getDefRhs didstmh stmdat defId =
| Call(lvo,e,el,_,_) ->
(IH.add rhsHtbl defId (Some(RDCall(i),stm.sid,iosh_in));
Some(RDCall(i), stm.sid, iosh_in))
(* todo *)
(*
| Asm(a,sl,slvl,sel,sl',_) -> None
*)
| VarDecl _ -> None
) (* ? *)
with Not_found ->
Expand Down
13 changes: 0 additions & 13 deletions src/ext/zrapp/rmciltmps.ml
Original file line number Diff line number Diff line change
Expand Up @@ -994,19 +994,6 @@ class unusedRemoverClass : cilVisitor = object(self)
(match IH.find iioh vi.vid with
None -> true | Some _ -> false)
end
(* todo *)
(*
| Asm(_,_,slvlst,_,_,_) -> begin
(* make sure the outputs are in the locals list *)
List.iter (fun (_,s,lv) ->
match lv with (Var vi,_) ->
if List.mem vi cur_func.slocals
then ()
else cur_func.slocals <- vi::cur_func.slocals
|_ -> ()) slvlst;
true
end
*)
| _ -> true
in

Expand Down

0 comments on commit 2030d40

Please sign in to comment.