[llvm] [ConstraintSystem] Update comments (PR #127351)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 3 02:17:43 PDT 2025


================
@@ -92,6 +101,14 @@ bool ConstraintSystem::eliminateUsingFM() {
           IdxUpper++;
         }
 
+        // The new coefficient for CurrentId is
+        // N = UpperV * (-1) * LowerLast + LowerV * UpperLast
+        //
+        // LowerRow: { 0,  1, -2 }, UpperLast: 3
+        // UpperRow: { 3,  2,  3 }, LowerLast: -2
+        //
+        // Multiply by -1 is to ensure the last variable has opposite sign,
+        // so that it can be eliminated with addition.
----------------
dtcxzyw wrote:

```suggestion
```
It only operates on coefficients, not variables. You can just mention that it is a variant of sparse Gaussian elimination.


https://github.com/llvm/llvm-project/pull/127351


More information about the llvm-commits mailing list