https://github.com/matthias-springer created https://github.com/llvm/llvm-project/pull/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. >From 12e7e8880621483918e7a3e2a99bf3eec13eb899 Mon Sep 17 00:00:00 2001 From: Matthias Springer <spring...@google.com> Date: Thu, 21 Mar 2024 08:01:01 +0000 Subject: [PATCH] [mlir][Interfaces][NFC] `ValueBoundsConstraintSet`: Delete dead code 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. --- mlir/lib/Interfaces/ValueBoundsOpInterface.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp index 02af3a83166dfb..f2f732f3a21d25 100644 --- a/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp +++ b/mlir/lib/Interfaces/ValueBoundsOpInterface.cpp @@ -321,18 +321,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)); _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits