Lines Matching defs:entry

96   for (DataLayoutEntryInterface entry : params) {
98 cast<Type>(entry.getKey()).getIntOrFloatBitWidth(), entry));
109 static uint64_t extractABIAlignment(DataLayoutEntryInterface entry) {
111 cast<DenseIntElementsAttr>(entry.getValue()).getValues<uint64_t>();
133 assert(params.size() <= 1 && "at most one data layout entry is expected for "
168 static uint64_t extractPreferredAlignment(DataLayoutEntryInterface entry) {
170 cast<DenseIntElementsAttr>(entry.getValue()).getValues<uint64_t>();
187 assert(params.size() <= 1 && "at most one data layout entry is expected for "
240 // Returns the endianness if specified in the given entry. If the entry is empty
242 Attribute mlir::detail::getDefaultEndianness(DataLayoutEntryInterface entry) {
243 if (entry == DataLayoutEntryInterface())
246 return entry.getValue();
250 // given entry. If the entry is empty the default memory space represented by
253 mlir::detail::getDefaultAllocaMemorySpace(DataLayoutEntryInterface entry) {
254 if (entry == DataLayoutEntryInterface()) {
258 return entry.getValue();
262 // specified in the given entry. If the entry is empty the default
265 mlir::detail::getDefaultProgramMemorySpace(DataLayoutEntryInterface entry) {
266 if (entry == DataLayoutEntryInterface()) {
270 return entry.getValue();
274 // specified in the given entry. If the entry is empty the default memory
277 mlir::detail::getDefaultGlobalMemorySpace(DataLayoutEntryInterface entry) {
278 if (entry == DataLayoutEntryInterface()) {
282 return entry.getValue();
285 // Returns the stack alignment if specified in the given entry. If the entry is
288 mlir::detail::getDefaultStackAlignment(DataLayoutEntryInterface entry) {
289 if (entry == DataLayoutEntryInterface())
292 auto value = cast<IntegerAttr>(entry.getValue());
297 mlir::detail::getDevicePropertyValue(DataLayoutEntryInterface entry) {
298 if (entry == DataLayoutEntryInterface())
301 return entry.getValue();
308 entries, [typeID](DataLayoutEntryInterface entry) {
309 auto type = llvm::dyn_cast_if_present<Type>(entry.getKey());
317 const auto *it = llvm::find_if(entries, [id](DataLayoutEntryInterface entry) {
318 if (auto attr = dyn_cast<StringAttr>(entry.getKey()))
587 DataLayoutEntryInterface entry;
589 entry = originalLayout.getSpecForIdentifier(
593 endianness = iface.getEndianness(entry);
595 endianness = detail::getDefaultEndianness(entry);
603 DataLayoutEntryInterface entry;
605 entry = originalLayout.getSpecForIdentifier(
609 allocaMemorySpace = iface.getAllocaMemorySpace(entry);
611 allocaMemorySpace = detail::getDefaultAllocaMemorySpace(entry);
619 DataLayoutEntryInterface entry;
621 entry = originalLayout.getSpecForIdentifier(
625 programMemorySpace = iface.getProgramMemorySpace(entry);
627 programMemorySpace = detail::getDefaultProgramMemorySpace(entry);
635 DataLayoutEntryInterface entry;
637 entry = originalLayout.getSpecForIdentifier(
641 globalMemorySpace = iface.getGlobalMemorySpace(entry);
643 globalMemorySpace = detail::getDefaultGlobalMemorySpace(entry);
651 DataLayoutEntryInterface entry;
653 entry = originalLayout.getSpecForIdentifier(
657 stackAlignment = iface.getStackAlignment(entry);
659 stackAlignment = detail::getDefaultStackAlignment(entry);
667 DataLayoutEntryInterface entry;
671 entry = device->getSpecForIdentifier(propertyName);
678 return iface.getDevicePropertyValue(entry);
680 return detail::getDevicePropertyValue(entry);
690 for (DataLayoutEntryInterface entry : getEntries()) {
691 if (auto type = llvm::dyn_cast_if_present<Type>(entry.getKey()))
692 types[type.getTypeID()].push_back(entry);
694 ids[llvm::cast<StringAttr>(entry.getKey())] = entry;
701 for (DataLayoutEntryInterface entry : spec.getEntries())
702 if (failed(entry.verifyEntry(loc)))
705 // Second, dispatch verifications of entry groups to types or dialects they
715 "expected one data layout entry for non-parametric 'index' type");
718 << "expected integer attribute in the data layout entry for "
724 for (DataLayoutEntryInterface entry : kvp.second) {
725 auto value = dyn_cast<DenseIntElementsAttr>(entry.getValue());
728 "data layout entry "
729 << entry;
736 emitError(loc) << "expected 1 or 2 elements in the data layout entry "
737 << entry;
746 "to the abi alignment in data layout entry "
747 << entry;
792 for (const auto &entry : spec.getEntries()) {
794 dyn_cast<TargetDeviceSpecInterface>(entry.getValue());
805 llvm::dyn_cast<TargetSystemSpecInterface::DeviceID>(entry.getKey());
814 for (DataLayoutEntryInterface entry : targetDeviceSpec.getEntries()) {
815 if (auto type = llvm::dyn_cast_if_present<Type>(entry.getKey())) {
819 deviceDescKeys[cast<StringAttr>(entry.getKey())] = entry;