Skip to content
Snippets Groups Projects
Commit dd0d6641 authored by Valentin Perrelle's avatar Valentin Perrelle Committed by David Bühler
Browse files

[Inout] Use the new Eva API

parent f1d6d9c8
No related branches found
No related tags found
No related merge requests found
......@@ -86,7 +86,7 @@ module Externals =
let get_external =
Externals.memo
(fun kf ->
!Db.Value.compute ();
Eva.Analysis.compute ();
if Kernel_function.is_definition kf then
try
externalize
......
......@@ -807,7 +807,7 @@ end
let get_internal =
Internals.memo
(fun kf ->
!Db.Value.compute ();
Eva.Analysis.compute ();
try Internals.find kf (* The results may have been computed by the call
to Value.compute *)
with
......
......@@ -48,12 +48,11 @@ class virtual do_it_ = object(self)
(* For local initializations, counts the written variable as an output of the
function, even if it is const; thus, [for_writing] is false in this case. *)
method private do_assign ~for_writing lv =
let state = Db.Value.get_state self#current_kinstr in
let _deps, bits_loc, _exact =
!Db.Value.lval_to_zone_with_deps_state state
~deps:None ~for_writing lv
in
self#join bits_loc
let access = if for_writing then Write else Read in
let bits_loc = Eva.Results.(
before_kinstr self#current_kinstr |> eval_address lv |>
as_zone ~access) in
Result.iter self#join bits_loc
method! vinst i =
if Db.Value.is_reachable (Db.Value.noassert_get_state self#current_kinstr)
......
......@@ -49,7 +49,7 @@ let main () =
Inout_parameters.Output.get () && ShouldOutput.get ()
then begin
ShouldOutput.set false;
!Db.Value.compute ();
Eva.Analysis.compute ();
Callgraph.Uses.iter_in_rev_order
(fun kf ->
if Kernel_function.is_definition kf && !Db.Value.is_called kf
......
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