summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-02-02 14:14:40 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2016-02-02 14:14:40 +0000
commita87810351c29a0c159f421c439cd627fd4ebcf47 (patch)
tree75e864da7900587b1b9e4690e09c2c5f4225d6cb
parentc36d39b7a84d1be3f8d7534a5169b9be239c0b3f (diff)
downloadbcm5719-llvm-a87810351c29a0c159f421c439cd627fd4ebcf47.tar.gz
bcm5719-llvm-a87810351c29a0c159f421c439cd627fd4ebcf47.zip
Remove helper function [NFC]
llvm-svn: 259501
-rw-r--r--polly/include/polly/ScopInfo.h12
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp9
2 files changed, 8 insertions, 13 deletions
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index b46e0817a4f..da47a53a1dc 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -1921,13 +1921,6 @@ class ScopInfo : public RegionPass {
Scop *scop;
isl_ctx *ctx;
- /// @brief Return the SCoP region that is currently processed.
- Region *getRegion() const {
- if (!scop)
- return nullptr;
- return &scop->getRegion();
- }
-
// Clear the context.
void clear();
@@ -1974,9 +1967,12 @@ class ScopInfo : public RegionPass {
/// @brief Create ScopStmt for all BBs and non-affine subregions of @p SR.
///
+ /// @param R The SCoP region.
+ /// @param SR A subregion of @p R.
+ ///
/// Some of the statments might be optimized away later when they do not
/// access any memory and thus have no effect.
- void buildStmts(Region &SR);
+ void buildStmts(Region &R, Region &SR);
/// @brief Build the access functions for the basic block @p BB
///
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index b5e40eba4e4..9f53dd23be2 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -3876,17 +3876,16 @@ void ScopInfo::buildAccessFunctions(Region &R, Region &SR) {
buildAccessFunctions(R, *I->getNodeAs<BasicBlock>());
}
-void ScopInfo::buildStmts(Region &SR) {
- Region *R = getRegion();
+void ScopInfo::buildStmts(Region &R, Region &SR) {
- if (SD->isNonAffineSubRegion(&SR, R)) {
+ if (SD->isNonAffineSubRegion(&SR, &R)) {
scop->addScopStmt(nullptr, &SR);
return;
}
for (auto I = SR.element_begin(), E = SR.element_end(); I != E; ++I)
if (I->isSubRegion())
- buildStmts(*I->getNodeAs<Region>());
+ buildStmts(R, *I->getNodeAs<Region>());
else
scop->addScopStmt(I->getNodeAs<BasicBlock>(), nullptr);
}
@@ -4067,7 +4066,7 @@ void ScopInfo::buildScop(Region &R, AssumptionCache &AC) {
unsigned MaxLoopDepth = getMaxLoopDepthInRegion(R, *LI, *SD);
scop = new Scop(R, AccFuncMap, *SD, *SE, *DT, *LI, ctx, MaxLoopDepth);
- buildStmts(R);
+ buildStmts(R, R);
buildAccessFunctions(R, R);
// In case the region does not have an exiting block we will later (during
OpenPOWER on IntegriCloud