[mlir] Remove no-op array assignment in dictionaryAttrSort().

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D99954
This commit is contained in:
Christian Sigg 2021-04-06 15:43:49 +02:00
parent ceec610754
commit fcc5755878
1 changed files with 2 additions and 4 deletions

View File

@ -79,11 +79,9 @@ static bool dictionaryAttrSort(ArrayRef<NamedAttribute> value,
storage.assign(value.begin(), value.end());
// Check to see they are sorted already.
bool isSorted = llvm::is_sorted(value);
if (!isSorted) {
// If not, do a general sort.
// If not, do a general sort.
if (!isSorted)
llvm::array_pod_sort(storage.begin(), storage.end());
value = storage;
}
return !isSorted;
}
return false;