MLIR  16.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 
12 #include "mlir/IR/Builders.h"
13 #include "mlir/IR/BuiltinTypes.h"
14 #include "mlir/IR/Dialect.h"
17 #include "mlir/IR/SymbolTable.h"
22 
23 namespace mlir {
24 class PatternRewriter;
25 } // namespace mlir
26 
27 #define GET_OP_CLASSES
28 #include "mlir/Dialect/Func/IR/FuncOps.h.inc"
29 
30 #include "mlir/Dialect/Func/IR/FuncOpsDialect.h.inc"
31 
32 namespace llvm {
33 
34 /// Allow stealing the low bits of FuncOp.
35 template <>
36 struct 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
Include the generated interface declarations.
Definition: CallGraph.h:229
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