We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02022cc commit 55459f6Copy full SHA for 55459f6
mlir/lib/Analysis/Presburger/PresburgerSet.cpp
@@ -369,11 +369,9 @@ bool PresburgerSet::isEqual(const PresburgerSet &set) const {
369
/// false otherwise.
370
bool PresburgerSet::isIntegerEmpty() const {
371
// The set is empty iff all of the disjuncts are empty.
372
- for (const IntegerPolyhedron &poly : integerPolyhedrons) {
373
- if (!poly.isIntegerEmpty())
374
- return false;
375
- }
376
- return true;
+ return std::all_of(
+ integerPolyhedrons.begin(), integerPolyhedrons.end(),
+ [](const IntegerPolyhedron &poly) { return poly.isIntegerEmpty(); });
377
}
378
379
bool PresburgerSet::findIntegerSample(SmallVectorImpl<int64_t> &sample) {
0 commit comments