Files
gps/tools/local/circt/include/mlir/Interfaces/DataLayoutDialectInterface.h.inc
T
2026-07-12 11:01:51 +03:00

50 lines
2.3 KiB
C++

/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Dialect Interface Declarations *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
namespace mlir {
/// An interface to be implemented by dialects that can have identifiers in the
/// data layout specification entries. Provides hooks for verifying the entry
/// validity and combining two entries.
class DataLayoutDialectInterface : public ::mlir::DialectInterface::Base<DataLayoutDialectInterface> {
public:
/// Checks whether the given data layout entry is valid and reports any errors
/// at the provided location. Derived classes should override this.
virtual ::mlir::LogicalResult verifyEntry(::mlir::DataLayoutEntryInterface entry, ::mlir::Location loc) const {
return ::llvm::success();
}
/// Checks whether the given data layout entry is valid and reports any errors
/// at the provided location. Derived classes should override this.
virtual ::mlir::LogicalResult verifyEntry(::mlir::TargetDeviceSpecInterface entry, ::mlir::Location loc) const {
return ::llvm::success();
}
/// Combines two entries with identifiers that belong to this dialect. Returns
/// the combined entry or null if the entries are not compatible. Derived
/// classes likely need to reimplement this.
virtual ::mlir::DataLayoutEntryInterface combine(::mlir::DataLayoutEntryInterface outer, ::mlir::DataLayoutEntryInterface inner) const {
return defaultCombine(outer, inner);
}
/// Default implementation of entry combination that combines identical
/// entries and returns null otherwise.
static ::mlir::DataLayoutEntryInterface
defaultCombine(::mlir::DataLayoutEntryInterface outer,
::mlir::DataLayoutEntryInterface inner) {
if (!outer || outer == inner)
return inner;
return {};
}
DataLayoutDialectInterface(::mlir::Dialect *dialect) : Base(dialect) {}
};
} // namespace mlir