I'm looking at this bit of text in the documentation for Visual C++'s _ReadWriteBarrier intrinsic:
In past versions of the Visual C++ compiler, the _ReadWriteBarrier and _WriteBarrier functions were enforced only locally and did not affect functions up the call tree. In Visual C++ 2005 and later, these functions are enforced all the way up the call tree.
I understand what the barrier does within a function, but the "up the call tree" seems to imply that a function foo()
calling a function bar()
can know whether bar()
contains a barrier or not. What actually changed in VC2005 to enable this... the calling convention/ABI, some global analysis done by the compiler, or what ?