SCEVValidator: reduce indentation to increase readability [NFC]
authorTobias Grosser <tobias@grosser.es>
Tue, 8 Nov 2016 07:17:48 +0000 (07:17 +0000)
committerTobias Grosser <tobias@grosser.es>
Tue, 8 Nov 2016 07:17:48 +0000 (07:17 +0000)
llvm-svn: 286217

polly/lib/Support/SCEVValidator.cpp

index 82e8fd6..b263873 100644 (file)
@@ -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; }