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
18namespace mlir {
19class PatternRewriter;
20} // namespace mlir
21
22#define GET_OP_CLASSES
23#include "mlir/Dialect/Func/IR/FuncOps.h.inc"
24
25namespace llvm {
26
27/// Allow stealing the low bits of FuncOp.
28template <>
29struct PointerLikeTypeTraits<mlir::func::FuncOp> {
30 static inline void *getAsVoidPointer(mlir::func::FuncOp val) {
31 return const_cast<void *>(val.getAsOpaquePointer());
32 }
33 static inline mlir::func::FuncOp getFromVoidPointer(void *p) {
34 return mlir::func::FuncOp::getFromOpaquePointer(p);
35 }
36 static constexpr int NumLowBitsAvailable = 3;
37};
38} // namespace llvm
39
40#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:229
Include the generated interface declarations.
static mlir::func::FuncOp getFromVoidPointer(void *p)
Definition FuncOps.h:33
static void * getAsVoidPointer(mlir::func::FuncOp val)
Definition FuncOps.h:30