[Mlir-commits] [mlir] 6593886 - [mlir][NFC] Fix the tags for various doc code blocks
River Riddle
llvmlistbot at llvm.org
Mon May 16 16:46:37 PDT 2022
Author: River Riddle
Date: 2022-05-16T16:46:13-07:00
New Revision: 6593886a35025af7b32e5d317dd91779bf60014f
URL: https://github.com/llvm/llvm-project/commit/6593886a35025af7b32e5d317dd91779bf60014f
DIFF: https://github.com/llvm/llvm-project/commit/6593886a35025af7b32e5d317dd91779bf60014f.diff
LOG: [mlir][NFC] Fix the tags for various doc code blocks
Added:
Modified:
mlir/docs/AttributesAndTypes.md
mlir/docs/DataLayout.md
mlir/docs/Interfaces.md
mlir/docs/OpDefinitions.md
mlir/docs/PassManagement.md
Removed:
################################################################################
diff --git a/mlir/docs/AttributesAndTypes.md b/mlir/docs/AttributesAndTypes.md
index d0b92254433e..aaa420fa7683 100644
--- a/mlir/docs/AttributesAndTypes.md
+++ b/mlir/docs/AttributesAndTypes.md
@@ -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)">
```
diff --git a/mlir/docs/DataLayout.md b/mlir/docs/DataLayout.md
index 4ffbf036087a..a1eda21dab5b 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.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>
>} {}
diff --git a/mlir/docs/Interfaces.md b/mlir/docs/Interfaces.md
index 00fbd60c0a1c..8ec20a912456 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<MyInterface, ["getNumWithDefault"]>]> { ... }
-~~~
+```
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 ad0232f595d2..b3399d89c698 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 524e90eb6128..69e16c5ec449 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() {
More information about the Mlir-commits
mailing list