[hil] always run liveness analysis before HIL lowering

Reviewed By: jeremydubreil

Differential Revision: D6216276

fbshipit-source-id: 855d6d6
master
Sam Blackshear 7 years ago committed by Facebook Github Bot
parent 183cefdad4
commit e2a75f2b46

@ -95,7 +95,8 @@ struct
module Interpreter = module Interpreter =
AbstractInterpreter.Make (CFG) (Make (MakeTransferFunctions) (DefaultConfig)) AbstractInterpreter.Make (CFG) (Make (MakeTransferFunctions) (DefaultConfig))
let compute_post proc_data ~initial = let compute_post ({ProcData.pdesc; tenv} as proc_data) ~initial =
if not (Procdesc.did_preanalysis pdesc) then Preanal.do_liveness pdesc tenv ;
let initial' = (initial, IdAccessPathMapDomain.empty) in let initial' = (initial, IdAccessPathMapDomain.empty) in
Option.map ~f:fst (Interpreter.compute_post ~debug:false proc_data ~initial:initial') Option.map ~f:fst (Interpreter.compute_post ~debug:false proc_data ~initial:initial')

@ -921,7 +921,6 @@ let analyze_procedure {Callbacks.proc_desc; get_proc_desc; tenv; summary} =
in in
let open RacerDDomain in let open RacerDDomain in
if should_analyze_proc proc_desc tenv then ( if should_analyze_proc proc_desc tenv then (
if not (Procdesc.did_preanalysis proc_desc) then Preanal.do_liveness proc_desc tenv ;
let formal_map = FormalMap.make proc_desc in let formal_map = FormalMap.make proc_desc in
let proc_data = ProcData.make proc_desc tenv get_proc_desc in let proc_data = ProcData.make proc_desc tenv get_proc_desc in
let initial = let initial =

@ -847,9 +847,7 @@ module Make (TaintSpecification : TaintSpec.S) = struct
in in
(access_tree, IdAccessPathMapDomain.empty) (access_tree, IdAccessPathMapDomain.empty)
in in
if not (Procdesc.did_preanalysis proc_desc) then ( Preanal.do_dynamic_dispatch proc_desc (Cg.create (SourceFile.invalid __FILE__)) tenv ;
Preanal.do_liveness proc_desc tenv ;
Preanal.do_dynamic_dispatch proc_desc (Cg.create (SourceFile.invalid __FILE__)) tenv ) ;
let initial = make_initial proc_desc in let initial = make_initial proc_desc in
let extras = let extras =
let formal_map = FormalMap.make proc_desc in let formal_map = FormalMap.make proc_desc in

Loading…
Cancel
Save