From e6c234b97114dad6641557462276a1e70a0dbe1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20B=C3=BChler?= <david.buhler@cea.fr> Date: Thu, 10 Feb 2022 13:47:34 +0100 Subject: [PATCH] [Scope] Minor simplifications. --- src/plugins/scope/datascope.ml | 5 +---- src/plugins/scope/zones.ml | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugins/scope/datascope.ml b/src/plugins/scope/datascope.ml index 3a1617d69c4..b3782a1a193 100644 --- a/src/plugins/scope/datascope.ml +++ b/src/plugins/scope/datascope.ml @@ -85,9 +85,6 @@ let get_writes stmt lval = before stmt |> eval_address lval |> as_zone ~access:Write |> 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. * Something to do only for calls and assignments. * *) @@ -410,7 +407,7 @@ let is_modified_by_edge kf z s1 s2 = * @raise Kernel_function.No_Definition if [kf] has no definition *) 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 modif_stmts = InitSid.find info zone in let modifs_edge = is_modified_by_edge kf zone in diff --git a/src/plugins/scope/zones.ml b/src/plugins/scope/zones.ml index 0b1ecae374a..938b3630758 100644 --- a/src/plugins/scope/zones.ml +++ b/src/plugins/scope/zones.ml @@ -154,8 +154,7 @@ let process_one_call data stmt lvaloption froms = let process_call data_after stmt lvaloption funcexp args _loc = let funcexp_dpds = Eva.Results.(before stmt |> expr_deps funcexp) and called_functions = - Eva.Results.(before stmt |> eval_callee funcexp) |> - Result.value ~default:[] + Eva.Results.(before stmt |> eval_callee funcexp |> default []) in let used, data = try -- GitLab