[Mlir-commits] [mlir] 55459f6 - [MLIR] PresburgerSet::isIntegerEmpty: address clang-tidy warning
Arjun P
llvmlistbot at llvm.org
Wed Feb 2 04:35:28 PST 2022
Author: Arjun P
Date: 2022-02-02T18:05:14+05:30
New Revision: 55459f67b4ebbc17d0f9a35d0987fb17e88b3db1
URL: https://github.com/llvm/llvm-project/commit/55459f67b4ebbc17d0f9a35d0987fb17e88b3db1
DIFF: https://github.com/llvm/llvm-project/commit/55459f67b4ebbc17d0f9a35d0987fb17e88b3db1.diff
LOG: [MLIR] PresburgerSet::isIntegerEmpty: address clang-tidy warning
Added:
Modified:
mlir/lib/Analysis/Presburger/PresburgerSet.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/Presburger/PresburgerSet.cpp b/mlir/lib/Analysis/Presburger/PresburgerSet.cpp
index 08d15bc88c74..49c04381e1c2 100644
--- a/mlir/lib/Analysis/Presburger/PresburgerSet.cpp
+++ b/mlir/lib/Analysis/Presburger/PresburgerSet.cpp
@@ -369,11 +369,9 @@ bool PresburgerSet::isEqual(const PresburgerSet &set) const {
/// false otherwise.
bool PresburgerSet::isIntegerEmpty() const {
// The set is empty iff all of the disjuncts are empty.
- for (const IntegerPolyhedron &poly : integerPolyhedrons) {
- if (!poly.isIntegerEmpty())
- return false;
- }
- return true;
+ return std::all_of(
+ integerPolyhedrons.begin(), integerPolyhedrons.end(),
+ [](const IntegerPolyhedron &poly) { return poly.isIntegerEmpty(); });
}
bool PresburgerSet::findIntegerSample(SmallVectorImpl<int64_t> &sample) {
More information about the Mlir-commits
mailing list