diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst --- a/llvm/docs/LangRef.rst +++ b/llvm/docs/LangRef.rst @@ -738,8 +738,9 @@ [(unnamed_addr|local_unnamed_addr)] [AddrSpace] [ExternallyInitialized] [] - [, section "name"] [, comdat [($name)]] - [, align ] (, !name !N)* + [, section "name"] [, partition "name"] + [, comdat [($name)]] [, align ] + (, !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"] [partition "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: @@ -8421,7 +8425,7 @@ .. code-block:: text - catchret from %catch label %continue + catchret from %catch to label %continue .. _i_cleanupret: @@ -11026,8 +11030,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: @@ -11604,7 +11608,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 } @@ -11752,7 +11756,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` @@ -536,6 +536,9 @@ global name, it is treated as a verbatim string of characters. The left-hand-side operand is treated normally. +Values can have a trailing paste operator, in which case the left-hand-side +operand is concatenated to an empty string. + `Appendix B: Paste Operator Examples`_ presents examples of the behavior of the paste operator. @@ -546,7 +549,8 @@ files. .. productionlist:: - TableGenFile: `Statement`* + TableGenFile: (`Statement` | `IncludeDirective` + :| `PreprocessorDirective`)* Statement: `Assert` | `Class` | `Def` | `Defm` | `Defset` | `Defvar` :| `Foreach` | `If` | `Let` | `MultiClass` @@ -694,7 +698,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 +890,8 @@ .. productionlist:: MultiClass: "multiclass" `TokIdentifier` [`TemplateArgList`] - : [":" `ParentMultiClassList`] + : `ParentClassList` : "{" `MultiClassStatement`+ "}" - ParentMultiClassList: `MultiClassID` ("," `MultiClassID`)* MultiClassID: `TokIdentifier` MultiClassStatement: `Assert` | `Def` | `Defm` | `Defvar` | `Foreach` | `If` | `Let` @@ -1194,7 +1197,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)) {