MLIR 24.0.0git
FuncOps.h
Go to the documentation of this file.
1//===- FuncOps.h - Func Dialect Operations ----------------------*- 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_FUNC_IR_OPS_H
10#define MLIR_DIALECT_FUNC_IR_OPS_H
11
14#include "mlir/IR/Builders.h"
17#include "mlir/IR/SymbolTable.h"
23
24namespace mlir {
25class PatternRewriter;
26} // namespace mlir
27
28#define GET_OP_CLASSES
29#include "mlir/Dialect/Func/IR/FuncOps.h.inc"
30
31namespace llvm {
32
33/// Allow stealing the low bits of FuncOp.
34template <>
35struct PointerLikeTypeTraits<mlir::func::FuncOp> {
36 static inline void *getAsVoidPointer(mlir::func::FuncOp val) {
37 return const_cast<void *>(val.getAsOpaquePointer());
38 }
39 static inline mlir::func::FuncOp getFromVoidPointer(void *p) {
40 return mlir::func::FuncOp::getFromOpaquePointer(p);
41 }
42 static constexpr int NumLowBitsAvailable = 3;
43};
44} // namespace llvm
45
46#endif // MLIR_DIALECT_FUNC_IR_OPS_H
A special type of RewriterBase that coordinates the application of a rewrite pattern on the current I...
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Definition CallGraph.h:227
Include the generated interface declarations.
static mlir::func::FuncOp getFromVoidPointer(void *p)
Definition FuncOps.h:39
static void * getAsVoidPointer(mlir::func::FuncOp val)
Definition FuncOps.h:36