[mlir][NFC] Fix the tags for various doc code blocks

This commit is contained in:
River Riddle 2022-05-16 16:45:51 -07:00
parent 1febbd67aa
commit 6593886a35
5 changed files with 10 additions and 10 deletions

View File

@ -584,7 +584,7 @@ template <> struct FieldParser<MyParameter> {
Example of using ODS parameter classes:
```
```tablegen
def MyParameter : TypeParameter<"std::pair<int, int>", "pair of ints"> {
let printer = [{ $_printer << $_self.first << " * " << $_self.second }];
let parser = [{ [&] -> FailureOr<std::pair<int, int>> {
@ -655,7 +655,7 @@ the equality operator is used.
For example:
```
```tablegen
let parameters = (ins DefaultValuedParameter<"Optional<int>", "5">:$a)
let mnemonic = "default_valued";
let assemblyFormat = "(`<` $a^ `>`)?";
@ -663,7 +663,7 @@ let assemblyFormat = "(`<` $a^ `>`)?";
Which will look like:
```
```mlir
!test.default_valued // a = 5
!test.default_valued<10> // a = 10
```
@ -671,7 +671,7 @@ Which will look like:
For optional `Attribute` or `Type` parameters, the current MLIR context is
available through `$_ctx`. E.g.
```
```tablegen
DefaultValuedParameter<"IntegerType", "IntegerType::get($_ctx, 32)">
```

View File

@ -113,7 +113,7 @@ specific to the type.
For example, a data layout specification may be an actual list of pairs with
simple custom syntax resembling the following:
```
```mlir
#my_dialect.layout_spec<
#my_dialect.layout_entry<!my_dialect.type, size=42>,
#my_dialect.layout_entry<"my_dialect.endianness", "little">,
@ -259,7 +259,7 @@ Index type is an integer type used for target-specific size information in,
e.g., `memref` operations. Its data layout is parameterized by a single integer
data layout entry that specifies its bitwidth. For example,
```
```mlir
module attributes { dlti.dl_spec = #dlti.dl_spec<
#dlti.dl_entry<index, 32>
>} {}

View File

@ -459,7 +459,7 @@ operation if the operation specifies the interface with
Examples:
~~~tablegen
```tablegen
def MyInterface : OpInterface<"MyInterface"> {
let description = [{
This is the description of the interface. It provides concrete information
@ -630,7 +630,7 @@ def OpWithInferTypeInterfaceOp : Op<...
// the generation of a declaration for those methods.
def OpWithOverrideInferTypeInterfaceOp : Op<...
[DeclareOpInterfaceMethods<MyInterface, ["getNumWithDefault"]>]> { ... }
~~~
```
Note: Existing operation interfaces defined in C++ can be accessed in the ODS
framework via the `OpInterfaceTrait` class.

View File

@ -1530,7 +1530,7 @@ mlir-tblgen --gen-op-interface-doc -I /path/to/mlir/include /path/to/input/td/fi
Classes/defs can be marked as deprecated by using the `Deprecate` helper class,
e.g.,
```td
```tablegen
def OpTraitA : NativeOpTrait<"OpTraitA">, Deprecated<"use `bar` instead">;
```

View File

@ -375,7 +375,7 @@ operation type. Nesting in this sense, corresponds to the
For example, the following `.mlir`:
```
```mlir
module {
spv.module "Logical" "GLSL450" {
func @foo() {