projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ceec610
)
[mlir] Remove no-op array assignment in dictionaryAttrSort().
author
Christian Sigg
<csigg@google.com>
Tue, 6 Apr 2021 13:43:49 +0000
(15:43 +0200)
committer
Christian Sigg
<csigg@google.com>
Tue, 6 Apr 2021 19:30:37 +0000
(21:30 +0200)
Reviewed By: rriddle
Differential Revision: https://reviews.llvm.org/D99954
mlir/lib/IR/BuiltinAttributes.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/IR/BuiltinAttributes.cpp
b/mlir/lib/IR/BuiltinAttributes.cpp
index
a7b1a6c
..
8ef7c26
100644
(file)
--- a/
mlir/lib/IR/BuiltinAttributes.cpp
+++ b/
mlir/lib/IR/BuiltinAttributes.cpp
@@
-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;