[flang-commits] [flang] [mlir] [MLIR][DLTI] Pretty parsing and printing for DLTI attrs (PR #113365)
Rolf Morel via flang-commits
flang-commits at lists.llvm.org
Wed Oct 30 12:26:13 PDT 2024
================
@@ -382,27 +434,46 @@ TargetDeviceSpecAttr::verify(function_ref<InFlightDiagnostic()> emitError,
LogicalResult
TargetSystemSpecAttr::verify(function_ref<InFlightDiagnostic()> emitError,
- ArrayRef<DeviceIDTargetDeviceSpecPair> entries) {
- DenseSet<TargetSystemSpecInterface::DeviceID> device_ids;
+ ArrayRef<DataLayoutEntryInterface> entries) {
+ DenseSet<TargetSystemSpecInterface::DeviceID> deviceIds;
for (const auto &entry : entries) {
- TargetDeviceSpecInterface target_device_spec = entry.second;
-
- // First verify that a target device spec is valid.
- if (failed(TargetDeviceSpecAttr::verify(emitError,
- target_device_spec.getEntries())))
- return failure();
+ auto deviceId =
+ llvm::dyn_cast<TargetSystemSpecInterface::DeviceID>(entry.getKey());
----------------
rolfmorel wrote:
Done.
https://github.com/llvm/llvm-project/pull/113365
More information about the flang-commits
mailing list