//===- IRMapping.h ----------------------------------------------*- 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 defines a utility class for maintaining a mapping of SSA values, // blocks, and operations. // //===----------------------------------------------------------------------===// #ifndef MLIR_IR_IRMAPPING_H #define MLIR_IR_IRMAPPING_H #include "mlir/IR/Block.h" namespace mlir { /// This is a utility class for mapping one set of IR entities to another. New /// mappings can be inserted via 'map'. Existing mappings can be /// found via the 'lookup*' functions. There are three variants that differ only /// in return value when an existing is not found for the provided key: SSA /// values, blocks, and operations. 'lookupOrNull' returns nullptr where as /// 'lookupOrDefault' will return the lookup key. class IRMapping { … }; } // namespace mlir #endif // MLIR_IR_IRMAPPING_H