[Mlir-commits] [mlir] ad48ef1 - [MLIR][NFC] Simplex::restoreRow: improve documentation

Arjun P llvmlistbot at llvm.org
Sun Nov 21 05:55:06 PST 2021


Author: Arjun P
Date: 2021-11-21T19:23:55+05:30
New Revision: ad48ef1e3142aafcf23ab9b8037e96c9208c2074

URL: https://github.com/llvm/llvm-project/commit/ad48ef1e3142aafcf23ab9b8037e96c9208c2074
DIFF: https://github.com/llvm/llvm-project/commit/ad48ef1e3142aafcf23ab9b8037e96c9208c2074.diff

LOG: [MLIR][NFC] Simplex::restoreRow: improve documentation

Added: 
    

Modified: 
    mlir/include/mlir/Analysis/Presburger/Simplex.h
    mlir/lib/Analysis/Presburger/Simplex.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Analysis/Presburger/Simplex.h b/mlir/include/mlir/Analysis/Presburger/Simplex.h
index e400f700ec1af..99632ef6b19af 100644
--- a/mlir/include/mlir/Analysis/Presburger/Simplex.h
+++ b/mlir/include/mlir/Analysis/Presburger/Simplex.h
@@ -310,8 +310,8 @@ class Simplex {
 
   /// Restore the unknown to a non-negative sample value.
   ///
-  /// Returns true if the unknown was successfully restored to a non-negative
-  /// sample value, false otherwise.
+  /// Returns success if the unknown was successfully restored to a non-negative
+  /// sample value, failure otherwise.
   LogicalResult restoreRow(Unknown &u);
 
   /// Compute the maximum or minimum of the specified Unknown, depending on

diff  --git a/mlir/lib/Analysis/Presburger/Simplex.cpp b/mlir/lib/Analysis/Presburger/Simplex.cpp
index 577388b609ca0..a56213c09c007 100644
--- a/mlir/lib/Analysis/Presburger/Simplex.cpp
+++ b/mlir/lib/Analysis/Presburger/Simplex.cpp
@@ -259,8 +259,8 @@ void Simplex::pivot(unsigned pivotRow, unsigned pivotCol) {
 }
 
 /// Perform pivots until the unknown has a non-negative sample value or until
-/// no more upward pivots can be performed. Return the sign of the final sample
-/// value.
+/// no more upward pivots can be performed. Return success if we were able to
+/// bring the row to a non-negative sample value, and failure otherwise.
 LogicalResult Simplex::restoreRow(Unknown &u) {
   assert(u.orientation == Orientation::Row &&
          "unknown should be in row position");


        


More information about the Mlir-commits mailing list