[polly] r286217 - SCEVValidator: reduce indentation to increase readability [NFC]

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 23:17:48 PST 2016


Author: grosser
Date: Tue Nov  8 01:17:48 2016
New Revision: 286217

URL: http://llvm.org/viewvc/llvm-project?rev=286217&view=rev
Log:
SCEVValidator: reduce indentation to increase readability [NFC]

Modified:
    polly/trunk/lib/Support/SCEVValidator.cpp

Modified: polly/trunk/lib/Support/SCEVValidator.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/SCEVValidator.cpp?rev=286217&r1=286216&r2=286217&view=diff
==============================================================================
--- polly/trunk/lib/Support/SCEVValidator.cpp (original)
+++ polly/trunk/lib/Support/SCEVValidator.cpp Tue Nov  8 01:17:48 2016
@@ -403,23 +403,28 @@ public:
       Instruction *Inst = dyn_cast<Instruction>(Unknown->getValue());
 
       // Return true when Inst is defined inside the region R.
-      if (Inst && R->contains(Inst)) {
+      if (!Inst || !R->contains(Inst))
+        return true;
+
+      HasInRegionDeps = true;
+      return false;
+    }
+
+    if (auto AddRec = dyn_cast<SCEVAddRecExpr>(S)) {
+      if (AllowLoops)
+        return true;
+
+      if (!Scope) {
         HasInRegionDeps = true;
         return false;
       }
-    } else if (auto AddRec = dyn_cast<SCEVAddRecExpr>(S)) {
-      if (!AllowLoops) {
-        if (!Scope) {
-          HasInRegionDeps = true;
-          return false;
-        }
-        auto *L = AddRec->getLoop();
-        if (R->contains(L) && !L->contains(Scope)) {
-          HasInRegionDeps = true;
-          return false;
-        }
+      auto *L = AddRec->getLoop();
+      if (R->contains(L) && !L->contains(Scope)) {
+        HasInRegionDeps = true;
+        return false;
       }
     }
+
     return true;
   }
   bool isDone() { return false; }




More information about the llvm-commits mailing list