[mlir][NFC] Remove several dead references to the old standard dialect

This commit is contained in:
River Riddle 2022-03-01 14:00:26 -08:00
parent 96d9df4157
commit 026fe5ffc3
11 changed files with 23 additions and 23 deletions

View File

@ -224,8 +224,8 @@ which helps with this in general.
contain regions. contain regions.
- `func-bufferize` - `func-bufferize`
([code](https://github.com/llvm/llvm-project/blob/bc8acf2ce8ad6e8c9b1d97b2e02d3f4ad26e1d9d/mlir/lib/Dialect/StandardOps/Transforms/FuncBufferize.cpp#L1), ([code](https://github.com/llvm/llvm-project/blob/2f5715dc78328215d51d5664c72c632a6dac1046/mlir/lib/Dialect/Func/Transforms/FuncBufferize.cpp#L1),
[test](https://github.com/llvm/llvm-project/blob/bc8acf2ce8ad6e8c9b1d97b2e02d3f4ad26e1d9d/mlir/test/Dialect/Standard/func-bufferize.mlir#L1)) [test](https://github.com/llvm/llvm-project/blob/2f5715dc78328215d51d5664c72c632a6dac1046/mlir/test/Dialect/Func/func-bufferize.mlir#L1))
- Bufferizes `func`, `call`, and `BranchOpInterface` ops. - Bufferizes `func`, `call`, and `BranchOpInterface` ops.
- This is an example of how to bufferize ops that have multi-block - This is an example of how to bufferize ops that have multi-block

View File

@ -399,8 +399,6 @@ into a form that will resemble:
```mlir ```mlir
// Run: mlir-opt example4.mlir -convert-linalg-to-std // Run: mlir-opt example4.mlir -convert-linalg-to-std
// Note that we lower the Linalg dialect directly to the Standard dialect.
// See this doc: https://mlir.llvm.org/docs/Dialects/Standard/
#map0 = affine_map<(d0, d1)[s0, s1, s2] -> (d0 * s1 + s0 + d1 * s2)> #map0 = affine_map<(d0, d1)[s0, s1, s2] -> (d0 * s1 + s0 + d1 * s2)>

View File

@ -1033,25 +1033,25 @@ type conversion for builtin types to SPIR-V types conforming to the
required extension/capability for the resultant type is not available in the required extension/capability for the resultant type is not available in the
given target environment, `convertType()` will return a null type. given target environment, `convertType()` will return a null type.
Standard scalar types are converted to their corresponding SPIR-V scalar types. Builtin scalar types are converted to their corresponding SPIR-V scalar types.
(TODO: Note that if the bitwidth is not available in the target environment, (TODO: Note that if the bitwidth is not available in the target environment,
it will be unconditionally converted to 32-bit. This should be switched to it will be unconditionally converted to 32-bit. This should be switched to
properly emulating non-32-bit scalar types.) properly emulating non-32-bit scalar types.)
[Standard index type][MlirIndexType] need special handling since they are not [Builtin index type][MlirIndexType] need special handling since they are not
directly supported in SPIR-V. Currently the `index` type is converted to `i32`. directly supported in SPIR-V. Currently the `index` type is converted to `i32`.
(TODO: Allow for configuring the integer width to use for `index` types in the (TODO: Allow for configuring the integer width to use for `index` types in the
SPIR-V dialect) SPIR-V dialect)
SPIR-V only supports vectors of 2/3/4 elements; so SPIR-V only supports vectors of 2/3/4 elements; so
[standard vector types][MlirVectorType] of these lengths can be converted [builtin vector types][MlirVectorType] of these lengths can be converted
directly. directly.
(TODO: Convert other vectors of lengths to scalars or arrays) (TODO: Convert other vectors of lengths to scalars or arrays)
[Standard memref types][MlirMemrefType] with static shape and stride are [Builtin memref types][MlirMemrefType] with static shape and stride are
converted to `spv.ptr<spv.struct<spv.array<...>>>`s. The resultant SPIR-V array converted to `spv.ptr<spv.struct<spv.array<...>>>`s. The resultant SPIR-V array
types have the same element type as the source memref and its number of elements types have the same element type as the source memref and its number of elements
is obtained from the layout specification of the memref. The storage class of is obtained from the layout specification of the memref. The storage class of
@ -1079,8 +1079,7 @@ returns an SSA value generated from an `spv.mlir.addressof` operation.
Using the above infrastructure, conversions are implemented from Using the above infrastructure, conversions are implemented from
* [Standard Dialect][MlirStandardDialect] : Only arithmetic and logical * [Arithmetic Dialect][MlirArithmeticDialect]
operations conversions are implemented.
* [GPU Dialect][MlirGpuDialect] : A gpu.module is converted to a `spv.module`. * [GPU Dialect][MlirGpuDialect] : A gpu.module is converted to a `spv.module`.
A gpu.function within this module is lowered as an entry function. A gpu.function within this module is lowered as an entry function.
@ -1400,7 +1399,7 @@ dialect.
[MlirMemrefType]: Builtin.md/#memreftype [MlirMemrefType]: Builtin.md/#memreftype
[MlirIndexType]: Builtin.md/#indextype [MlirIndexType]: Builtin.md/#indextype
[MlirGpuDialect]: GPU.md [MlirGpuDialect]: GPU.md
[MlirStandardDialect]: Standard.md [MlirArithmeticDialect]: Arithmetic.md
[MlirSpirvHeaders]: https://github.com/llvm/llvm-project/tree/main/mlir/include/mlir/Dialect/SPIRV [MlirSpirvHeaders]: https://github.com/llvm/llvm-project/tree/main/mlir/include/mlir/Dialect/SPIRV
[MlirSpirvLibs]: https://github.com/llvm/llvm-project/tree/main/mlir/lib/Dialect/SPIRV [MlirSpirvLibs]: https://github.com/llvm/llvm-project/tree/main/mlir/lib/Dialect/SPIRV
[MlirSpirvTests]: https://github.com/llvm/llvm-project/tree/main/mlir/test/Dialect/SPIRV [MlirSpirvTests]: https://github.com/llvm/llvm-project/tree/main/mlir/test/Dialect/SPIRV

View File

@ -95,7 +95,7 @@ Vectors) are welcome future extensions.
### Virtual Vector Ops ### Virtual Vector Ops
Some existing Standard and Vector Dialect on `n-D` `vector` types comprise: Some existing Arithmetic and Vector Dialect on `n-D` `vector` types comprise:
```mlir ```mlir
%2 = arith.addf %0, %1 : vector<3x7x8xf32> // -> vector<3x7x8xf32> %2 = %2 = arith.addf %0, %1 : vector<3x7x8xf32> // -> vector<3x7x8xf32> %2 =

View File

@ -305,7 +305,7 @@ MLIR introduces a uniform concept called *operations* to enable describing many
different levels of abstractions and computations. Operations in MLIR are fully different levels of abstractions and computations. Operations in MLIR are fully
extensible (there is no fixed list of operations) and have application-specific extensible (there is no fixed list of operations) and have application-specific
semantics. For example, MLIR supports semantics. For example, MLIR supports
[target-independent operations](Dialects/Standard.md#memory-operations), [target-independent operations](Dialects/MemRef.md),
[affine operations](Dialects/Affine.md), and [affine operations](Dialects/Affine.md), and
[target-specific machine operations](#target-specific-operations). [target-specific machine operations](#target-specific-operations).
@ -752,7 +752,7 @@ attribute-value ::= attribute-alias | dialect-attribute | builtin-attribute
Attributes are the mechanism for specifying constant data on operations in Attributes are the mechanism for specifying constant data on operations in
places where a variable is never allowed - e.g. the comparison predicate of a places where a variable is never allowed - e.g. the comparison predicate of a
[`cmpi` operation](Dialects/Standard.md#stdcmpi-cmpiop). Each operation has an [`cmpi` operation](Dialects/ArithmeticOps.md#arithcmpi-mlirarithcmpiop). Each operation has an
attribute dictionary, which associates a set of attribute names to attribute attribute dictionary, which associates a set of attribute names to attribute
values. MLIR's builtin dialect provides a rich set of values. MLIR's builtin dialect provides a rich set of
[builtin attribute values](#builtin-attribute-values) out of the box (such as [builtin attribute values](#builtin-attribute-values) out of the box (such as

View File

@ -51,7 +51,7 @@ To use this framework, we need to provide two things (and an optional third):
## Conversion Target ## Conversion Target
For our purposes, we want to convert the compute-intensive `Toy` operations into For our purposes, we want to convert the compute-intensive `Toy` operations into
a combination of operations from the `Affine`, `MemRef` and `Standard` dialects a combination of operations from the `Affine`, `Arithmetic`, `Func`, and `MemRef` dialects
for further optimization. To start off the lowering, we first define our for further optimization. To start off the lowering, we first define our
conversion target: conversion target:

View File

@ -9,12 +9,13 @@
// This file implements full lowering of Toy operations to LLVM MLIR dialect. // This file implements full lowering of Toy operations to LLVM MLIR dialect.
// 'toy.print' is lowered to a loop nest that calls `printf` on each element of // 'toy.print' is lowered to a loop nest that calls `printf` on each element of
// the input array. The file also sets up the ToyToLLVMLoweringPass. This pass // the input array. The file also sets up the ToyToLLVMLoweringPass. This pass
// lowers the combination of Affine + SCF + Standard dialects to the LLVM one: // lowers the combination of Arithmetic + Affine + SCF + Func dialects to the
// LLVM one:
// //
// Affine -- // Affine --
// | // |
// v // v
// Standard --> LLVM (Dialect) // Arithmetic + Func --> LLVM (Dialect)
// ^ // ^
// | // |
// 'toy.print' --> Loop (SCF) -- // 'toy.print' --> Loop (SCF) --

View File

@ -9,12 +9,13 @@
// This file implements full lowering of Toy operations to LLVM MLIR dialect. // This file implements full lowering of Toy operations to LLVM MLIR dialect.
// 'toy.print' is lowered to a loop nest that calls `printf` on each element of // 'toy.print' is lowered to a loop nest that calls `printf` on each element of
// the input array. The file also sets up the ToyToLLVMLoweringPass. This pass // the input array. The file also sets up the ToyToLLVMLoweringPass. This pass
// lowers the combination of Affine + SCF + Standard dialects to the LLVM one: // lowers the combination of Arithmetic + Affine + SCF + Func dialects to the
// LLVM one:
// //
// Affine -- // Affine --
// | // |
// v // v
// Standard --> LLVM (Dialect) // Arithmetic + Func --> LLVM (Dialect)
// ^ // ^
// | // |
// 'toy.print' --> Loop (SCF) -- // 'toy.print' --> Loop (SCF) --

View File

@ -1344,7 +1344,7 @@ def MemRef_StoreOp : MemRef_Op<"store",
In an affine context, the indices of a store are restricted to SSA values In an affine context, the indices of a store are restricted to SSA values
bound to surrounding loop induction variables, bound to surrounding loop induction variables,
[symbols](Affine.md/#restrictions-on-dimensions-and-symbols), results of a [symbols](Affine.md/#restrictions-on-dimensions-and-symbols), results of a
[`constant` operation](Standard.md/#stdconstant-constantop), or the result of an `constant` operation, or the result of an
[`affine.apply`](Affine.md/#affineapply-affineapplyop) operation that can in [`affine.apply`](Affine.md/#affineapply-affineapplyop) operation that can in
turn take as arguments all of the aforementioned SSA values or the turn take as arguments all of the aforementioned SSA values or the
recursively result of such an `affine.apply` operation. recursively result of such an `affine.apply` operation.

View File

@ -23,8 +23,9 @@ class TypeConverter;
namespace mlir { namespace mlir {
/// Creates an instance of the ShapeToShapeLowering pass that legalizes Shape /// Creates an instance of the ShapeToShapeLowering pass that legalizes Shape
/// dialect to be convertible to Standard. For example, `shape.num_elements` get /// dialect to be convertible to Arithmetic. For example, `shape.num_elements`
/// transformed to `shape.reduce`, which can be lowered to SCF and Standard. /// get transformed to `shape.reduce`, which can be lowered to SCF and
/// Arithmetic.
std::unique_ptr<Pass> createShapeToShapeLowering(); std::unique_ptr<Pass> createShapeToShapeLowering();
/// Collects a set of patterns to rewrite ops within the Shape dialect. /// Collects a set of patterns to rewrite ops within the Shape dialect.

View File

@ -17,7 +17,7 @@ def RemoveShapeConstraints : Pass<"remove-shape-constraints", "FuncOp"> {
} }
def ShapeToShapeLowering : Pass<"shape-to-shape-lowering", "FuncOp"> { def ShapeToShapeLowering : Pass<"shape-to-shape-lowering", "FuncOp"> {
let summary = "Legalize Shape dialect to be convertible to Standard"; let summary = "Legalize Shape dialect to be convertible to Arithmetic";
let constructor = "mlir::createShapeToShapeLowering()"; let constructor = "mlir::createShapeToShapeLowering()";
} }