[PATCH] D116674: [Docs] Fix IR and TableGen grammar inconsistencies
Paul C. Anagnostopoulos via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 7 06:13:28 PST 2022
Paul-C-Anagnostopoulos added a comment.
Thanks for making these corrections to the TableGen document. See my comments above.
================
Comment at: llvm/docs/TableGen/ProgRef.rst:333
Value: `SimpleValue` `ValueSuffix`*
- :| `Value` "#" `Value`
+ :| `Value` "#" [`Value`]
ValueSuffix: "{" `RangeList` "}"
----------------
If we are going to specify that the right operand is optional, we should explain elsewhere what that does. I have no idea, but I'm suspicious that the example you cited above is an error.
================
Comment at: llvm/docs/TableGen/ProgRef.rst:551
Statement: `Assert` | `Class` | `Def` | `Defm` | `Defset` | `Defvar`
- :| `Foreach` | `If` | `Let` | `MultiClass`
+ :| `Foreach` | `If` | `Let` | `MultiClass` | `IncludeDirective`
+ :| `PreprocessorDirective`
----------------
Those two directives are not included in Statement because they are not actually statements. Instead, extend TableGenFile with IncludeDirective and PreprocessorDirective.
================
Comment at: llvm/docs/TableGen/ProgRef.rst:890
MultiClass: "multiclass" `TokIdentifier` [`TemplateArgList`]
- : [":" `ParentMultiClassList`]
+ : `ParentClassList`
: "{" `MultiClassStatement`+ "}"
----------------
I'm tempted to leave this alone. It makes it clear that the ParentMultiClassList is composed of MultiClassIDs.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116674/new/
https://reviews.llvm.org/D116674
More information about the llvm-commits
mailing list