From: Mehdi Amini Date: Fri, 10 May 2019 16:29:20 +0000 (-0700) Subject: Remove unused `hasSingleNonZeroAt` function (NFC) X-Git-Tag: llvmorg-11-init~1466^2~1768 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c86dc1c1270d41fe723f0ba5d1397b39e4b404b6;p=platform%2Fupstream%2Fllvm.git Remove unused `hasSingleNonZeroAt` function (NFC) Fix clang warning. -- PiperOrigin-RevId: 247623306 --- diff --git a/mlir/lib/Analysis/AffineAnalysis.cpp b/mlir/lib/Analysis/AffineAnalysis.cpp index ad9a87b..c1f455e 100644 --- a/mlir/lib/Analysis/AffineAnalysis.cpp +++ b/mlir/lib/Analysis/AffineAnalysis.cpp @@ -610,21 +610,6 @@ static void addOrderingConstraints(const FlatAffineConstraints &srcDomain, } } -// Returns true if 'isEq' constraint in 'dependenceDomain' has a single -// non-zero coefficient at (rowIdx, idPos). Returns false otherwise. -// TODO(andydavis) Move this function to FlatAffineConstraints. -static bool hasSingleNonZeroAt(unsigned idPos, unsigned rowIdx, bool isEq, - FlatAffineConstraints *dependenceDomain) { - unsigned numCols = dependenceDomain->getNumCols(); - for (unsigned j = 0; j < numCols - 1; ++j) { - int64_t v = isEq ? dependenceDomain->atEq(rowIdx, j) - : dependenceDomain->atIneq(rowIdx, j); - if ((j == idPos && v == 0) || (j != idPos && v != 0)) - return false; - } - return true; -} - // Computes distance and direction vectors in 'dependences', by adding // variables to 'dependenceDomain' which represent the difference of the IVs, // eliminating all other variables, and reading off distance vectors from