diff options
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r-- | polly/lib/CodeGen/BlockGenerators.cpp | 19 | ||||
-rw-r--r-- | polly/lib/CodeGen/Cloog.cpp | 2 | ||||
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 18 | ||||
-rw-r--r-- | polly/lib/CodeGen/IslAst.cpp | 11 | ||||
-rw-r--r-- | polly/lib/CodeGen/IslCodeGeneration.cpp | 3 |
5 files changed, 22 insertions, 31 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index 94c0ac6274e..bfd70641cb9 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -37,10 +37,9 @@ Aligned("enable-polly-aligned", cl::desc("Assumed aligned memory accesses."), cl::Hidden, cl::value_desc("OpenMP code generation enabled if true"), cl::init(false), cl::ZeroOrMore); -static cl::opt<bool, true> -SCEVCodegenF("polly-codegen-scev", cl::desc("Use SCEV based code generation."), - cl::Hidden, cl::location(SCEVCodegen), cl::init(false), - cl::ZeroOrMore); +static cl::opt<bool, true> SCEVCodegenF( + "polly-codegen-scev", cl::desc("Use SCEV based code generation."), + cl::Hidden, cl::location(SCEVCodegen), cl::init(false), cl::ZeroOrMore); bool polly::SCEVCodegen; @@ -62,7 +61,6 @@ bool polly::canSynthesize(const Instruction *I, const llvm::LoopInfo *LI, return L && I == L->getCanonicalInductionVariable(); } - // Helper class to generate memory location. namespace { class IslGenerator { @@ -181,7 +179,7 @@ Value *BlockGenerator::getNewValue(const Value *Old, ValueMapT &BBMap, Value *New = GlobalMap[Old]; if (Old->getType()->getScalarSizeInBits() < - New->getType()->getScalarSizeInBits()) + New->getType()->getScalarSizeInBits()) New = Builder.CreateTruncOrBitCast(New, Old->getType()); return New; @@ -312,8 +310,7 @@ Value *BlockGenerator::generateLocationAccessed( return NewPointer; } -Loop * -BlockGenerator::getLoopForInst(const llvm::Instruction *Inst) { +Loop *BlockGenerator::getLoopForInst(const llvm::Instruction *Inst) { return P->getAnalysis<LoopInfo>().getLoopFor(Inst->getParent()); } @@ -390,9 +387,9 @@ VectorBlockGenerator::VectorBlockGenerator( assert(Schedule && "No statement domain provided"); } -Value *VectorBlockGenerator::getVectorValue( - const Value *Old, ValueMapT &VectorMap, VectorValueMapT &ScalarMaps, - Loop *L) { +Value * +VectorBlockGenerator::getVectorValue(const Value *Old, ValueMapT &VectorMap, + VectorValueMapT &ScalarMaps, Loop *L) { if (VectorMap.count(Old)) return VectorMap[Old]; diff --git a/polly/lib/CodeGen/Cloog.cpp b/polly/lib/CodeGen/Cloog.cpp index 9925d47d721..5a091a041a7 100644 --- a/polly/lib/CodeGen/Cloog.cpp +++ b/polly/lib/CodeGen/Cloog.cpp @@ -330,7 +330,7 @@ bool CloogInfo::runOnScop(Scop &S) { C = new Cloog(&S); Function *F = S.getRegion().getEntry()->getParent(); - (void)F; + (void) F; DEBUG(dbgs() << ":: " << F->getName()); DEBUG(dbgs() << " : " << S.getRegion().getNameStr() << "\n"); diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index ffe6f389a4b..e3e5621693e 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -193,7 +193,7 @@ Value *ClastExpCodeGen::codegen(const clast_reduction *r, Type *Ty) { } ClastExpCodeGen::ClastExpCodeGen(IRBuilder<> &B, CharMapT &IVMap) - : Builder(B), IVS(IVMap) {} + : Builder(B), IVS(IVMap) {} Value *ClastExpCodeGen::codegen(const clast_expr *e, Type *Ty) { switch (e->type) { @@ -366,10 +366,9 @@ 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"); @@ -970,8 +969,7 @@ void ClastStmtCodeGen::codegen(const clast_root *r) { } ClastStmtCodeGen::ClastStmtCodeGen(Scop *scop, IRBuilder<> &B, Pass *P) - : S(scop), P(P), Builder(B), ExpGen(Builder, ClastVars) { -} + : S(scop), P(P), Builder(B), ExpGen(Builder, ClastVars) {} namespace { class CodeGeneration : public ScopPass { @@ -1040,9 +1038,7 @@ public: char CodeGeneration::ID = 1; -Pass *polly::createCodeGenerationPass() { - return new CodeGeneration(); -} +Pass *polly::createCodeGenerationPass() { return new CodeGeneration(); } INITIALIZE_PASS_BEGIN(CodeGeneration, "polly-codegen", "Polly - Create LLVM-IR from SCoPs", false, false); @@ -1054,6 +1050,6 @@ INITIALIZE_PASS_DEPENDENCY(ScalarEvolution); INITIALIZE_PASS_DEPENDENCY(ScopDetection); INITIALIZE_PASS_DEPENDENCY(DataLayout); INITIALIZE_PASS_END(CodeGeneration, "polly-codegen", - "Polly - Create LLVM-IR from SCoPs", false, false) + "Polly - Create LLVM-IR from SCoPs", false, false) #endif // CLOOG_FOUND diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index 04e02f6700c..4f68b89b2ac 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -326,13 +326,12 @@ IslAst::IslAst(Scop *Scop, Dependences &D) : S(Scop) { isl_union_map *Schedule = getSchedule(); Function *F = Scop->getRegion().getEntry()->getParent(); - (void)F; + (void) F; DEBUG(dbgs() << ":: isl ast :: " << F->getName() << " :: " << Scop->getRegion().getNameStr() << "\n"); - DEBUG(dbgs() << S->getContextStr() << "\n"; - isl_union_map_dump(Schedule)); + DEBUG(dbgs() << S->getContextStr() << "\n"; isl_union_map_dump(Schedule)); if (DetectParallel || PollyVectorizerChoice != VECTORIZER_NONE) { BuildInfo.Deps = &D; @@ -433,9 +432,9 @@ char IslAstInfo::ID = 0; Pass *polly::createIslAstInfoPass() { return new IslAstInfo(); } INITIALIZE_PASS_BEGIN(IslAstInfo, "polly-ast", - "Generate an AST of the SCoP (isl)", false, false); + "Polly - Generate an AST of the SCoP (isl)", false, + false); INITIALIZE_PASS_DEPENDENCY(ScopInfo); INITIALIZE_PASS_DEPENDENCY(Dependences); INITIALIZE_PASS_END(IslAstInfo, "polly-ast", - "Generate an AST from the SCoP (isl)", false, false) - + "Polly - Generate an AST from the SCoP (isl)", false, false) diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index 20738a9b32b..6db09258a62 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -126,7 +126,7 @@ void RuntimeDebugBuilder::createStrPrinter(std::string String) { void RuntimeDebugBuilder::createIntPrinter(Value *V) { IntegerType *Ty = dyn_cast<IntegerType>(V->getType()); - (void)Ty; + (void) Ty; assert(Ty && Ty->getBitWidth() == 64 && "Cannot insert printer for this type."); @@ -1080,4 +1080,3 @@ INITIALIZE_PASS_DEPENDENCY(ScalarEvolution); INITIALIZE_PASS_DEPENDENCY(ScopDetection); INITIALIZE_PASS_END(IslCodeGeneration, "polly-codegen-isl", "Polly - Create LLVM-IR from SCoPs", false, false) - |