Lines Matching defs:dialect

29 #define DEBUG_TYPE "dialect"
40 assert(isValidNamespace(name) && "invalid dialect namespace");
45 /// Verify an attribute from this dialect on the argument at 'argIndex' for
54 /// Verify an attribute from this dialect on the result at 'resultIndex' for
63 /// Parse an attribute registered to this dialect.
66 << "dialect '" << getNamespace()
71 /// Parse a type registered to this dialect.
73 // If this dialect allows unknown types, then represent this with OpaqueType.
80 << "dialect '" << getNamespace() << "' provides no type parsing hook";
92 "Dialect hook invoked on non-dialect owned operation");
96 /// Utility function that returns if the given string is a valid dialect
103 /// Register a set of dialect interfaces with this dialect instance.
114 "] repeated interface registration for dialect "
127 return dialect->getContext();
132 for (auto *dialect : ctx->getLoadedDialects()) {
134 dialect->handleUseOfUndefinedPromisedInterface(
135 dialect->getTypeID(), interfaceKind, interfaceName);
137 if (auto *interface = dialect->getRegisteredInterface(interfaceKind)) {
146 /// Get the interface for the dialect of given operation, or null if one
160 Dialect &dialect, TypeID interfaceRequestorID, TypeID interfaceID,
162 dialect.handleUseOfUndefinedPromisedInterface(interfaceRequestorID,
167 Dialect &dialect, TypeID interfaceRequestorID, TypeID interfaceID) {
168 dialect.handleAdditionOfUndefinedPromisedInterface(interfaceRequestorID,
172 bool dialect_extension_detail::hasPromisedInterface(Dialect &dialect,
175 return dialect.hasPromisedInterface(interfaceRequestorID, interfaceID);
240 // dialect yet, since the TypeID of a dynamic dialect is defined at its
244 // Create the dialect, and then call ctor, which allocates its components.
247 nameStr, [ctx, ctor](DynamicDialect *dialect) { ctor(ctx, dialect); });
248 assert(dynDialect && "Dynamic dialect creation unexpectedly failed");
255 void DialectRegistry::applyExtensions(Dialect *dialect) const {
256 MLIRContext *ctx = dialect->getContext();
257 StringRef dialectName = dialect->getNamespace();
264 extension.apply(ctx, dialect);
268 // Handle the simple case of a single dialect name. In this case, the
269 // required dialect should be the current dialect.
272 extension.apply(ctx, dialect);
276 // Otherwise, check to see if this extension requires this dialect.
287 // The current dialect is known to be loaded.
289 requiredDialects.push_back(dialect);