MLIR  16.0.0git
BuiltinOps.h
Go to the documentation of this file.
1 //===- BuiltinOps.h - MLIR Builtin 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 // This file contains the Builtin dialect's operations.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_IR_BUILTINOPS_H_
14 #define MLIR_IR_BUILTINOPS_H_
15 
17 #include "mlir/IR/OwningOpRef.h"
19 #include "mlir/IR/SymbolTable.h"
23 #include "llvm/Support/PointerLikeTypeTraits.h"
24 
25 //===----------------------------------------------------------------------===//
26 // Dialect Operations
27 //===----------------------------------------------------------------------===//
28 
29 #define GET_OP_CLASSES
30 #include "mlir/IR/BuiltinOps.h.inc"
31 
32 namespace llvm {
33 /// Allow stealing the low bits of ModuleOp.
34 template <>
35 struct PointerLikeTypeTraits<mlir::ModuleOp> {
36 public:
37  static inline void *getAsVoidPointer(mlir::ModuleOp val) {
38  return const_cast<void *>(val.getAsOpaquePointer());
39  }
40  static inline mlir::ModuleOp getFromVoidPointer(void *p) {
41  return mlir::ModuleOp::getFromOpaquePointer(p);
42  }
43  static constexpr int numLowBitsAvailable = 3;
44 };
45 } // namespace llvm
46 
47 #endif // MLIR_IR_BUILTINOPS_H_
Include the generated interface declarations.
The OpAsmOpInterface, see OpAsmInterface.td for more details.
Definition: CallGraph.h:221
static void * getAsVoidPointer(mlir::ModuleOp val)
Definition: BuiltinOps.h:37
static mlir::ModuleOp getFromVoidPointer(void *p)
Definition: BuiltinOps.h:40