[Mlir-commits] [mlir] 3b7b4a8 - [MLIR][NFC] Simplex::markRowRedundant: assert that row is not already marked redundant
Arjun P
llvmlistbot at llvm.org
Thu Nov 18 14:13:28 PST 2021
Author: Arjun P
Date: 2021-11-19T03:43:25+05:30
New Revision: 3b7b4a80414579bcf0b6318b8c63f8f5c65bc441
URL: https://github.com/llvm/llvm-project/commit/3b7b4a80414579bcf0b6318b8c63f8f5c65bc441
DIFF: https://github.com/llvm/llvm-project/commit/3b7b4a80414579bcf0b6318b8c63f8f5c65bc441.diff
LOG: [MLIR][NFC] Simplex::markRowRedundant: assert that row is not already marked redundant
Added:
Modified:
mlir/lib/Analysis/Presburger/Simplex.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Analysis/Presburger/Simplex.cpp b/mlir/lib/Analysis/Presburger/Simplex.cpp
index 26b4c60e31399..577388b609ca0 100644
--- a/mlir/lib/Analysis/Presburger/Simplex.cpp
+++ b/mlir/lib/Analysis/Presburger/Simplex.cpp
@@ -581,6 +581,7 @@ bool Simplex::isMarkedRedundant(unsigned constraintIndex) const {
void Simplex::markRowRedundant(Unknown &u) {
assert(u.orientation == Orientation::Row &&
"Unknown should be in row position!");
+ assert(u.pos >= nRedundant && "Unknown is already marked redundant!");
swapRows(u.pos, nRedundant);
++nRedundant;
undoLog.emplace_back(UndoLogEntry::UnmarkLastRedundant);
More information about the Mlir-commits
mailing list