File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -692,7 +692,30 @@ module Make(C:Config) (S:Sem.Semantics) : S with module S = S =
692692 (fun e k ->
693693 match SM. can_unset_af_loc e with
694694 | None -> k
695- | Some loc -> loc::k)
695+ | Some loc ->
696+ let v = Misc. as_some @@ E. written_of e in
697+ Printf. eprintf
698+ " loc=%s,v=%s\n %!" (V. pp_v loc) (V. pp_v v) ;
699+ let write_loaded =
700+ try
701+ E. is_atomic e
702+ && (match v with V. Var _ -> true | V. Val _ -> false )
703+ && E.EventSet. exists
704+ (fun er ->
705+ E. po_eq e er && E. is_mem_load er &&
706+ begin
707+ match
708+ E. global_loc_of er,
709+ E. read_of er
710+ with
711+ | Some loc_r,Some v_r
712+ ->
713+ V. equal loc loc_r && V. equal v v_r
714+ | _ ,_ -> false
715+ end )
716+ es.E. events
717+ with Not_found -> false in
718+ if write_loaded then k else loc::k)
696719 es.E. events []
697720 |> Misc. group V. compare in
698721 let om =
You can’t perform that action at this time.
0 commit comments