EXP: tools/memory-ordering: Model effects of volatile on ctrl

This commit models the fact that compilers are not allowed to reorder
volatile accesses.  This modeling is at best approximate, although it
does correctly handle C-RomanPenyaev-list-rcu-rr.litmus from the litmus
github archive.  The approach is to extend control dependencies to
subsequent volatiles accesses.

Probable issues with this change:

1.	It does not correctly handle the case of identical WRITE_ONCE()
	invocations at the beginning of both legs of an "if" statement.
	(Of course, the current state does not correctly handle this
	either.)

2.	It might not correctly handle the ARMv8 conditional-move instruction.

3.	It is probably missing some handling of atomic RWM operations.

4.	It does not insist that the initial ctrl dependency end in
	a volatile access.  This is not yet a problem because we
	don't yet model unmarked accesses.

That said, this patch is not intended for inclusion, but rather in the
hope that it inspires someone to come up with something better.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
1 file changed