summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/CodeGeneration.cpp
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2013-05-07 07:30:56 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2013-05-07 07:30:56 +0000
commite602a07662a5b64fbbeb9af916d29956d330ad47 (patch)
treefcfea6a499c925d268e4285a9fb7fa8f6930e7de /polly/lib/CodeGen/CodeGeneration.cpp
parentd0fe8371bf59ea4ec29bc07c1a1188ad4c832936 (diff)
downloadbcm5719-llvm-e602a07662a5b64fbbeb9af916d29956d330ad47.tar.gz
bcm5719-llvm-e602a07662a5b64fbbeb9af916d29956d330ad47.zip
Reformat with clang-format
clang-format become way more stable. This time we mainly reformat function signatures. llvm-svn: 181294
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp57
1 files changed, 31 insertions, 26 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index ad9b6e25de9..2b770e6bf8a 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -72,9 +72,10 @@ GPGPU("enable-polly-gpgpu", cl::desc("Generate GPU parallel code"), cl::Hidden,
cl::value_desc("GPGPU code generation enabled if true"), cl::init(false),
cl::ZeroOrMore);
-static cl::opt<std::string> GPUTriple(
- "polly-gpgpu-triple", cl::desc("Target triple for GPU code generation"),
- cl::Hidden, cl::init(""));
+static cl::opt<std::string>
+GPUTriple("polly-gpgpu-triple",
+ cl::desc("Target triple for GPU code generation"), cl::Hidden,
+ cl::init(""));
#endif /* GPU_CODEGEN */
typedef DenseMap<const char *, Value *> CharMapT;
@@ -262,10 +263,10 @@ private:
void codegen(const clast_assignment *a);
- void
- codegen(const clast_assignment *a, ScopStmt *Statement, unsigned Dimension,
- int vectorDim, std::vector<ValueMapT> *VectorVMap = 0,
- std::vector<LoopToScevMapT> *VLTS = 0);
+ void codegen(const clast_assignment *a, ScopStmt *Statement,
+ unsigned Dimension, int vectorDim,
+ std::vector<ValueMapT> *VectorVMap = 0,
+ std::vector<LoopToScevMapT> *VLTS = 0);
void codegenSubstitutions(const clast_stmt *Assignment, ScopStmt *Statement,
int vectorDim = 0,
@@ -312,9 +313,10 @@ private:
void codegenForGPGPU(const clast_for *F);
/// @brief Get innermost for loop.
- const clast_stmt *
- getScheduleInfo(const clast_for *F, std::vector<int> &NumIters,
- unsigned &LoopDepth, unsigned &NonPLoopDepth);
+ const clast_stmt *getScheduleInfo(const clast_for *F,
+ std::vector<int> &NumIters,
+ unsigned &LoopDepth,
+ unsigned &NonPLoopDepth);
#endif /* GPU_CODEGEN */
/// @brief Check if a loop is parallel
@@ -368,9 +370,10 @@ void ClastStmtCodeGen::codegen(const clast_assignment *a) {
ClastVars[a->LHS] = V;
}
-void ClastStmtCodeGen::codegen(
- const clast_assignment *A, ScopStmt *Stmt, unsigned Dim, int VectorDim,
- std::vector<ValueMapT> *VectorVMap, std::vector<LoopToScevMapT> *VLTS) {
+void ClastStmtCodeGen::codegen(const clast_assignment *A, ScopStmt *Stmt,
+ unsigned Dim, int VectorDim,
+ std::vector<ValueMapT> *VectorVMap,
+ std::vector<LoopToScevMapT> *VLTS) {
Value *RHS;
assert(!A->LHS && "Statement assignments do not have left hand side");
@@ -393,9 +396,10 @@ void ClastStmtCodeGen::codegen(
}
}
-void ClastStmtCodeGen::codegenSubstitutions(
- const clast_stmt *Assignment, ScopStmt *Statement, int vectorDim,
- std::vector<ValueMapT> *VectorVMap, std::vector<LoopToScevMapT> *VLTS) {
+void ClastStmtCodeGen::codegenSubstitutions(const clast_stmt *Assignment,
+ ScopStmt *Statement, int vectorDim,
+ std::vector<ValueMapT> *VectorVMap,
+ std::vector<LoopToScevMapT> *VLTS) {
int Dimension = 0;
while (Assignment) {
@@ -411,8 +415,8 @@ void ClastStmtCodeGen::codegenSubstitutions(
// Takes the cloog specific domain and translates it into a map Statement ->
// PartialSchedule, where the PartialSchedule contains all the dimensions that
// have been code generated up to this point.
-static __isl_give isl_map *
-extractPartialSchedule(ScopStmt *Statement, isl_set *Domain) {
+static __isl_give isl_map *extractPartialSchedule(ScopStmt *Statement,
+ isl_set *Domain) {
isl_map *Schedule = Statement->getScattering();
int ScheduledDimensions = isl_set_dim(Domain, isl_dim_set);
int UnscheduledDimensions =
@@ -422,9 +426,9 @@ extractPartialSchedule(ScopStmt *Statement, isl_set *Domain) {
UnscheduledDimensions);
}
-void
-ClastStmtCodeGen::codegen(const clast_user_stmt *u, std::vector<Value *> *IVS,
- const char *iterator, isl_set *Domain) {
+void ClastStmtCodeGen::codegen(const clast_user_stmt *u,
+ std::vector<Value *> *IVS, const char *iterator,
+ isl_set *Domain) {
ScopStmt *Statement = (ScopStmt *)u->statement->usr;
if (u->substitutions)
@@ -661,9 +665,10 @@ SetVector<Value *> ClastStmtCodeGen::getGPUValues(unsigned &OutputBytes) {
return Values;
}
-const clast_stmt *ClastStmtCodeGen::getScheduleInfo(
- const clast_for *F, std::vector<int> &NumIters, unsigned &LoopDepth,
- unsigned &NonPLoopDepth) {
+const clast_stmt *ClastStmtCodeGen::getScheduleInfo(const clast_for *F,
+ std::vector<int> &NumIters,
+ unsigned &LoopDepth,
+ unsigned &NonPLoopDepth) {
clast_stmt *Stmt = (clast_stmt *)F;
const clast_for *Result;
bool NonParaFlag = false;
@@ -986,8 +991,8 @@ public:
bool runOnScop(Scop &S) {
ParallelLoops.clear();
- assert(!S.getRegion().isTopLevelRegion()
- && "Top level regions are not supported");
+ assert(!S.getRegion().isTopLevelRegion() &&
+ "Top level regions are not supported");
simplifyRegion(&S, this);
OpenPOWER on IntegriCloud