[Mlir-commits] [mlir] d542cb3 - [mlir][Interfaces][NFC] `ValueBoundsConstraintSet`: Delete dead code (#86098)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Apr 4 00:56:34 PDT 2024


Author: Matthias Springer
Date: 2024-04-04T16:56:31+09:00
New Revision: d542cb3175f0c5691808b9c50234788c7be1154f

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

LOG: [mlir][Interfaces][NFC] `ValueBoundsConstraintSet`: Delete dead code (#86098)

There is an assertion that the stop condition is not satisfied for the
the starting point at the beginning of `computeBound`. Therefore, that
case does not have to be handled later on in that function.

Added: 
    

Modified: 
    mlir/lib/Interfaces/ValueBoundsOpInterface.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
index 99598f2e89d989..9a3185d55d6e83 100644
--- a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
+++ b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp
@@ -286,18 +286,6 @@ LogicalResult ValueBoundsConstraintSet::computeBound(
   Builder b(value.getContext());
   mapOperands.clear();
 
-  if (stopCondition(value, dim)) {
-    // Special case: If the stop condition is satisfied for the input
-    // value/dimension, directly return it.
-    mapOperands.push_back(std::make_pair(value, dim));
-    AffineExpr bound = b.getAffineDimExpr(0);
-    if (type == BoundType::UB)
-      bound = bound + ubAdjustment;
-    resultMap = AffineMap::get(/*dimCount=*/1, /*symbolCount=*/0,
-                               b.getAffineDimExpr(0));
-    return success();
-  }
-
   // Process the backward slice of `value` (i.e., reverse use-def chain) until
   // `stopCondition` is met.
   ValueDim valueDim = std::make_pair(value, dim.value_or(kIndexValue));


        


More information about the Mlir-commits mailing list