[PATCH] D132982: [LoopInterchange] Unwanted positive dependency checking of Outerloop removed.

Ramkrishnan Narayanan Komala via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 15:53:47 PDT 2022


ram-NK created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
ram-NK requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

https://reviews.llvm.org/D132982

Files:
  llvm/lib/Transforms/Scalar/LoopInterchange.cpp


Index: llvm/lib/Transforms/Scalar/LoopInterchange.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+++ llvm/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -181,20 +181,6 @@
     std::swap(DepMatrix[I][ToIndx], DepMatrix[I][FromIndx]);
 }
 
-// Checks if outermost non '=','S'or'I' dependence in the dependence matrix is
-// '>'
-static bool isOuterMostDepPositive(CharMatrix &DepMatrix, unsigned Row,
-                                   unsigned Column) {
-  for (unsigned i = 0; i <= Column; ++i) {
-    if (DepMatrix[Row][i] == '<')
-      return false;
-    if (DepMatrix[Row][i] == '>')
-      return true;
-  }
-  // All dependencies were '=','S' or 'I'
-  return false;
-}
-
 // Checks if no dependence exist in the dependency matrix in Row before Column.
 static bool containsNoDependence(CharMatrix &DepMatrix, unsigned Row,
                                  unsigned Column) {
@@ -209,9 +195,6 @@
 static bool validDepInterchange(CharMatrix &DepMatrix, unsigned Row,
                                 unsigned OuterLoopId, char InnerDep,
                                 char OuterDep) {
-  if (isOuterMostDepPositive(DepMatrix, Row, OuterLoopId))
-    return false;
-
   if (InnerDep == OuterDep)
     return true;
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132982.456808.patch
Type: text/x-patch
Size: 1298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220830/f7f8a0b4/attachment.bin>


More information about the llvm-commits mailing list