From 6593886a35025af7b32e5d317dd91779bf60014f Mon Sep 17 00:00:00 2001 From: River Riddle Date: Mon, 16 May 2022 16:45:51 -0700 Subject: [PATCH] [mlir][NFC] Fix the tags for various doc code blocks --- mlir/docs/AttributesAndTypes.md | 8 ++++---- mlir/docs/DataLayout.md | 4 ++-- mlir/docs/Interfaces.md | 4 ++-- mlir/docs/OpDefinitions.md | 2 +- mlir/docs/PassManagement.md | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mlir/docs/AttributesAndTypes.md b/mlir/docs/AttributesAndTypes.md index d0b9225..aaa420f 100644 --- a/mlir/docs/AttributesAndTypes.md +++ b/mlir/docs/AttributesAndTypes.md @@ -584,7 +584,7 @@ template <> struct FieldParser { Example of using ODS parameter classes: -``` +```tablegen def MyParameter : TypeParameter<"std::pair", "pair of ints"> { let printer = [{ $_printer << $_self.first << " * " << $_self.second }]; let parser = [{ [&] -> FailureOr> { @@ -655,7 +655,7 @@ the equality operator is used. For example: -``` +```tablegen let parameters = (ins DefaultValuedParameter<"Optional", "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)"> ``` diff --git a/mlir/docs/DataLayout.md b/mlir/docs/DataLayout.md index 4ffbf03..a1eda21 100644 --- a/mlir/docs/DataLayout.md +++ b/mlir/docs/DataLayout.md @@ -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.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 >} {} diff --git a/mlir/docs/Interfaces.md b/mlir/docs/Interfaces.md index 00fbd60..8ec20a9 100644 --- a/mlir/docs/Interfaces.md +++ b/mlir/docs/Interfaces.md @@ -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]> { ... } -~~~ +``` Note: Existing operation interfaces defined in C++ can be accessed in the ODS framework via the `OpInterfaceTrait` class. diff --git a/mlir/docs/OpDefinitions.md b/mlir/docs/OpDefinitions.md index ad0232f..b3399d8 100644 --- a/mlir/docs/OpDefinitions.md +++ b/mlir/docs/OpDefinitions.md @@ -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">; ``` diff --git a/mlir/docs/PassManagement.md b/mlir/docs/PassManagement.md index 524e90e..69e16c5 100644 --- a/mlir/docs/PassManagement.md +++ b/mlir/docs/PassManagement.md @@ -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() { -- 2.7.4