Skip to content

Commit 26029a7

Browse files
committed
Delete unnecessary smallDenseSet
1 parent 84b1b62 commit 26029a7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

mlir/lib/Analysis/Presburger/IntegerRelation.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "mlir/Analysis/Presburger/Simplex.h"
2222
#include "mlir/Analysis/Presburger/Utils.h"
2323
#include "llvm/ADT/DenseMap.h"
24-
#include "llvm/ADT/DenseSet.h"
2524
#include "llvm/ADT/STLExtras.h"
2625
#include "llvm/ADT/Sequence.h"
2726
#include "llvm/ADT/SmallBitVector.h"
@@ -45,7 +44,6 @@ using namespace mlir;
4544
using namespace presburger;
4645

4746
using llvm::SmallDenseMap;
48-
using llvm::SmallDenseSet;
4947

5048
std::unique_ptr<IntegerRelation> IntegerRelation::clone() const {
5149
return std::make_unique<IntegerRelation>(*this);
@@ -1824,8 +1822,6 @@ void IntegerRelation::removeTrivialRedundancy() {
18241822
// for a given row.
18251823
SmallDenseMap<ArrayRef<DynamicAPInt>, std::pair<unsigned, DynamicAPInt>>
18261824
rowsWithoutConstTerm;
1827-
// To unique rows.
1828-
SmallDenseSet<ArrayRef<DynamicAPInt>, 8> rowSet;
18291825

18301826
// Check if constraint is of the form <non-negative-constant> >= 0.
18311827
auto isTriviallyValid = [&](unsigned r) -> bool {
@@ -1840,8 +1836,7 @@ void IntegerRelation::removeTrivialRedundancy() {
18401836
SmallVector<bool, 256> redunIneq(getNumInequalities(), false);
18411837
for (unsigned r = 0, e = getNumInequalities(); r < e; r++) {
18421838
DynamicAPInt *rowStart = &inequalities(r, 0);
1843-
auto row = ArrayRef<DynamicAPInt>(rowStart, getNumCols());
1844-
if (isTriviallyValid(r) || !rowSet.insert(row).second) {
1839+
if (isTriviallyValid(r)) {
18451840
redunIneq[r] = true;
18461841
continue;
18471842
}

0 commit comments

Comments
 (0)