Don't use else if after return. Tidy comments. NFC.
authorChad Rosier <mcrosier@codeaurora.org>
Tue, 13 Sep 2016 13:08:53 +0000 (13:08 +0000)
committerChad Rosier <mcrosier@codeaurora.org>
Tue, 13 Sep 2016 13:08:53 +0000 (13:08 +0000)
llvm-svn: 281331

llvm/lib/Transforms/Scalar/LoopInterchange.cpp

index 5a9f0fb..0265349 100644 (file)
@@ -254,9 +254,8 @@ static bool validDepInterchange(CharMatrix &DepMatrix, unsigned Row,
 
 // Checks if it is legal to interchange 2 loops.
 // [Theorem] A permutation of the loops in a perfect nest is legal if and only
-// if
-// the direction matrix, after the same permutation is applied to its columns,
-// has no ">" direction as the leftmost non-"=" direction in any row.
+// if the direction matrix, after the same permutation is applied to its
+// columns, has no ">" direction as the leftmost non-"=" direction in any row.
 static bool isLegalToInterChangeLoops(CharMatrix &DepMatrix,
                                       unsigned InnerLoopId,
                                       unsigned OuterLoopId) {
@@ -268,8 +267,7 @@ static bool isLegalToInterChangeLoops(CharMatrix &DepMatrix,
     char OuterDep = DepMatrix[Row][OuterLoopId];
     if (InnerDep == '*' || OuterDep == '*')
       return false;
-    else if (!validDepInterchange(DepMatrix, Row, OuterLoopId, InnerDep,
-                                  OuterDep))
+    if (!validDepInterchange(DepMatrix, Row, OuterLoopId, InnerDep, OuterDep))
       return false;
   }
   return true;