Lines Matching defs:impl
290 : impl(new MLIRContextImpl(setting == Threading::ENABLED &&
299 registry.appendTo(impl->dialectsRegistry);
309 impl->bf16Ty = TypeUniquer::get<BFloat16Type>(this);
310 impl->f16Ty = TypeUniquer::get<Float16Type>(this);
311 impl->tf32Ty = TypeUniquer::get<FloatTF32Type>(this);
312 impl->f32Ty = TypeUniquer::get<Float32Type>(this);
313 impl->f64Ty = TypeUniquer::get<Float64Type>(this);
314 impl->f80Ty = TypeUniquer::get<Float80Type>(this);
315 impl->f128Ty = TypeUniquer::get<Float128Type>(this);
317 impl->indexTy = TypeUniquer::get<IndexType>(this);
319 impl->int1Ty = TypeUniquer::get<IntegerType>(this, 1, IntegerType::Signless);
320 impl->int8Ty = TypeUniquer::get<IntegerType>(this, 8, IntegerType::Signless);
321 impl->int16Ty =
323 impl->int32Ty =
325 impl->int64Ty =
327 impl->int128Ty =
330 impl->noneType = TypeUniquer::get<NoneType>(this);
336 impl->unknownLocAttr = AttributeUniquer::get<UnknownLoc>(this);
338 impl->falseAttr = IntegerAttr::getBoolAttrUnchecked(impl->int1Ty, false);
339 impl->trueAttr = IntegerAttr::getBoolAttrUnchecked(impl->int1Ty, true);
341 impl->unitAttr = AttributeUniquer::get<UnitAttr>(this);
343 impl->emptyDictionaryAttr = DictionaryAttr::getEmptyUnchecked(this);
345 impl->emptyStringAttr = StringAttr::getEmptyStringAttrUnchecked(this);
348 impl->affineUniquer
350 impl->affineUniquer
352 impl->affineUniquer.registerParametricStorageType<AffineDimExprStorage>();
353 impl->affineUniquer.registerParametricStorageType<AffineMapStorage>();
354 impl->affineUniquer.registerParametricStorageType<IntegerSetStorage>();
398 if (registry.isSubsetOf(impl->dialectsRegistry))
401 assert(impl->multiThreadedExecutionContext == 0 &&
404 registry.appendTo(impl->dialectsRegistry);
411 return impl->dialectsRegistry;
417 result.reserve(impl->loadedDialects.size());
418 for (auto &dialect : impl->loadedDialects)
428 for (auto dialect : impl->dialectsRegistry.getDialectNames())
437 auto it = impl->loadedDialects.find(name);
438 return (it != impl->loadedDialects.end()) ? it->second.get() : nullptr;
446 impl->dialectsRegistry.getDialectAllocator(name);
456 auto &impl = getImpl();
458 auto dialectIt = impl.loadedDialects.try_emplace(dialectNamespace, nullptr);
464 if (impl.multiThreadedExecutionContext != 0)
476 impl.loadedDialects[dialectNamespace] = ctor();
483 auto stringAttrsIt = impl.dialectReferencingStrAttrs.find(dialectNamespace);
484 if (stringAttrsIt != impl.dialectReferencingStrAttrs.end()) {
487 impl.dialectReferencingStrAttrs.erase(stringAttrsIt);
491 impl.dialectsRegistry.applyExtensions(dialect);
520 auto &impl = getImpl();
522 auto dialectIt = impl.loadedDialects.find(dialectNamespace);
524 if (dialectIt != impl.loadedDialects.end()) {
534 if (impl.multiThreadedExecutionContext != 0)
561 hash = llvm::hash_combine(hash, impl->loadedDialects.size());
562 hash = llvm::hash_combine(hash, impl->registeredAttributes.size());
563 hash = llvm::hash_combine(hash, impl->registeredOperations.size());
564 hash = llvm::hash_combine(hash, impl->registeredTypes.size());
569 return impl->allowUnregisteredDialects;
573 assert(impl->multiThreadedExecutionContext == 0 &&
576 impl->allowUnregisteredDialects = allowing;
581 return impl->threadingIsEnabled && llvm::llvm_is_multithreaded();
590 assert(impl->multiThreadedExecutionContext == 0 &&
594 impl->threadingIsEnabled = !disable;
597 impl->affineUniquer.disableMultithreading(disable);
598 impl->attributeUniquer.disableMultithreading(disable);
599 impl->typeUniquer.disableMultithreading(disable);
607 if (impl->ownedThreadPool) {
608 assert(impl->threadPool);
609 impl->threadPool = nullptr;
610 impl->ownedThreadPool.reset();
612 } else if (!impl->threadPool) {
614 assert(!impl->ownedThreadPool);
615 impl->ownedThreadPool = std::make_unique<llvm::DefaultThreadPool>();
616 impl->threadPool = impl->ownedThreadPool.get();
623 impl->threadPool = &pool;
624 impl->ownedThreadPool.reset();
630 assert(impl->threadPool &&
632 return impl->threadPool->getMaxConcurrency();
641 assert(impl->threadPool &&
643 return *impl->threadPool;
648 ++impl->multiThreadedExecutionContext;
653 --impl->multiThreadedExecutionContext;
660 return impl->printOpOnDiagnostic;
666 assert(impl->multiThreadedExecutionContext == 0 &&
669 impl->printOpOnDiagnostic = enable;
675 return impl->printStackTraceOnDiagnostic;
681 assert(impl->multiThreadedExecutionContext == 0 &&
684 impl->printStackTraceOnDiagnostic = enable;
689 return impl->sortedRegisteredOperations;
696 std::lower_bound(impl->sortedRegisteredOperations.begin(),
697 impl->sortedRegisteredOperations.end(), dialectName,
702 if (lowerBound == impl->sortedRegisteredOperations.end() ||
707 std::upper_bound(lowerBound, impl->sortedRegisteredOperations.end(),
721 auto &impl = context->getImpl();
722 assert(impl.multiThreadedExecutionContext == 0 &&
726 new (impl.abstractDialectSymbolAllocator.Allocate<AbstractType>())
728 if (!impl.registeredTypes.insert({typeID, newInfo}).second)
730 if (!impl.nameToType.insert({newInfo->getName(), newInfo}).second)
736 auto &impl = context->getImpl();
737 assert(impl.multiThreadedExecutionContext == 0 &&
741 new (impl.abstractDialectSymbolAllocator.Allocate<AbstractAttribute>())
743 if (!impl.registeredAttributes.insert({typeID, newInfo}).second)
745 if (!impl.nameToAttribute.insert({newInfo->getName(), newInfo}).second)
766 auto &impl = context->getImpl();
767 return impl.registeredAttributes.lookup(typeID);
772 MLIRContextImpl &impl = context->getImpl();
773 const AbstractAttribute *type = impl.nameToAttribute.lookup(name);
800 impl = registeredIt->second.impl;
807 impl = it->second.get();
822 impl = it.first->second.get();
928 auto &impl = ctx->getImpl();
929 auto it = impl.registeredOperations.find(typeID);
930 if (it != impl.registeredOperations.end())
937 auto &impl = ctx->getImpl();
938 auto it = impl.registeredOperationsByName.find(name);
939 if (it != impl.registeredOperationsByName.end())
947 RegisteredOperationName::Impl *impl = ownedImpl.get();
948 MLIRContext *ctx = impl->getDialect()->getContext();
963 impl->attributeNames = cachedAttrNames;
965 StringRef name = impl->getName().strref();
971 impl->getTypeID(), RegisteredOperationName(impl));
974 name, RegisteredOperationName(impl));
1003 auto &impl = context->getImpl();
1004 return impl.registeredTypes.lookup(typeID);
1009 MLIRContextImpl &impl = context->getImpl();
1010 const AbstractType *type = impl.nameToType.lookup(name);
1157 MLIRContextImpl &impl = context->getImpl();
1158 llvm::sys::SmartScopedLock<true> lock(impl.dialectRefStrAttrMutex);
1159 impl.dialectReferencingStrAttrs[dialectNamePair.first].push_back(this);
1178 auto &impl = context->getImpl();
1179 auto *storage = impl.affineUniquer.get<AffineMapStorage>(
1241 auto &impl = constraints[0].getContext()->getImpl();
1242 auto *storage = impl.affineUniquer.get<IntegerSetStorage>(