summaryrefslogtreecommitdiffstats
path: root/polly
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2016-07-25 09:15:57 +0000
committerTobias Grosser <tobias@grosser.es>2016-07-25 09:15:57 +0000
commit8ed5e5999f2b3239212e051c38958d7229b9b9bc (patch)
tree17f15bd5da63b9d63e2dc4c32270aff793e85f1a /polly
parent0a1a2720c86d5a5fc5577896bc1946544d6d2af9 (diff)
downloadbcm5719-llvm-8ed5e5999f2b3239212e051c38958d7229b9b9bc.tar.gz
bcm5719-llvm-8ed5e5999f2b3239212e051c38958d7229b9b9bc.zip
IslNodeBuilder: Make finalize() virtual
This allows the finalization routine of the IslNodeBuilder to be overwritten by derived classes. Being here, we also drop the unnecessary 'Scop' postfix and the unnecessary 'Scop' parameter. llvm-svn: 276622
Diffstat (limited to 'polly')
-rw-r--r--polly/include/polly/CodeGen/IslNodeBuilder.h4
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp3
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/polly/include/polly/CodeGen/IslNodeBuilder.h b/polly/include/polly/CodeGen/IslNodeBuilder.h
index e35233ae8b2..edc14eeb4c6 100644
--- a/polly/include/polly/CodeGen/IslNodeBuilder.h
+++ b/polly/include/polly/CodeGen/IslNodeBuilder.h
@@ -58,10 +58,10 @@ public:
/// @brief Preload all memory loads that are invariant.
bool preloadInvariantLoads();
- /// @brief Finalize code generation for the SCoP @p S.
+ /// @brief Finalize code generation.
///
/// @see BlockGenerator::finalizeSCoP(Scop &S)
- void finalizeSCoP(Scop &S) { BlockGen.finalizeSCoP(S); }
+ virtual void finalize() { BlockGen.finalizeSCoP(S); }
IslExprBuilder &getExprBuilder() { return ExprBuilder; }
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index 54485576447..709f3601a3a 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -203,8 +203,7 @@ public:
Builder.SetInsertPoint(&StartBlock->front());
NodeBuilder.create(AstRoot);
-
- NodeBuilder.finalizeSCoP(S);
+ NodeBuilder.finalize();
fixRegionInfo(EnteringBB->getParent(), R->getParent());
}
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index a4609bfacf4..9bc6fdedc91 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -1326,7 +1326,7 @@ public:
NodeBuilder.addParameters(S->getContext());
Builder.SetInsertPoint(&*StartBlock->begin());
NodeBuilder.create(Root);
- NodeBuilder.finalizeSCoP(*S);
+ NodeBuilder.finalize();
}
bool runOnScop(Scop &CurrentScop) override {
OpenPOWER on IntegriCloud