aboutsummaryrefslogtreecommitdiff
path: root/docs/LangRef.rst
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-01-30 21:19:35 +0000
committerAndrew Trick <atrick@apple.com>2013-01-30 21:19:35 +0000
commit9a6dd0226194c46b839e10ee2f48730ea963eb22 (patch)
treefc3f6ae55e0ef2435712dc9b9360e2bccc808900 /docs/LangRef.rst
parent5bb16fdbb363abee2b9495116ff1a97568460cae (diff)
...in light of recent activity related to llvm.memcpy flags. I want to
prevent an llvm developer from mistakenly thinking that just because the intrinsic has volatile flags that volatile operations can be converted to or folded into them. Platforms may rely on volatile loads and stores of natively supported data width to be executed as single instruction. When compiling C, this expectation likely holds for l-values of volatile primitive types with native hardware support, but not necessarily for aggregate types. The frontend upholds these expectations, which are not specified in the IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173974 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LangRef.rst')
-rw-r--r--docs/LangRef.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index 24a73150da..ec34a31cd4 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -1080,6 +1080,11 @@ volatile operations. The optimizers *may* change the order of volatile
operations relative to non-volatile operations. This is not Java's
"volatile" and has no cross-thread synchronization behavior.
+IR-level volatile loads and stores cannot safely be optimized into
+llvm.memcpy or llvm.memmove intrinsics even when those intrinsics are
+flagged volatile. Likewise, the backend should never split or merge
+target-legal volatile load/store instructions.
+
.. _memmodel:
Memory Model for Concurrent Operations