diff options
| author | Son Ho | 2022-01-28 19:05:58 +0100 | 
|---|---|---|
| committer | Son Ho | 2022-01-28 19:05:58 +0100 | 
| commit | 02d11078706d4384d1fa2dcbf55235e725b2b181 (patch) | |
| tree | 9dfbf43a59e8fa019e3cab2dde81dcedf5e49bd0 /src/PureMicroPasses.ml | |
| parent | f01cae026d6ec4c9d2a0eec4719f1819e414a5b8 (diff) | |
Make minor modifications
Diffstat (limited to 'src/PureMicroPasses.ml')
| -rw-r--r-- | src/PureMicroPasses.ml | 15 | 
1 files changed, 3 insertions, 12 deletions
| diff --git a/src/PureMicroPasses.ml b/src/PureMicroPasses.ml index 85d5585b..6b9b7425 100644 --- a/src/PureMicroPasses.ml +++ b/src/PureMicroPasses.ml @@ -336,17 +336,6 @@ let inline_useless_var_reassignments (inline_named : bool) (def : fun_def) :    let body = obj#visit_expression VarId.Map.empty def.body in    { def with body } -(* TODO: move *) -let lookup_fun_sig (fun_id : A.fun_id) (fun_defs : A.fun_def FunDefId.Map.t) : -    A.fun_sig = -  match fun_id with -  | Local id -> (FunDefId.Map.find id fun_defs).signature -  | Assumed aid -> -      let _, sg = -        List.find (fun (aid', _) -> aid = aid') Assumed.assumed_sigs -      in -      sg -  (** Given a forward or backward function call, is there, for every execution      path, a child backward function called later with exactly the same input      list prefix? We use this to filter useless function calls: if there are @@ -395,7 +384,9 @@ let expression_contains_child_call_in_all_paths (ctx : trans_ctx) (call0 : call)                  else                    (* We need to use the regions hierarchy *)                    (* First, lookup the signature of the CFIM function *) -                  let sg = lookup_fun_sig id0 ctx.fun_context.fun_defs in +                  let sg = +                    CfimAstUtils.lookup_fun_sig id0 ctx.fun_context.fun_defs +                  in                    (* Compute the set of ancestors of the function in call1 *)                    let call1_ancestors =                      CfimAstUtils.list_parent_region_groups sg rg_id1 | 
