MLIR 22.0.0git
mlir::dialect_extension_detail Namespace Reference

Functions

void handleUseOfUndefinedPromisedInterface (Dialect &dialect, TypeID interfaceRequestorID, TypeID interfaceID, StringRef interfaceName)
 Checks if the given interface, which is attempting to be used, is a promised interface of this dialect that has yet to be implemented.
void handleAdditionOfUndefinedPromisedInterface (Dialect &dialect, TypeID interfaceRequestorID, TypeID interfaceID)
 Checks if the given interface, which is attempting to be attached, is a promised interface of this dialect that has yet to be implemented.
bool hasPromisedInterface (Dialect &dialect, TypeID interfaceRequestorID, TypeID interfaceID)
 Checks if a promise has been made for the interface/requestor pair.
template<typename ConcreteT, typename InterfaceT>
bool hasPromisedInterface (Dialect &dialect)
 Checks if a promise has been made for the interface/requestor pair.

Function Documentation

◆ handleAdditionOfUndefinedPromisedInterface()

void mlir::dialect_extension_detail::handleAdditionOfUndefinedPromisedInterface ( Dialect & dialect,
TypeID interfaceRequestorID,
TypeID interfaceID )

Checks if the given interface, which is attempting to be attached, is a promised interface of this dialect that has yet to be implemented.

If so, the promised interface is marked as resolved.

Definition at line 157 of file Dialect.cpp.

References mlir::Dialect::handleAdditionOfUndefinedPromisedInterface().

Referenced by mlir::detail::StorageUserBase< ConcreteType, BaseType, StorageType, detail::AttributeUniquer, Traits... >::attachInterface(), and mlir::OperationName::attachInterface().

◆ handleUseOfUndefinedPromisedInterface()

void mlir::dialect_extension_detail::handleUseOfUndefinedPromisedInterface ( Dialect & dialect,
TypeID interfaceRequestorID,
TypeID interfaceID,
StringRef interfaceName )

Checks if the given interface, which is attempting to be used, is a promised interface of this dialect that has yet to be implemented.

If so, emits a fatal error.

Definition at line 150 of file Dialect.cpp.

References mlir::Dialect::handleUseOfUndefinedPromisedInterface().

Referenced by mlir::AttributeInterface< ConcreteType, Traits >::getInterfaceFor(), mlir::OpInterface< ConcreteType, Traits >::getInterfaceFor(), and mlir::TypeInterface< ConcreteType, Traits >::getInterfaceFor().

◆ hasPromisedInterface() [1/2]

template<typename ConcreteT, typename InterfaceT>
bool mlir::dialect_extension_detail::hasPromisedInterface ( Dialect & dialect)

Checks if a promise has been made for the interface/requestor pair.

Definition at line 123 of file DialectRegistry.h.

References mlir::TypeID::get(), and hasPromisedInterface().

◆ hasPromisedInterface() [2/2]

bool mlir::dialect_extension_detail::hasPromisedInterface ( Dialect & dialect,
TypeID interfaceRequestorID,
TypeID interfaceID )