[ConstraintElimination] Improve index handing during constraint building.
This patch improves the index management during constraint building. Previously, the code rejected constraints which used values that were not part of Value2Index, but after combining the coefficients of the new indices were 0 (if ShouldAdd was 0). In those cases, no new indices need to be added. Instead of adding to Value2Index directly, add new indices to the NewIndices map. The caller can then check if it needs to add any new indices. This enables checking constraints like `a + x <= a + n` to `x <= n`, even if there is no constraint for `a` directly.
Loading
Please sign in to comment