//===- IRNumbering.h - MLIR bytecode IR numbering ---------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file contains various utilities that number IR structures in preparation // for bytecode emission. // //===----------------------------------------------------------------------===// #ifndef LIB_MLIR_BYTECODE_WRITER_IRNUMBERING_H #define LIB_MLIR_BYTECODE_WRITER_IRNUMBERING_H #include "mlir/IR/OpImplementation.h" #include "llvm/ADT/MapVector.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/StringMap.h" #include <cstdint> namespace mlir { class BytecodeDialectInterface; class BytecodeWriterConfig; namespace bytecode { namespace detail { struct DialectNumbering; //===----------------------------------------------------------------------===// // Attribute and Type Numbering //===----------------------------------------------------------------------===// /// This class represents a numbering entry for an Attribute or Type. struct AttrTypeNumbering { … }; struct AttributeNumbering : public AttrTypeNumbering { … }; struct TypeNumbering : public AttrTypeNumbering { … }; //===----------------------------------------------------------------------===// // OpName Numbering //===----------------------------------------------------------------------===// /// This class represents the numbering entry of an operation name. struct OpNameNumbering { … }; //===----------------------------------------------------------------------===// // Dialect Resource Numbering //===----------------------------------------------------------------------===// /// This class represents a numbering entry for a dialect resource. struct DialectResourceNumbering { … }; //===----------------------------------------------------------------------===// // Dialect Numbering //===----------------------------------------------------------------------===// /// This class represents a numbering entry for an Dialect. struct DialectNumbering { … }; //===----------------------------------------------------------------------===// // Operation Numbering //===----------------------------------------------------------------------===// /// This class represents the numbering entry of an operation. struct OperationNumbering { … }; //===----------------------------------------------------------------------===// // IRNumberingState //===----------------------------------------------------------------------===// /// This class manages numbering IR entities in preparation of bytecode /// emission. class IRNumberingState { … }; } // namespace detail } // namespace bytecode } // namespace mlir #endif