From 93e066d0e2bdf9b42bf6627b76bc852c31b26456 Mon Sep 17 00:00:00 2001 From: Jeffrey Yasskin Date: Mon, 26 Apr 2010 21:21:24 +0000 Subject: Consolidate the description of volatile operations, now that some of the intrinsics have volatile semantics in addition to the load and store instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102384 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/LangRef.html | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) (limited to 'docs') diff --git a/docs/LangRef.html b/docs/LangRef.html index c1788ada2b..fb3420785e 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -50,6 +50,7 @@
  • Module-Level Inline Assembly
  • Data Layout
  • Pointer Aliasing Rules
  • +
  • Volatile Memory Accesses
  • Type System @@ -1394,6 +1395,24 @@ to implement type-based alias analysis.

    + + + +
    + +

    Certain memory accesses, such as loads, stores, and llvm.memcpys may be marked volatile. +The optimizers must not change the number of volatile operations or change their +order of execution relative to other 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.

    + +
    + @@ -4199,9 +4218,8 @@ Instruction from which to load. The pointer must point to a first class type. If the load is marked as volatile, then the optimizer is not allowed to modify the - number or order of execution of this load with other - volatile load and store - instructions.

    + number or order of execution of this load with other volatile operations.

    The optional constant align argument specifies the alignment of the operation (that is, the alignment of the memory address). A value of 0 or an @@ -4257,11 +4275,10 @@ Instruction and an address at which to store it. The type of the '<pointer>' operand must be a pointer to the first class type of the - '<value>' operand. If the store is marked - as volatile, then the optimizer is not allowed to modify the number - or order of execution of this store with other - volatile load and store - instructions.

    + '<value>' operand. If the store is marked as + volatile, then the optimizer is not allowed to modify the number or + order of execution of this store with other volatile operations.

    The optional constant "align" argument specifies the alignment of the operation (that is, the alignment of the memory address). A value of 0 or an @@ -5962,8 +5979,10 @@ LLVM.

    then the caller guarantees that both the source and destination pointers are aligned to that boundary.

    -

    Volatile accesses should not be deleted if dead, but the access behavior is - not very cleanly specified and it is unwise to depend on it.

    +

    If the isvolatile parameter is true, the + llvm.memcpy call is a volatile operation. + The detailed access behavior is not very cleanly specified and it is unwise + to depend on it.

    Semantics:
    @@ -6016,8 +6035,10 @@ LLVM.

    then the caller guarantees that the source and destination pointers are aligned to that boundary.

    -

    Volatile accesses should not be deleted if dead, but the access behavior is - not very cleanly specified and it is unwise to depend on it.

    +

    If the isvolatile parameter is true, the + llvm.memmove call is a volatile operation. + The detailed access behavior is not very cleanly specified and it is unwise + to depend on it.

    Semantics:
    @@ -6066,8 +6087,10 @@ LLVM.

    then the caller guarantees that the destination pointer is aligned to that boundary.

    -

    Volatile accesses should not be deleted if dead, but the access behavior is - not very cleanly specified and it is unwise to depend on it.

    +

    If the isvolatile parameter is true, the + llvm.memset call is a volatile operation. + The detailed access behavior is not very cleanly specified and it is unwise + to depend on it.

    Semantics:

    The 'llvm.memset.*' intrinsics fill "len" bytes of memory starting -- cgit v1.2.3