Skip to content

Commit

Permalink
Remove redundant intersection when side-effecting
Browse files Browse the repository at this point in the history
  • Loading branch information
mrstanb committed Aug 28, 2023
1 parent 5464636 commit 049dc58
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/analyses/useAfterFree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,7 @@ struct
let side_effect_mem_free ctx freed_heap_vars threadid joined_threads =
let side_effect_globals_to_heap_var heap_var =
let current_globals = ctx.global heap_var in
let joined_threads_to_add = match G.find_opt threadid current_globals with
| Some threads -> ConcDomain.ThreadSet.inter joined_threads threads
| None -> joined_threads
in
let globals_to_side_effect = G.add threadid joined_threads_to_add current_globals in
let globals_to_side_effect = G.add threadid joined_threads current_globals in
ctx.sideg heap_var globals_to_side_effect
in
D.iter side_effect_globals_to_heap_var freed_heap_vars
Expand Down

0 comments on commit 049dc58

Please sign in to comment.