Lines Matching defs:dialect
50 static Operation *materializeConstant(Dialect *dialect, OpBuilder &builder,
56 // Ask the dialect to materialize a constant operation for this value.
57 if (auto *constOp = dialect->materializeConstant(builder, value, type, loc)) {
189 for (auto *dialect : it->second)
190 uniquedConstants.erase(std::make_tuple(dialect, constValue, type));
202 Value OperationFolder::getOrCreateConstant(Block *block, Dialect *dialect,
212 Operation *constOp = tryGetOrCreateConstant(uniquedConstants, dialect, value,
251 auto *dialect = op->getDialect();
265 tryGetOrCreateConstant(uniquedConstants, dialect, attrRepl,
296 Dialect *dialect, Attribute value,
299 auto constKey = std::make_tuple(dialect, value, type);
308 if (!(constOp = materializeConstant(dialect, rewriter, value, type, loc)))
311 // Check to see if the generated constant is in the expected dialect.
313 if (newDialect == dialect) {
314 referencedDialects[constOp].push_back(dialect);
319 // dialect is valid.
322 // If an existing operation in the new dialect already exists, delete the
327 referencedDialects[existingOp].push_back(dialect);
333 // Otherwise, update the new dialect to the materialized operation.
334 referencedDialects[constOp].assign({dialect, newDialect});