[llvm-commits] [polly] r151895 - /polly/trunk/lib/CodeGeneration.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Fri Mar 2 03:26:49 PST 2012
Author: grosser
Date: Fri Mar 2 05:26:49 2012
New Revision: 151895
URL: http://llvm.org/viewvc/llvm-project?rev=151895&view=rev
Log:
CodeGen: Hide the private implementation of the block generator
Modified:
polly/trunk/lib/CodeGeneration.cpp
Modified: polly/trunk/lib/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGeneration.cpp?rev=151895&r1=151894&r2=151895&view=diff
==============================================================================
--- polly/trunk/lib/CodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGeneration.cpp Fri Mar 2 05:26:49 2012
@@ -155,6 +155,19 @@
}
class BlockGenerator {
+public:
+ /// @brief Generate code for single basic block.
+ static void generate(IRBuilder<> &B, ValueMapT &ValueMap,
+ VectorValueMapT &VectorMaps, ScopStmt &Stmt,
+ __isl_keep isl_set *Domain, BasicBlock *BB, Pass *P) {
+ BlockGenerator Generator(B, ValueMap, VectorMaps, Stmt, Domain);
+ Generator.copyBB(BB, P);
+ }
+
+private:
+ BlockGenerator(IRBuilder<> &B, ValueMapT &vmap, VectorValueMapT &vmaps,
+ ScopStmt &Stmt, __isl_keep isl_set *domain);
+
IRBuilder<> &Builder;
ValueMapT &VMap;
VectorValueMapT &ValueMaps;
@@ -162,9 +175,6 @@
ScopStmt &Statement;
isl_set *ScatteringDomain;
-public:
- BlockGenerator(IRBuilder<> &B, ValueMapT &vmap, VectorValueMapT &vmaps,
- ScopStmt &Stmt, __isl_keep isl_set *domain);
const Region &getRegion();
@@ -1070,9 +1080,8 @@
}
}
- BlockGenerator Generator(Builder, ValueMap, VectorValueMap, *Statement,
- scatteringDomain);
- Generator.copyBB(BB, P);
+ BlockGenerator::generate(Builder, ValueMap, VectorValueMap, *Statement,
+ scatteringDomain, BB, P);
}
void ClastStmtCodeGen::codegen(const clast_block *b) {
More information about the llvm-commits
mailing list