diff options
| author | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-12-29 23:47:38 +0000 |
|---|---|---|
| committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-12-29 23:47:38 +0000 |
| commit | 1bb59b0dcfccdaada07e2d180d5929a2dd0b1493 (patch) | |
| tree | 2c619d2ce5d50cc8752b7e424dc24e4bcdd13512 /polly/lib/CodeGen/CodeGeneration.cpp | |
| parent | 9463dce9bf90d63480c894452cc82db1de182823 (diff) | |
| download | bcm5719-llvm-1bb59b0dcfccdaada07e2d180d5929a2dd0b1493.tar.gz bcm5719-llvm-1bb59b0dcfccdaada07e2d180d5929a2dd0b1493.zip | |
Fix obvious formatting problems.
We fix the following formatting problems found by clang-format:
- 80 cols violations
- Obvious problems with missing or too many spaces
- multiple new lines in a row
clang-format suggests many more changes, most of them falling in the following
two categories:
1) clang-format does not at all format a piece of code nicely
2) The style that clang-format suggests does not match the style used in
Polly/LLVM
I consider differences caused by reason 1) bugs, which should be fixed by
improving clang-format. Differences due to 2) need to be investigated closer
to understand the cause of the difference and the solution that should be taken.
llvm-svn: 171241
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 84788146f58..06378db25fb 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -176,7 +176,7 @@ Value *ClastExpCodeGen::codegen(const clast_reduction *r, Type *Ty) { && "Clast reduction type not supported"); Value *old = codegen(r->elts[0], Ty); - for (int i=1; i < r->n; ++i) { + for (int i = 1; i < r->n; ++i) { Value *exprValue = codegen(r->elts[i], Ty); switch (r->type) { @@ -341,7 +341,7 @@ private: IntegerType *getIntPtrTy(); - public: +public: void codegen(const clast_root *r); ClastStmtCodeGen(Scop *scop, IRBuilder<> &B, Pass *P); @@ -357,7 +357,7 @@ const std::vector<std::string> &ClastStmtCodeGen::getParallelLoops() { } void ClastStmtCodeGen::codegen(const clast_assignment *a) { - Value *V= ExpGen.codegen(a->RHS, getIntPtrTy()); + Value *V = ExpGen.codegen(a->RHS, getIntPtrTy()); ClastVars[a->LHS] = V; } @@ -425,7 +425,7 @@ void ClastStmtCodeGen::codegen(const clast_user_stmt *u, VectorValueMapT VectorMap(VectorDimensions); if (IVS) { - assert (u->substitutions && "Substitutions expected!"); + assert(u->substitutions && "Substitutions expected!"); int i = 0; for (std::vector<Value*>::iterator II = IVS->begin(), IE = IVS->end(); II != IE; ++II) { @@ -703,7 +703,7 @@ void ClastStmtCodeGen::codegenForGPGPU(const clast_for *F) { U = (const clast_user_stmt *) TmpStmt; ScopStmt *Statement = (ScopStmt *) U->statement->usr; for (unsigned i = 0; i < Statement->getNumIterators() - NonPLoopDepth; i++) { - const Value* IV = Statement->getInductionVariableForDimension(i); + const Value *IV = Statement->getInductionVariableForDimension(i); IVS.insert(const_cast<Value *>(IV)); } @@ -784,7 +784,7 @@ void ClastStmtCodeGen::codegenForVector(const clast_for *F) { APInt Stride = APInt_from_MPZ(F->stride); IntegerType *LoopIVType = dyn_cast<IntegerType>(LB->getType()); - Stride = Stride.zext(LoopIVType->getBitWidth()); + Stride = Stride.zext(LoopIVType->getBitWidth()); Value *StrideValue = ConstantInt::get(LoopIVType, Stride); std::vector<Value*> IVS(VectorWidth); @@ -811,7 +811,6 @@ void ClastStmtCodeGen::codegenForVector(const clast_for *F) { ClastVars.erase(F->iterator); } - bool ClastStmtCodeGen::isParallelFor(const clast_for *f) { isl_set *Domain = isl_set_from_cloog_domain(f->domain); assert(Domain && "Cannot access domain of loop"); @@ -952,14 +951,15 @@ void ClastStmtCodeGen::codegen(const clast_root *r) { codegen(stmt->next); } -ClastStmtCodeGen::ClastStmtCodeGen(Scop *scop, IRBuilder<> &B, Pass *P) : - S(scop), P(P), Builder(B), ExpGen(Builder, ClastVars) {} +ClastStmtCodeGen::ClastStmtCodeGen(Scop *scop, IRBuilder<> &B, Pass *P) + : S(scop), P(P), Builder(B), ExpGen(Builder, ClastVars) { +} namespace { class CodeGeneration : public ScopPass { std::vector<std::string> ParallelLoops; - public: +public: static char ID; CodeGeneration() : ScopPass(ID) {} |

