Skip to content

Commit

Permalink
Avoid MustJoinedThreads query in ThreadDigest if not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Nov 30, 2023
1 parent 6dfc08f commit 05198f9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/analyses/commonPriv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,13 @@ struct
ThreadId.get_current ask

let compatible (ask: Q.ask) (current: t) (other: t) =
let must_joined = ask.f Queries.MustJoinedThreads in
match current, other with
| `Lifted current, `Lifted other ->
if (TID.is_unique current) && (TID.equal current other) then
if TID.is_unique current && TID.equal current other then
false (* self-read *)
else if GobConfig.get_bool "ana.relation.priv.not-started" && MHP.definitely_not_started (current, ask.f Q.CreatedThreads) other then
false (* other is not started yet *)
else if GobConfig.get_bool "ana.relation.priv.must-joined" && MHP.must_be_joined other must_joined then
else if GobConfig.get_bool "ana.relation.priv.must-joined" && MHP.must_be_joined other (ask.f Queries.MustJoinedThreads) then
false (* accounted for in local information *)
else
true
Expand Down

0 comments on commit 05198f9

Please sign in to comment.