Skip to content
Snippets Groups Projects
Commit e6c234b9 authored by David Bühler's avatar David Bühler
Browse files

[Scope] Minor simplifications.

parent 32566403
No related branches found
No related tags found
No related merge requests found
...@@ -85,9 +85,6 @@ let get_writes stmt lval = ...@@ -85,9 +85,6 @@ let get_writes stmt lval =
before stmt |> eval_address lval |> as_zone ~access:Write |> before stmt |> eval_address lval |> as_zone ~access:Write |>
default Locations.Zone.bottom) default Locations.Zone.bottom)
let get_reads stmt lval =
Eva.Results.(before stmt |> lval_deps lval)
(** Add to [stmt] to [lmap] for all the locations modified by the statement. (** Add to [stmt] to [lmap] for all the locations modified by the statement.
* Something to do only for calls and assignments. * Something to do only for calls and assignments.
* *) * *)
...@@ -410,7 +407,7 @@ let is_modified_by_edge kf z s1 s2 = ...@@ -410,7 +407,7 @@ let is_modified_by_edge kf z s1 s2 =
* @raise Kernel_function.No_Definition if [kf] has no definition * @raise Kernel_function.No_Definition if [kf] has no definition
*) *)
let get_data_scope_at_stmt kf stmt lval = let get_data_scope_at_stmt kf stmt lval =
let zone = get_reads stmt lval in let zone = Eva.Results.(before stmt |> lval_deps lval) in
let allstmts, info = compute kf in let allstmts, info = compute kf in
let modif_stmts = InitSid.find info zone in let modif_stmts = InitSid.find info zone in
let modifs_edge = is_modified_by_edge kf zone in let modifs_edge = is_modified_by_edge kf zone in
......
...@@ -154,8 +154,7 @@ let process_one_call data stmt lvaloption froms = ...@@ -154,8 +154,7 @@ let process_one_call data stmt lvaloption froms =
let process_call data_after stmt lvaloption funcexp args _loc = let process_call data_after stmt lvaloption funcexp args _loc =
let funcexp_dpds = Eva.Results.(before stmt |> expr_deps funcexp) let funcexp_dpds = Eva.Results.(before stmt |> expr_deps funcexp)
and called_functions = and called_functions =
Eva.Results.(before stmt |> eval_callee funcexp) |> Eva.Results.(before stmt |> eval_callee funcexp |> default [])
Result.value ~default:[]
in in
let used, data = let used, data =
try try
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment