summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2016-11-08 07:17:48 +0000
committerTobias Grosser <tobias@grosser.es>2016-11-08 07:17:48 +0000
commita8ca3ed06a669e17c6a52b115525060fbb385072 (patch)
tree581ad05d830c8a1afef99f9fe6fdb479a1d6d53f
parentc6a0339fb0419efd7579b9307f1d44d168f65e19 (diff)
downloadbcm5719-llvm-a8ca3ed06a669e17c6a52b115525060fbb385072.tar.gz
bcm5719-llvm-a8ca3ed06a669e17c6a52b115525060fbb385072.zip
SCEVValidator: reduce indentation to increase readability [NFC]
llvm-svn: 286217
-rw-r--r--polly/lib/Support/SCEVValidator.cpp29
1 files changed, 17 insertions, 12 deletions
diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp
index 82e8fd6ed7f..b263873284d 100644
--- a/polly/lib/Support/SCEVValidator.cpp
+++ b/polly/lib/Support/SCEVValidator.cpp
@@ -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; }
OpenPOWER on IntegriCloud