diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -739,7 +739,8 @@ [ExternallyInitialized] [] [, section "name"] [, comdat [($name)]] - [, align ] (, !name !N)* + [, align ] [, partition "name"] + (, !name !N)* For example, the following defines a global in a numbered address space with an initializer, section, and alignment: @@ -836,8 +837,9 @@ [cconv] [ret attrs] @ ([argument list]) [(unnamed_addr|local_unnamed_addr)] [AddrSpace] [fn Attrs] - [section "name"] [comdat [($name)]] [align N] [gc] [prefix Constant] - [prologue Constant] [personality Constant] (!name !N)* { ... } + [section "name"] [section "name"] [comdat [($name)]] [align N] + [gc] [prefix Constant] [prologue Constant] [personality Constant] + (!name !N)* { ... } The argument list is a comma separated sequence of arguments where each argument is of the following form: @@ -866,6 +868,7 @@ Syntax:: @ = [Linkage] [PreemptionSpecifier] [Visibility] [DLLStorageClass] [ThreadLocal] [(unnamed_addr|local_unnamed_addr)] alias , * @ + [, partition "name"] The linkage must be one of ``private``, ``internal``, ``linkonce``, ``weak``, ``linkonce_odr``, ``weak_odr``, ``external``. Note that some system linkers @@ -908,6 +911,7 @@ Syntax:: @ = [Linkage] [PreemptionSpecifier] [Visibility] ifunc , * @ + [, partition "name"] .. _langref_comdats: @@ -8420,7 +8424,7 @@ .. code-block:: text - catchret from %catch label %continue + catchret from %catch to label %continue .. _i_cleanupret: @@ -11025,8 +11029,8 @@ .. code-block:: text %X = bitcast i8 255 to i8 ; yields i8 :-1 - %Y = bitcast i32* %x to sint* ; yields sint*:%x - %Z = bitcast <2 x int> %V to i64; ; yields i64: %V (depends on endianess) + %Y = bitcast i32* %x to i16* ; yields i16*:%x + %Z = bitcast <2 x i32> %V to i64; ; yields i64: %V (depends on endianess) %Z = bitcast <2 x i32*> %V to <2 x i64*> ; yields <2 x i64*> .. _i_addrspacecast: @@ -11603,7 +11607,7 @@ call i32 (i8*, ...)* @printf(i8* %msg, i32 12, i8 42) ; yields i32 %X = tail call i32 @foo() ; yields i32 %Y = tail call fastcc i32 @foo() ; yields i32 - call void %foo(i8 97 signext) + call void %foo(i8 signext 97) %struct.A = type { i32, i8 } %r = call %struct.A @foo() ; yields { i32, i8 } @@ -11751,7 +11755,7 @@ ;; A landing pad which can catch an integer and can only throw a double. %res = landingpad { i8*, i32 } catch i8** @_ZTIi - filter [1 x i8**] [@_ZTId] + filter [1 x i8**] [i8** @_ZTId] .. _i_catchpad: diff --git a/llvm/docs/TableGen/ProgRef.rst b/llvm/docs/TableGen/ProgRef.rst --- a/llvm/docs/TableGen/ProgRef.rst +++ b/llvm/docs/TableGen/ProgRef.rst @@ -330,7 +330,7 @@ .. productionlist:: Value: `SimpleValue` `ValueSuffix`* - :| `Value` "#" `Value` + :| `Value` "#" [`Value`] ValueSuffix: "{" `RangeList` "}" :| "[" `RangeList` "]" :| "." `TokIdentifier` @@ -548,7 +548,8 @@ .. productionlist:: TableGenFile: `Statement`* Statement: `Assert` | `Class` | `Def` | `Defm` | `Defset` | `Defvar` - :| `Foreach` | `If` | `Let` | `MultiClass` + :| `Foreach` | `If` | `Let` | `MultiClass` | `IncludeDirective` + :| `PreprocessorDirective` The following sections describe each of these top-level statements. @@ -694,7 +695,7 @@ dag the_dag = d; } - def rec1 : A<(ops rec1)> + def rec1 : A<(ops rec1)>; The DAG ``(ops rec1)`` is passed as a template argument to class ``A``. Notice that the DAG includes ``rec1``, the record being defined. @@ -886,9 +887,8 @@ .. productionlist:: MultiClass: "multiclass" `TokIdentifier` [`TemplateArgList`] - : [":" `ParentMultiClassList`] + : `ParentClassList` : "{" `MultiClassStatement`+ "}" - ParentMultiClassList: `MultiClassID` ("," `MultiClassID`)* MultiClassID: `TokIdentifier` MultiClassStatement: `Assert` | `Def` | `Defm` | `Defvar` | `Foreach` | `If` | `Let` @@ -1194,7 +1194,7 @@ each loop iteration, so their value in one iteration is not available in the next iteration. The following ``defvar`` will not work:: - defvar i = !add(i, 1) + defvar i = !add(i, 1); Variables can also be defined with ``defvar`` in a record body. See `Defvar in a Record Body`_ for more details. diff --git a/llvm/lib/CodeGen/MIRParser/MIParser.cpp b/llvm/lib/CodeGen/MIRParser/MIParser.cpp --- a/llvm/lib/CodeGen/MIRParser/MIParser.cpp +++ b/llvm/lib/CodeGen/MIRParser/MIParser.cpp @@ -875,11 +875,11 @@ // N.B: Multiple lists of successors and liveins are allowed and they're // merged into one. // Example: - // liveins: %edi - // liveins: %esi + // liveins: $edi + // liveins: $esi // // is equivalent to - // liveins: %edi, %esi + // liveins: $edi, $esi bool ExplicitSuccessors = false; while (true) { if (Token.is(MIToken::kw_successors)) {