MLIR
20.0.0git
include
mlir
Dialect
Transform
PDLExtension
PDLExtensionOps.h
Go to the documentation of this file.
1
//===- PDLExtensionOps.h - PDL extension for Transform dialect --*- C++ -*-===//
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
#ifndef MLIR_DIALECT_TRANSFORM_PDLEXTENSION_PDLEXTENSIONOPS_H
10
#define MLIR_DIALECT_TRANSFORM_PDLEXTENSION_PDLEXTENSIONOPS_H
11
12
#include "
mlir/Bytecode/BytecodeOpInterface.h
"
13
#include "
mlir/Dialect/Transform/IR/TransformDialect.h
"
14
#include "
mlir/Dialect/Transform/Interfaces/TransformInterfaces.h
"
15
#include "
mlir/IR/OpDefinition.h
"
16
#include "
mlir/IR/OpImplementation.h
"
17
#include "
mlir/IR/SymbolTable.h
"
18
#include "
mlir/Interfaces/SideEffectInterfaces.h
"
19
20
#define GET_OP_CLASSES
21
#include "mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.h.inc"
22
23
namespace
mlir
{
24
namespace
transform {
25
/// PDL constraint callbacks that can be used by the PDL extension of the
26
/// Transform dialect. These are owned by the Transform dialect and can be
27
/// populated by extensions.
28
class
PDLMatchHooks
:
public
TransformDialectData
<PDLMatchHooks> {
29
public
:
30
PDLMatchHooks
(
MLIRContext
*ctx) :
TransformDialectData
(ctx) {}
31
32
/// Takes ownership of the named PDL constraint function from the given
33
/// map and makes them available for use by the operations in the dialect.
34
void
35
mergeInPDLMatchHooks
(llvm::StringMap<PDLConstraintFunction> &&constraintFns);
36
37
/// Returns the named PDL constraint functions available in the dialect
38
/// as a map from their name to the function.
39
const
llvm::StringMap<::mlir::PDLConstraintFunction> &
40
getPDLConstraintHooks
()
const
;
41
42
private
:
43
/// A container for PDL constraint function that can be used by
44
/// operations in this dialect.
45
PDLPatternModule pdlMatchHooks;
46
};
47
}
// namespace transform
48
}
// namespace mlir
49
50
MLIR_DECLARE_EXPLICIT_TYPE_ID
(
mlir::transform::PDLMatchHooks
)
51
52
#endif
// MLIR_DIALECT_TRANSFORM_PDLEXTENSION_PDLEXTENSIONOPS_H
BytecodeOpInterface.h
OpDefinition.h
OpImplementation.h
SideEffectInterfaces.h
SymbolTable.h
TransformDialect.h
TransformInterfaces.h
MLIR_DECLARE_EXPLICIT_TYPE_ID
#define MLIR_DECLARE_EXPLICIT_TYPE_ID(CLASS_NAME)
Definition:
TypeID.h:249
mlir::MLIRContext
MLIRContext is the top-level object for a collection of MLIR operations.
Definition:
MLIRContext.h:60
mlir::transform::PDLMatchHooks
PDL constraint callbacks that can be used by the PDL extension of the Transform dialect.
Definition:
PDLExtensionOps.h:28
mlir::transform::PDLMatchHooks::PDLMatchHooks
PDLMatchHooks(MLIRContext *ctx)
Definition:
PDLExtensionOps.h:30
mlir::transform::PDLMatchHooks::mergeInPDLMatchHooks
void mergeInPDLMatchHooks(llvm::StringMap< PDLConstraintFunction > &&constraintFns)
Takes ownership of the named PDL constraint function from the given map and makes them available for ...
Definition:
PDLExtensionOps.cpp:124
mlir::transform::PDLMatchHooks::getPDLConstraintHooks
const llvm::StringMap<::mlir::PDLConstraintFunction > & getPDLConstraintHooks() const
Returns the named PDL constraint functions available in the dialect as a map from their name to the f...
Definition:
PDLExtensionOps.cpp:132
mlir::transform::TransformDialectData
Base class for additional data owned by the Transform dialect.
Definition:
TransformDialect.h:62
mlir
Include the generated interface declarations.
Definition:
LocalAliasAnalysis.h:20
Generated on Sun Dec 8 2024 04:32:03 for MLIR by
1.9.1