[Cost] Always call substitute to record trace element

Summary:
:
Since traces are attached to symbols, currently it will make no difference.
Calling `subst` on `Top` or on constant is constant-time.

But I need this to record `Call` trace elements for `Top`.

Reviewed By: ezgicicek

Differential Revision: D14249265

fbshipit-source-id: d3aa4ac9e
master
Mehdi Bouaziz 6 years ago committed by Facebook Github Bot
parent c1950e9b9f
commit e3db5720ce

@ -574,10 +574,8 @@ module InstrBasicCost = struct
match get_callee_summary pdesc callee_pname with
| Some ({CostDomain.post= callee_cost_record}, callee_formals) ->
CostDomain.map callee_cost_record ~f:(fun callee_cost ->
if BasicCost.is_symbolic callee_cost then
instantiate_cost integer_type_widths ~inferbo_caller_mem:inferbo_mem
~callee_pname ~callee_formals ~params ~callee_cost ~loc
else callee_cost )
instantiate_cost integer_type_widths ~inferbo_caller_mem:inferbo_mem
~callee_pname ~callee_formals ~params ~callee_cost ~loc )
| None ->
CostDomain.unit_cost_atomic_operation ) ) )
| Sil.Load _ | Sil.Store _ | Sil.Call _ | Sil.Prune _ ->

Loading…
Cancel
Save