[llvm] r174007 - LangRef: Add a Rationale for volatile rules.

Andrew Trick atrick at apple.com
Wed Jan 30 16:49:39 PST 2013


Author: atrick
Date: Wed Jan 30 18:49:39 2013
New Revision: 174007

URL: http://llvm.org/viewvc/llvm-project?rev=174007&view=rev
Log:
LangRef: Add a Rationale for volatile rules.

Modified:
    llvm/trunk/docs/LangRef.rst

Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=174007&r1=174006&r2=174007&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Wed Jan 30 18:49:39 2013
@@ -1085,6 +1085,16 @@ llvm.memcpy or llvm.memmove intrinsics e
 flagged volatile. Likewise, the backend should never split or merge
 target-legal volatile load/store instructions.
 
+.. admonition:: Rationale
+
+ Platforms may rely on volatile loads and stores of natively supported
+ data width to be executed as single instruction. For example, in C
+ this holds for an l-value of volatile primitive type with native
+ hardware support, but not necessarily for aggregate types. The
+ frontend upholds these expectations, which are intentionally
+ unspecified in the IR. The rules above ensure that IR transformation
+ do not violate the frontend's contract with the language.
+
 .. _memmodel:
 
 Memory Model for Concurrent Operations





More information about the llvm-commits mailing list