xref: /llvm-project/mlir/include/mlir/Transforms/DialectConversion.pdll (revision 8c66344ee9f67f76b3cb6b3345a46345a2d3975a)
1//===- DialectConversion.pdll - DialectConversion PDLL Support -*- PDLL -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines various utilities for interacting with dialect conversion
10// within PDLL.
11//
12//===----------------------------------------------------------------------===//
13
14/// This rewrite returns the converted value of `value`, whose type is defined
15/// by the type converted specified in the `PDLConversionConfig` of the current
16/// pattern.
17Rewrite convertValue(value: Value) -> Value;
18
19/// This rewrite returns the converted values of `values`, whose type is defined
20/// by the type converted specified in the `PDLConversionConfig` of the current
21/// pattern.
22Rewrite convertValues(values: ValueRange) -> ValueRange;
23
24/// This rewrite returns the converted type of `type` as defined by the type
25/// converted specified in the `PDLConversionConfig` of the current pattern.
26Rewrite convertType(type: Type) -> Type;
27
28/// This rewrite returns the converted types of `types` as defined by the type
29/// converted specified in the `PDLConversionConfig` of the current pattern.
30Rewrite convertTypes(types: TypeRange) -> TypeRange;
31