MLIR 24.0.0git
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
14
15#define GET_OP_CLASSES
16#include "mlir/Dialect/Transform/PDLExtension/PDLExtensionOps.h.inc"
17
18namespace mlir {
19namespace transform {
20/// PDL constraint callbacks that can be used by the PDL extension of the
21/// Transform dialect. These are owned by the Transform dialect and can be
22/// populated by extensions.
23class PDLMatchHooks : public TransformDialectData<PDLMatchHooks> {
24public:
26
27 /// Takes ownership of the named PDL constraint function from the given
28 /// map and makes them available for use by the operations in the dialect.
29 void
30 mergeInPDLMatchHooks(llvm::StringMap<PDLConstraintFunction> &&constraintFns);
31
32 /// Returns the named PDL constraint functions available in the dialect
33 /// as a map from their name to the function.
34 const llvm::StringMap<::mlir::PDLConstraintFunction> &
36
37private:
38 /// A container for PDL constraint function that can be used by
39 /// operations in this dialect.
40 PDLPatternModule pdlMatchHooks;
41};
42} // namespace transform
43} // namespace mlir
44
46
47#endif // MLIR_DIALECT_TRANSFORM_PDLEXTENSION_PDLEXTENSIONOPS_H
#define MLIR_DECLARE_EXPLICIT_TYPE_ID(CLASS_NAME)
Definition TypeID.h:321
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:71
PDL constraint callbacks that can be used by the PDL extension of the Transform dialect.
void mergeInPDLMatchHooks(llvm::StringMap< PDLConstraintFunction > &&constraintFns)
Takes ownership of the named PDL constraint function from the given map and makes them available for ...
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...
Include the generated interface declarations.