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
15#include "mlir/IR/Builders.h"
18#include "mlir/IR/SymbolTable.h"
24
25namespace mlir {
26class PatternRewriter;
27} // namespace mlir
28
29#define GET_OP_CLASSES
30#include "mlir/Dialect/Func/IR/FuncOps.h.inc"
31
32namespace llvm {
33
34/// Allow stealing the low bits of FuncOp.
35template <>
36struct PointerLikeTypeTraits<mlir::func::FuncOp> {
37 static inline void *getAsVoidPointer(mlir::func::FuncOp val) {
38 return const_cast<void *>(val.getAsOpaquePointer());
39 }
40 static inline mlir::func::FuncOp getFromVoidPointer(void *p) {
41 return mlir::func::FuncOp::getFromOpaquePointer(p);
42 }
43 static constexpr int NumLowBitsAvailable = 3;
44};
45} // namespace llvm
46
47#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:40
static void * getAsVoidPointer(mlir::func::FuncOp val)
Definition FuncOps.h:37