summaryrefslogtreecommitdiffstats
path: root/polly/lib/Support/ScopHelper.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2014-10-31 23:13:39 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2014-10-31 23:13:39 +0000
commit7c494217f38d302fcde076738784dd14884157ba (patch)
tree72d453093b8a3160bb93ccb17736587fa55ca687 /polly/lib/Support/ScopHelper.cpp
parent4e27567a12852e69f6e2187c513b7a08ffd203e7 (diff)
downloadbcm5719-llvm-7c494217f38d302fcde076738784dd14884157ba.tar.gz
bcm5719-llvm-7c494217f38d302fcde076738784dd14884157ba.zip
[Refactor][NFC] Map basic blocks to SCoP statements.
This will simplify the construction of domains and the modeling of PHI's. llvm-svn: 221015
Diffstat (limited to 'polly/lib/Support/ScopHelper.cpp')
-rw-r--r--polly/lib/Support/ScopHelper.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
index 87ee1abbb55..9541c8edffd 100644
--- a/polly/lib/Support/ScopHelper.cpp
+++ b/polly/lib/Support/ScopHelper.cpp
@@ -88,11 +88,8 @@ BasicBlock *polly::createSingleExitEdge(Region *R, Pass *P) {
static void replaceScopAndRegionEntry(polly::Scop *S, BasicBlock *OldEntry,
BasicBlock *NewEntry) {
- for (polly::ScopStmt *Stmt : *S)
- if (Stmt->getBasicBlock() == OldEntry) {
- Stmt->setBasicBlock(NewEntry);
- break;
- }
+ if (polly::ScopStmt *Stmt = S->getStmtForBasicBlock(OldEntry))
+ Stmt->setBasicBlock(NewEntry);
S->getRegion().replaceEntryRecursive(NewEntry);
}
OpenPOWER on IntegriCloud