Specifically, clarify the following:
- Volatile load and store may access addresses that are not memory (MMIO registers, etc.).
- Volatile load and store do not modify unrelated memory.
- Volatile load and store do not trap.
Prompted by recent discussion of volatile on llvmdev. I think this is enough to resolve all the issues brought up in that discussion, at least from the perspective of LangRef.
Currently, there's sort of a split in the LLVM source code about whether volatile operations are allowed to trap; this resolves that dispute in favor of not allowing them to trap. (This is the opposite of the position I originally took, but thinking about it a bit more it makes sense for the uses we expect.)
Hal brought up the possibility on llvmdev that certain APIs like isSafeToLoadUnconditionally and FindAvailablePtrLoadStore might assume that volatile operations do in fact point to memory; I think we should just treat that as a bug, though.
How should we specify the interaction between this and inaccessiblememonly?