18 mlir::StringAttr key = mlir::StringAttr::get(
19 spec.getContext(), mlir::DLTIDialect::kDataLayoutEndiannessKey);
20 if (mlir::DataLayoutEntryInterface entry = spec.getSpecForIdentifier(key))
21 if (
auto str = llvm::dyn_cast<mlir::StringAttr>(entry.getValue()))
22 bigEndian = str == mlir::DLTIDialect::kDataLayoutEndiannessBig;
24 mlir::StringAttr addrSpKey = mlir::StringAttr::get(
25 spec.getContext(), mlir::DLTIDialect::kDataLayoutProgramMemorySpaceKey);
26 if (mlir::DataLayoutEntryInterface entry =
27 spec.getSpecForIdentifier(addrSpKey))
28 if (
auto val = llvm::dyn_cast<mlir::IntegerAttr>(entry.getValue()))
29 programAddrSpace = val.getInt();