X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FLangRef.rst;h=9e44705530a0dab3f0041b0b867699536c1bad88;hb=5b69592c5af4250108757a5503c476ccc49305f3;hp=a310240804d343a950c3e67929eadaaf0b7e8769;hpb=0ea6d4421cfc8e01c5bfb3552bb3999acc617c31;p=oota-llvm.git diff --git a/docs/LangRef.rst b/docs/LangRef.rst index a310240804d..9e44705530a 100644 --- a/docs/LangRef.rst +++ b/docs/LangRef.rst @@ -783,7 +783,7 @@ In a COFF object file, this will create a COMDAT section with selection kind ``IMAGE_COMDAT_SELECT_LARGEST`` containing the contents of the ``@foo`` symbol and another COMDAT section with selection kind ``IMAGE_COMDAT_SELECT_ASSOCIATIVE`` which is associated with the first COMDAT -section and contains the contents of the ``@baz`` symbol. +section and contains the contents of the ``@bar`` symbol. There are some restrictions on the properties of the global object. It, or an alias to it, must have the same name as the COMDAT group when @@ -2276,7 +2276,9 @@ constants and smaller complex constants. square brackets (``[]``)). For example: "``[ i32 42, i32 11, i32 74 ]``". Array constants must have :ref:`array type `, and the number and types of elements must - match those specified by the type. + match those specified by the type. As a special case, character array + constants may also be represented as a double-quoted string using the ``c`` + prefix. For example: "``c"Hello World\0A\00"``". **Vector constants** Vector constants are represented with notation similar to vector type definitions (a comma separated list of elements, surrounded by @@ -2393,7 +2395,7 @@ allowed to assume that the '``undef``' operand could be the same as %C = xor %B, %B %D = undef - %E = icmp lt %D, 4 + %E = icmp slt %D, 4 %F = icmp gte %D, 4 Safe: @@ -5075,7 +5077,7 @@ Example: %agg1 = insertvalue {i32, float} undef, i32 1, 0 ; yields {i32 1, float undef} %agg2 = insertvalue {i32, float} %agg1, float %val, 1 ; yields {i32 1, float %val} - %agg3 = insertvalue {i32, {float}} %agg1, float %val, 1, 0 ; yields {i32 1, float %val} + %agg3 = insertvalue {i32, {float}} undef, float %val, 1, 0 ; yields {i32 undef, {float %val}} .. _memoryops: @@ -5155,7 +5157,7 @@ Syntax: :: - = load [volatile] * [, align ][, !nontemporal !][, !invariant.load !] + = load [volatile] * [, align ][, !nontemporal !][, !invariant.load !][, !nonnull !] = load atomic [volatile] * [singlethread] , align ! = !{ i32 1 } @@ -5211,6 +5213,14 @@ address points to memory which does not change value during program execution. The optimizer may then move this load around, for example, by hoisting it out of loops using loop invariant code motion. +The optional ``!nonnull`` metadata must reference a single +metadata name ```` corresponding to a metadata node with no +entries. The existence of the ``!nonnull`` metadata on the +instruction tells the optimizer that the value loaded is known to +never be null. This is analogous to the ''nonnull'' attribute +on parameters and return values. This metadata can only be applied +to loads of a pointer type. + Semantics: """""""""" @@ -6591,6 +6601,9 @@ This instruction requires several arguments: - The calling conventions of the caller and callee must match. - All ABI-impacting function attributes, such as sret, byval, inreg, returned, and inalloca, must match. + - The callee must be varargs iff the caller is varargs. Bitcasting a + non-varargs function to the appropriate varargs type is legal so + long as the non-varargs prefixes obey the other rules. Tail call optimization for calls marked ``tail`` is guaranteed to occur if the following conditions are met: