61 original_instruction.
swap(instruction);
62 const locationt &location=original_instruction.location;
64 instruction.make_atomic_begin();
65 instruction.location=location;
70 forall_rw_set_entries(e_it, rw_set)
74 shared_buffers(e_it->second.object);
75 irep_idt choice0=shared_buffers.choice(
"0");
76 irep_idt choice1=shared_buffers.choice(
"1");
87 const side_effect_nondet_exprt nondet_bool_expr(
bool_typet());
89 const and_exprt choice0_rhs(nondet_bool_expr, w_used0_expr);
90 const and_exprt choice1_rhs(nondet_bool_expr, w_used1_expr);
93 shared_buffers.assignment(
94 goto_program, i_it, location, choice0, choice0_rhs);
95 shared_buffers.assignment(
96 goto_program, i_it, location, choice1, choice1_rhs);
103 if_exprt(choice1_expr, w_buff1_expr, lhs));
106 shared_buffers.assignment(
107 goto_program, i_it, location, e_it->second.object, value);
118 shared_buffers.assignment(
119 goto_program, i_it, location, vars.w_used0, w_used0_rhs);
120 shared_buffers.assignment(
121 goto_program, i_it, location, vars.w_used1, w_used1_rhs);
125 forall_rw_set_entries(e_it, rw_set)
129 shared_buffers(e_it->second.object);
132 shared_buffers.assignment(
133 goto_program, i_it, location, vars.w_used1, vars.w_used0);
134 shared_buffers.assignment(
135 goto_program, i_it, location, vars.w_used0,
true_exprt());
138 shared_buffers.assignment(
140 shared_buffers.assignment(
144 original_instruction.
code.
op1());
148 i_it=goto_program.insert_before(i_it);
149 i_it->make_atomic_end();
150 i_it->location=location;
178 gf_entry.second.body);