diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-06-23 01:29:29 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2013-06-23 01:29:29 +0000 |
commit | 58032cb029dcb366be868db48c89af128cce1dd4 (patch) | |
tree | 05cd7aa16afd60eb5c0b3ec74ae82b3c274b78a1 /polly | |
parent | 7be81b2b4dadd87ad169419309a8da86f51a8ab0 (diff) | |
download | bcm5719-llvm-58032cb029dcb366be868db48c89af128cce1dd4.tar.gz bcm5719-llvm-58032cb029dcb366be868db48c89af128cce1dd4.zip |
Integrate latest clang-format changes
llvm-svn: 184655
Diffstat (limited to 'polly')
34 files changed, 88 insertions, 88 deletions
diff --git a/polly/include/polly/CodeGen/BlockGenerators.h b/polly/include/polly/CodeGen/BlockGenerators.h index c135e489f2a..51ded140ac8 100644 --- a/polly/include/polly/CodeGen/BlockGenerators.h +++ b/polly/include/polly/CodeGen/BlockGenerators.h @@ -305,6 +305,5 @@ private: void copyBB(); }; - } #endif diff --git a/polly/include/polly/CodeGen/Cloog.h b/polly/include/polly/CodeGen/Cloog.h index a58c7bf588f..20c7525ffbb 100644 --- a/polly/include/polly/CodeGen/Cloog.h +++ b/polly/include/polly/CodeGen/Cloog.h @@ -34,7 +34,9 @@ #include "cloog/cloog.h" struct clast_name; -namespace llvm { class raw_ostream; } +namespace llvm { +class raw_ostream; +} namespace polly { class Scop; diff --git a/polly/include/polly/CodeGen/CodeGeneration.h b/polly/include/polly/CodeGen/CodeGeneration.h index 648c2217434..f5be3739132 100644 --- a/polly/include/polly/CodeGen/CodeGeneration.h +++ b/polly/include/polly/CodeGen/CodeGeneration.h @@ -66,7 +66,6 @@ static inline int getNumberOfIterations(__isl_take isl_set *Domain) { return NumberIterations; } - } #endif // POLLY_CODEGENERATION_H diff --git a/polly/include/polly/CodeGen/IslAst.h b/polly/include/polly/CodeGen/IslAst.h index 5d2a8b993bf..023d12b27af 100644 --- a/polly/include/polly/CodeGen/IslAst.h +++ b/polly/include/polly/CodeGen/IslAst.h @@ -28,7 +28,9 @@ #include "isl/ast.h" struct clast_name; -namespace llvm { class raw_ostream; } +namespace llvm { +class raw_ostream; +} struct isl_ast_node; struct isl_ast_build; diff --git a/polly/include/polly/CodeGen/Utils.h b/polly/include/polly/CodeGen/Utils.h index fd525b271db..341ba05aea2 100644 --- a/polly/include/polly/CodeGen/Utils.h +++ b/polly/include/polly/CodeGen/Utils.h @@ -57,6 +57,5 @@ class Scop; /// @param PassInfo A reference to the pass calling this function. /// @return BasicBlock The 'StartBlock' to which new code can be added. llvm::BasicBlock *executeScopConditionally(Scop &S, llvm::Pass *PassInfo); - } #endif diff --git a/polly/include/polly/LinkAllPasses.h b/polly/include/polly/LinkAllPasses.h index da0e64389de..aa4510a0df8 100644 --- a/polly/include/polly/LinkAllPasses.h +++ b/polly/include/polly/LinkAllPasses.h @@ -76,7 +76,7 @@ struct PollyForcePassLinking { // delete it all as dead code, even with whole program optimization, // yet is effectively a NO-OP. As the compiler isn't smart enough // to know that getenv() never returns -1, this will do the job. - if (std::getenv("bar") != (char *)- 1) + if (std::getenv("bar") != (char *)-1) return; #ifdef CLOOG_FOUND @@ -114,7 +114,6 @@ struct PollyForcePassLinking { createScopLibExporterPass(); createScopLibImporterPass(); #endif - } } PollyForcePassLinking; // Force link by creating a global definition. } diff --git a/polly/include/polly/RegisterPasses.h b/polly/include/polly/RegisterPasses.h index b631c98e8c0..ccfda1fe9ac 100644 --- a/polly/include/polly/RegisterPasses.h +++ b/polly/include/polly/RegisterPasses.h @@ -13,5 +13,7 @@ #ifndef POLLY_REGISTER_PASSES_H #define POLLY_REGISTER_PASSES_H -namespace llvm { class PassManagerBase; } +namespace llvm { +class PassManagerBase; +} #endif diff --git a/polly/include/polly/ScheduleOptimizer.h b/polly/include/polly/ScheduleOptimizer.h index 2e563eb44cb..80272d20275 100644 --- a/polly/include/polly/ScheduleOptimizer.h +++ b/polly/include/polly/ScheduleOptimizer.h @@ -12,6 +12,8 @@ #ifndef POLLY_SCHEDULE_OPTIMIZER_H #define POLLY_SCHEDULE_OPTIMIZER_H -namespace polly { extern bool DisablePollyTiling; } +namespace polly { +extern bool DisablePollyTiling; +} #endif diff --git a/polly/include/polly/ScopDetection.h b/polly/include/polly/ScopDetection.h index 38789861a30..6ee48ee7cd5 100755 --- a/polly/include/polly/ScopDetection.h +++ b/polly/include/polly/ScopDetection.h @@ -271,7 +271,7 @@ public: //@} }; -} //end namespace polly +} // end namespace polly namespace llvm { class PassRegistry; diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index d575ee9a9e0..50fd2b01cab 100755 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -647,7 +647,7 @@ public: //@} }; -} //end namespace polly +} // end namespace polly namespace llvm { class PassRegistry; diff --git a/polly/include/polly/ScopLib.h b/polly/include/polly/ScopLib.h index 3602680418c..066f4bb40d6 100644 --- a/polly/include/polly/ScopLib.h +++ b/polly/include/polly/ScopLib.h @@ -22,7 +22,9 @@ #include <map> -namespace llvm { class Value; } +namespace llvm { +class Value; +} struct isl_constraint; struct isl_basic_map; @@ -63,7 +65,6 @@ public: ~ScopLib(); void print(FILE *F); bool updateScattering(); - }; } diff --git a/polly/include/polly/Support/GICHelper.h b/polly/include/polly/Support/GICHelper.h index f9d773e55ec..83fd973500b 100755 --- a/polly/include/polly/Support/GICHelper.h +++ b/polly/include/polly/Support/GICHelper.h @@ -43,9 +43,8 @@ void MPZ_from_APInt(mpz_t v, const llvm::APInt apint, bool is_signed = true); /// @param mpz The mpz_t you want to convert. llvm::APInt APInt_from_MPZ(const mpz_t mpz); - -__isl_give isl_val *isl_valFromAPInt(isl_ctx *Ctx, const llvm::APInt Int, bool - IsSigned); +__isl_give isl_val *isl_valFromAPInt(isl_ctx *Ctx, const llvm::APInt Int, + bool IsSigned); llvm::APInt APIntFromVal(__isl_take isl_val *Val); /// @brief Get c++ string from Isl objects. @@ -61,6 +60,6 @@ std::string stringFromIslObj(/*__isl_keep*/ isl_aff *aff); std::string stringFromIslObj(/*__isl_keep*/ isl_pw_aff *pwaff); //@} -} //end namespace polly +} // end namespace polly #endif diff --git a/polly/include/polly/Support/SCEVValidator.h b/polly/include/polly/Support/SCEVValidator.h index 9e161388ea0..e787d35d279 100755 --- a/polly/include/polly/Support/SCEVValidator.h +++ b/polly/include/polly/Support/SCEVValidator.h @@ -35,7 +35,6 @@ std::vector<const llvm::SCEV *> getParamsInAffineExpr(const llvm::Region *R, const llvm::SCEV *Expression, llvm::ScalarEvolution &SE, const llvm::Value *BaseAddress = 0); - } #endif diff --git a/polly/include/polly/TempScopInfo.h b/polly/include/polly/TempScopInfo.h index 51c543c8096..6d98e925412 100755 --- a/polly/include/polly/TempScopInfo.h +++ b/polly/include/polly/TempScopInfo.h @@ -22,7 +22,9 @@ #include "llvm/Analysis/RegionPass.h" #include "llvm/IR/Instructions.h" -namespace llvm { class DataLayout; } +namespace llvm { +class DataLayout; +} using namespace llvm; diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 262281e1720..d25e625cefb 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -115,7 +115,7 @@ STATISTIC(ValidRegion, "Number of regions that a valid part of Scop"); LastFailure = Buf; \ DEBUG(dbgs() << MESSAGE); \ DEBUG(dbgs() << "\n"); \ - assert(!Context.Verifying && #NAME); \ + assert(!Context.Verifying &&#NAME); \ if (!Context.Verifying) \ ++Bad##NAME##ForScop; \ return false; \ @@ -212,9 +212,9 @@ bool ScopDetection::isValidCFG(BasicBlock &BB, if (!isAffineExpr(&Context.CurRegion, LHS, *SE) || !isAffineExpr(&Context.CurRegion, RHS, *SE)) - INVALID(AffFunc, "Non affine branch in BB '" << BB.getName() - << "' with LHS: " << *LHS - << " and RHS: " << *RHS); + INVALID(AffFunc, + "Non affine branch in BB '" << BB.getName() << "' with LHS: " + << *LHS << " and RHS: " << *RHS); } // Allow loop exit conditions. @@ -267,8 +267,8 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst, AccessFunction = SE->getMinusSCEV(AccessFunction, BasePointer); - if (!AllowNonAffine && !isAffineExpr(&Context.CurRegion, AccessFunction, *SE, - BaseValue)) + if (!AllowNonAffine && + !isAffineExpr(&Context.CurRegion, AccessFunction, *SE, BaseValue)) INVALID(AffFunc, "Non affine access function: " << *AccessFunction); // FIXME: Alias Analysis thinks IntToPtrInst aliases with alloca instructions @@ -279,17 +279,17 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst, if (!IgnoreAliasing) { // Check if the base pointer of the memory access does alias with // any other pointer. This cannot be handled at the moment. - AliasSet &AS = - Context.AST.getAliasSetForPointer(BaseValue, AliasAnalysis::UnknownSize, - Inst.getMetadata(LLVMContext::MD_tbaa)); - - // INVALID triggers an assertion in verifying mode, if it detects that a SCoP - // was detected by SCoP detection and that this SCoP was invalidated by a pass - // that stated it would preserve the SCoPs. - // We disable this check as the independent blocks pass may create memory - // references which seem to alias, if -basicaa is not available. They actually - // do not, but as we can not proof this without -basicaa we would fail. We - // disable this check to not cause irrelevant verification failures. + AliasSet &AS = Context.AST + .getAliasSetForPointer(BaseValue, AliasAnalysis::UnknownSize, + Inst.getMetadata(LLVMContext::MD_tbaa)); + + // INVALID triggers an assertion in verifying mode, if it detects that a + // SCoP was detected by SCoP detection and that this SCoP was invalidated by + // a pass that stated it would preserve the SCoPs. We disable this check as + // the independent blocks pass may create memory references which seem to + // alias, if -basicaa is not available. They actually do not, but as we can + // not proof this without -basicaa we would fail. We disable this check to + // not cause irrelevant verification failures. if (!AS.isMustAlias()) { std::string Message; raw_string_ostream OS(Message); @@ -304,7 +304,8 @@ bool ScopDetection::isValidMemoryAccess(Instruction &Inst, std::sort(Pointers.begin(), Pointers.end()); for (std::vector<Value *>::iterator PI = Pointers.begin(), - PE = Pointers.end(); ;) { + PE = Pointers.end(); + ;) { Value *V = *PI; if (V->getName().size() == 0) @@ -402,9 +403,8 @@ bool ScopDetection::isValidLoop(Loop *L, DetectionContext &Context) const { // Is the loop count affine? const SCEV *LoopCount = SE->getBackedgeTakenCount(L); if (!isAffineExpr(&Context.CurRegion, LoopCount, *SE)) - INVALID(LoopBound, - "Non affine loop bound '" - << *LoopCount << "' in loop: " << L->getHeader()->getName()); + INVALID(LoopBound, "Non affine loop bound '" << *LoopCount << "' in loop: " + << L->getHeader()->getName()); return true; } diff --git a/polly/lib/Analysis/ScopGraphPrinter.cpp b/polly/lib/Analysis/ScopGraphPrinter.cpp index 9a78f7a7472..6f7668589ca 100644 --- a/polly/lib/Analysis/ScopGraphPrinter.cpp +++ b/polly/lib/Analysis/ScopGraphPrinter.cpp @@ -162,7 +162,7 @@ struct DOTGraphTraits<ScopDetection *> : public DOTGraphTraits<RegionNode *> { } }; -} //end namespace llvm +} // end namespace llvm struct ScopViewer : public DOTGraphTraitsViewer<ScopDetection, false> { static char ID; diff --git a/polly/lib/Analysis/TempScopInfo.cpp b/polly/lib/Analysis/TempScopInfo.cpp index b475ab4555d..09ba52cfa55 100644 --- a/polly/lib/Analysis/TempScopInfo.cpp +++ b/polly/lib/Analysis/TempScopInfo.cpp @@ -138,8 +138,7 @@ IRAccess TempScopInfo::buildIRAccess(Instruction *Inst, Loop *L, Region *R) { Type = IRAccess::WRITE; } - const SCEV *AccessFunction = - SE->getSCEVAtScope(getPointerOperand(*Inst), L); + const SCEV *AccessFunction = SE->getSCEVAtScope(getPointerOperand(*Inst), L); const SCEVUnknown *BasePointer = dyn_cast<SCEVUnknown>(SE->getPointerBase(AccessFunction)); @@ -148,7 +147,8 @@ IRAccess TempScopInfo::buildIRAccess(Instruction *Inst, Loop *L, Region *R) { bool IsAffine = isAffineExpr(R, AccessFunction, *SE, BasePointer->getValue()); - return IRAccess(Type, BasePointer->getValue(), AccessFunction, Size, IsAffine); + return IRAccess(Type, BasePointer->getValue(), AccessFunction, Size, + IsAffine); } void TempScopInfo::buildAccessFunctions(Region &R, BasicBlock &BB) { @@ -160,7 +160,8 @@ void TempScopInfo::buildAccessFunctions(Region &R, BasicBlock &BB) { if (isa<LoadInst>(Inst) || isa<StoreInst>(Inst)) Functions.push_back(std::make_pair(buildIRAccess(Inst, L, &R), Inst)); - if (!isa<StoreInst>(Inst)) buildScalarDependences(Inst, &R); + if (!isa<StoreInst>(Inst)) + buildScalarDependences(Inst, &R); } if (Functions.empty()) @@ -233,8 +234,8 @@ void TempScopInfo::buildAffineCondition(Value &V, bool inverted, case ICmpInst::ICMP_ULE: // TODO: At the moment we need to see everything as signed. This is an // correctness issue that needs to be solved. - //AffLHS->setUnsigned(); - //AffRHS->setUnsigned(); + // AffLHS->setUnsigned(); + // AffRHS->setUnsigned(); break; default: break; diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index b0bc9dcf7f2..c5cd612aa40 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -199,7 +199,7 @@ Value *BlockGenerator::getNewValue(const Value *Old, ValueMapT &BBMap, } if (const Instruction *Inst = dyn_cast<Instruction>(Old)) { - (void) Inst; + (void)Inst; assert(!Statement.getParent()->getRegion().contains(Inst->getParent()) && "unexpected scalar dependence in region"); } diff --git a/polly/lib/CodeGen/Cloog.cpp b/polly/lib/CodeGen/Cloog.cpp index e44393da547..5d30c9c57b1 100644 --- a/polly/lib/CodeGen/Cloog.cpp +++ b/polly/lib/CodeGen/Cloog.cpp @@ -94,7 +94,7 @@ public: } ~FileToString() { close(FD[0]); - //close(FD[1]); + // close(FD[1]); } FILE *getInputFile() { return input; } @@ -119,7 +119,6 @@ public: return output; } - }; /// Write .cloog input file. @@ -251,7 +250,6 @@ struct CloogExporter : public ScopPass { virtual bool runOnScop(Scop &S); void getAnalysisUsage(AnalysisUsage &AU) const; }; - } std::string CloogExporter::getFileName(Region *R) const { std::string FunctionName = R->getEntry()->getParent()->getName(); @@ -330,7 +328,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 753942fea21..950a06a7053 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -169,7 +169,8 @@ Value *ClastExpCodeGen::codegen(const clast_binary *e, Type *Ty) { Value *ClastExpCodeGen::codegen(const clast_reduction *r, Type *Ty) { assert((r->type == clast_red_min || r->type == clast_red_max || - r->type == clast_red_sum) && "Clast reduction type not supported"); + r->type == clast_red_sum) && + "Clast reduction type not supported"); Value *old = codegen(r->elts[0], Ty); for (int i = 1; i < r->n; ++i) { diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp index f9dc55b148d..179916898fa 100644 --- a/polly/lib/CodeGen/IslAst.cpp +++ b/polly/lib/CodeGen/IslAst.cpp @@ -328,7 +328,7 @@ 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"); diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index 327d2cf1476..ed64fd6b129 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -125,7 +125,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."); diff --git a/polly/lib/CodePreparation.cpp b/polly/lib/CodePreparation.cpp index 80652c569b3..38a107ab1c6 100644 --- a/polly/lib/CodePreparation.cpp +++ b/polly/lib/CodePreparation.cpp @@ -77,7 +77,6 @@ public: virtual bool runOnFunction(Function &F); virtual void print(raw_ostream &OS, const Module *) const; //@} - }; } diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp index 5dd589a2df1..a2664e2db31 100644 --- a/polly/lib/Exchange/JSONExporter.cpp +++ b/polly/lib/Exchange/JSONExporter.cpp @@ -76,7 +76,6 @@ struct JSONImporter : public ScopPass { void printScop(raw_ostream &OS) const; void getAnalysisUsage(AnalysisUsage &AU) const; }; - } char JSONExporter::ID = 0; @@ -219,7 +218,6 @@ bool JSONImporter::runOnScop(Scop &scop) { for (unsigned i = 0; i < isl_set_dim(OldContext, isl_dim_param); i++) { isl_id *id = isl_set_get_dim_id(OldContext, isl_dim_param, i); NewContext = isl_set_set_dim_id(NewContext, isl_dim_param, i, id); - } isl_set_free(OldContext); @@ -276,7 +274,6 @@ bool JSONImporter::runOnScop(Scop &scop) { isl_map_free(currentAccessMap); isl_map_free(newAccessMap); return false; - } // We need to copy the isl_ids for the parameter dimensions to the new diff --git a/polly/lib/Exchange/OpenScopExporter.cpp b/polly/lib/Exchange/OpenScopExporter.cpp index eb4b2995c4b..1aba7006745 100644 --- a/polly/lib/Exchange/OpenScopExporter.cpp +++ b/polly/lib/Exchange/OpenScopExporter.cpp @@ -50,7 +50,6 @@ struct ScopExporter : public ScopPass { void printScop(raw_ostream &OS) const; void getAnalysisUsage(AnalysisUsage &AU) const; }; - } char ScopExporter::ID = 0; @@ -81,7 +80,6 @@ public: OpenScop(Scop *S); ~OpenScop(); void print(FILE *F); - }; OpenScop::OpenScop(Scop *S) : PollyScop(S) { @@ -222,7 +220,7 @@ void OpenScop::print(FILE *F) { openscop_scop_print_dot_scop(F, openscop); } /// @param user The matrix /// @param c The constraint int OpenScop::domainToMatrix_constraint(isl_constraint *c, void *user) { - openscop_matrix_p m = (openscop_matrix_p) user; + openscop_matrix_p m = (openscop_matrix_p)user; int nb_params = isl_constraint_dim(c, isl_space_param); int nb_vars = isl_constraint_dim(c, isl_space_set); @@ -271,7 +269,7 @@ int OpenScop::domainToMatrix_constraint(isl_constraint *c, void *user) { /// for matrix lists is currently not available in OpenScop. So union of /// polyhedron are not yet supported int OpenScop::domainToMatrix_basic_set(isl_basic_set *bset, void *user) { - openscop_matrix_p m = (openscop_matrix_p) user; + openscop_matrix_p m = (openscop_matrix_p)user; assert(!m->NbRows && "Union of polyhedron not yet supported"); isl_basic_set_foreach_constraint(bset, &domainToMatrix_constraint, user); @@ -308,7 +306,7 @@ openscop_matrix_p OpenScop::domainToMatrix(isl_set *PS) { /// @param user The matrix /// @param c The constraint int OpenScop::scatteringToMatrix_constraint(isl_constraint *c, void *user) { - openscop_matrix_p m = (openscop_matrix_p) user; + openscop_matrix_p m = (openscop_matrix_p)user; int nb_params = isl_constraint_dim(c, isl_space_param); int nb_in = isl_constraint_dim(c, isl_space_in); @@ -365,7 +363,7 @@ int OpenScop::scatteringToMatrix_constraint(isl_constraint *c, void *user) { /// for matrix lists is currently not available in OpenScop. So union of /// polyhedron are not yet supported int OpenScop::scatteringToMatrix_basic_map(isl_basic_map *bmap, void *user) { - openscop_matrix_p m = (openscop_matrix_p) user; + openscop_matrix_p m = (openscop_matrix_p)user; assert(!m->NbRows && "Union of polyhedron not yet supported"); isl_basic_map_foreach_constraint(bmap, &scatteringToMatrix_constraint, user); @@ -403,7 +401,7 @@ openscop_matrix_p OpenScop::scatteringToMatrix(isl_map *pmap) { /// @param user The matrix /// @param c The constraint int OpenScop::accessToMatrix_constraint(isl_constraint *c, void *user) { - openscop_matrix_p m = (openscop_matrix_p) user; + openscop_matrix_p m = (openscop_matrix_p)user; int nb_params = isl_constraint_dim(c, isl_space_param); int nb_in = isl_constraint_dim(c, isl_space_in); diff --git a/polly/lib/Exchange/ScopLib.cpp b/polly/lib/Exchange/ScopLib.cpp index b23894132cf..2516f5942f0 100644 --- a/polly/lib/Exchange/ScopLib.cpp +++ b/polly/lib/Exchange/ScopLib.cpp @@ -170,7 +170,7 @@ void ScopLib::print(FILE *F) { scoplib_scop_print_dot_scop(F, scoplib); } /// @param user The matrix /// @param c The constraint int ScopLib::domainToMatrix_constraint(isl_constraint *c, void *user) { - scoplib_matrix_p m = (scoplib_matrix_p) user; + scoplib_matrix_p m = (scoplib_matrix_p)user; int nb_params = isl_constraint_dim(c, isl_dim_param); int nb_vars = isl_constraint_dim(c, isl_dim_set); @@ -223,7 +223,7 @@ int ScopLib::domainToMatrix_constraint(isl_constraint *c, void *user) { /// for matrix lists is currently not available in ScopLib. So union of /// polyhedron are not yet supported int ScopLib::domainToMatrix_basic_set(isl_basic_set *bset, void *user) { - scoplib_matrix_p m = (scoplib_matrix_p) user; + scoplib_matrix_p m = (scoplib_matrix_p)user; assert(!m->NbRows && "Union of polyhedron not yet supported"); isl_basic_set_foreach_constraint(bset, &domainToMatrix_constraint, user); @@ -258,7 +258,7 @@ scoplib_matrix_p ScopLib::domainToMatrix(__isl_take isl_set *set) { /// @param user The matrix /// @param c The constraint int ScopLib::scatteringToMatrix_constraint(isl_constraint *c, void *user) { - scoplib_matrix_p m = (scoplib_matrix_p) user; + scoplib_matrix_p m = (scoplib_matrix_p)user; int nb_params = isl_constraint_dim(c, isl_dim_param); int nb_in = isl_constraint_dim(c, isl_dim_in); @@ -313,7 +313,7 @@ int ScopLib::scatteringToMatrix_constraint(isl_constraint *c, void *user) { /// for matrix lists is currently not available in ScopLib. So union of /// polyhedron are not yet supported int ScopLib::scatteringToMatrix_basic_map(isl_basic_map *bmap, void *user) { - scoplib_matrix_p m = (scoplib_matrix_p) user; + scoplib_matrix_p m = (scoplib_matrix_p)user; assert(!m->NbRows && "Union of polyhedron not yet supported"); isl_basic_map_foreach_constraint(bmap, &scatteringToMatrix_constraint, user); @@ -353,7 +353,7 @@ scoplib_matrix_p ScopLib::scatteringToMatrix(__isl_take isl_map *map) { /// @param user The matrix /// @param c The constraint int ScopLib::accessToMatrix_constraint(isl_constraint *c, void *user) { - scoplib_matrix_p m = (scoplib_matrix_p) user; + scoplib_matrix_p m = (scoplib_matrix_p)user; int nb_params = isl_constraint_dim(c, isl_dim_param); int nb_in = isl_constraint_dim(c, isl_dim_in); diff --git a/polly/lib/Exchange/ScopLibExporter.cpp b/polly/lib/Exchange/ScopLibExporter.cpp index 6955a9c7bb3..5267261a0e9 100644 --- a/polly/lib/Exchange/ScopLibExporter.cpp +++ b/polly/lib/Exchange/ScopLibExporter.cpp @@ -48,7 +48,6 @@ public: virtual bool runOnScop(Scop &scop); void getAnalysisUsage(AnalysisUsage &AU) const; }; - } char ScopLibExporter::ID = 0; diff --git a/polly/lib/Exchange/ScopLibImporter.cpp b/polly/lib/Exchange/ScopLibImporter.cpp index 381e6a40632..dbd0b35eb28 100644 --- a/polly/lib/Exchange/ScopLibImporter.cpp +++ b/polly/lib/Exchange/ScopLibImporter.cpp @@ -107,7 +107,6 @@ void ScopLibImporter::getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<ScopInfo>(); AU.addRequired<Dependences>(); } - } static RegisterPass<ScopLibImporter> diff --git a/polly/lib/IndVarSimplify.cpp b/polly/lib/IndVarSimplify.cpp index 19265887027..c9866eeff44 100644 --- a/polly/lib/IndVarSimplify.cpp +++ b/polly/lib/IndVarSimplify.cpp @@ -218,7 +218,9 @@ static bool ConvertToSInt(const APFloat &APF, int64_t &IntVal) { // See if we can convert this to an int64_t uint64_t UIntVal; if (APF.convertToInteger(&UIntVal, 64, true, APFloat::rmTowardZero, - &isExact) != APFloat::opOK || !isExact) + &isExact) != + APFloat::opOK || + !isExact) return false; IntVal = UIntVal; return true; @@ -1557,8 +1559,8 @@ static Value *genLoopLimit(PHINode *IndVar, const SCEV *IVCount, Loop *L, // We could handle pointer IVs other than i8*, but we need to compensate for // gep index scaling. See canExpandBackedgeTakenCount comments. assert(SE->getSizeOfExpr(cast<PointerType>(GEPBase->getType()) - ->getElementType()) - ->isOne() && "unit stride pointer IV must be i8*"); + ->getElementType())->isOne() && + "unit stride pointer IV must be i8*"); IRBuilder<> Builder(L->getLoopPreheader()->getTerminator()); return Builder.CreateGEP(GEPBase, GEPOffset, "lftr.limit"); @@ -1656,7 +1658,8 @@ Value *PollyIndVarSimplify::LinearFunctionTestReplace( Value *ExitCnt = genLoopLimit(IndVar, IVCount, L, Rewriter, SE); assert(ExitCnt->getType()->isPointerTy() == - IndVar->getType()->isPointerTy() && "genLoopLimit missed a cast"); + IndVar->getType()->isPointerTy() && + "genLoopLimit missed a cast"); // Insert a new icmp_ne or icmp_eq instruction before the branch. BranchInst *BI = cast<BranchInst>(L->getExitingBlock()->getTerminator()); @@ -1850,7 +1853,7 @@ bool PollyIndVarSimplify::runOnLoop(Loop *L, LPPassManager &LPM) { // but just a canonical induction variable. In the near future, we // should remove the need of canonical induction variables all // together. - //if (EnableIVRewrite) + // if (EnableIVRewrite) // Changed |= simplifyIVUsers(IU, SE, &LPM, DeadInsts); // Eliminate redundant IV cycles. diff --git a/polly/lib/IndependentBlocks.cpp b/polly/lib/IndependentBlocks.cpp index cb636486a90..8b3f12b0123 100644 --- a/polly/lib/IndependentBlocks.cpp +++ b/polly/lib/IndependentBlocks.cpp @@ -403,7 +403,7 @@ bool IndependentBlocks::translateScalarToArray(Instruction *Inst, StorePos = Inst; StorePos++; } - (void) new StoreInst(Inst, Slot, StorePos); + (void)new StoreInst(Inst, Slot, StorePos); if (!LoadOutside.empty()) { LoadInst *ExitLoad = new LoadInst(Slot, Inst->getName() + ".loadoutside", diff --git a/polly/lib/Pocc.cpp b/polly/lib/Pocc.cpp index a683243be07..30bf1a7dc53 100644 --- a/polly/lib/Pocc.cpp +++ b/polly/lib/Pocc.cpp @@ -67,7 +67,6 @@ public: private: bool runTransform(Scop &S); }; - } char Pocc::ID = 0; diff --git a/polly/lib/ScheduleOptimizer.cpp b/polly/lib/ScheduleOptimizer.cpp index d88563b3924..415bc6e5588 100644 --- a/polly/lib/ScheduleOptimizer.cpp +++ b/polly/lib/ScheduleOptimizer.cpp @@ -37,7 +37,9 @@ using namespace llvm; using namespace polly; -namespace polly { bool DisablePollyTiling; } +namespace polly { +bool DisablePollyTiling; +} static cl::opt<bool, true> DisableTiling("polly-no-tiling", cl::desc("Disable tiling in the scheduler"), cl::location(polly::DisablePollyTiling), cl::init(false), @@ -185,7 +187,6 @@ private: return true; } }; - } char IslScheduleOptimizer::ID = 0; diff --git a/polly/lib/Support/GICHelper.cpp b/polly/lib/Support/GICHelper.cpp index 11fc197967f..28f86d664de 100644 --- a/polly/lib/Support/GICHelper.cpp +++ b/polly/lib/Support/GICHelper.cpp @@ -70,7 +70,7 @@ APInt polly::APInt_from_MPZ(const mpz_t mpz) { p = (uint64_t *)mpz_export(p, &sz, -1, sizeof(uint64_t), 0, 0, mpz); if (p) { - APInt A((unsigned) mpz_sizeinbase(mpz, 2), (unsigned) sz, p); + APInt A((unsigned)mpz_sizeinbase(mpz, 2), (unsigned)sz, p); A = A.zext(A.getBitWidth() + 1); free(p); @@ -90,7 +90,7 @@ APInt polly::APIntFromVal(__isl_take isl_val *Val) { NumChunks = isl_val_n_abs_num_chunks(Val, sizeof(uint64_t)); - Data = (uint64_t*) malloc(NumChunks * sizeof(uint64_t)); + Data = (uint64_t *)malloc(NumChunks * sizeof(uint64_t)); isl_val_get_abs_num_chunks(Val, sizeof(uint64_t), Data); APInt A(8 * sizeof(uint64_t) * NumChunks, NumChunks, Data); diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp index d4e081a28a7..afb41a421e1 100644 --- a/polly/lib/Support/SCEVValidator.cpp +++ b/polly/lib/Support/SCEVValidator.cpp @@ -120,8 +120,8 @@ raw_ostream &operator<<(raw_ostream &OS, class ValidatorResult &VR) { } /// Check if a SCEV is valid in a SCoP. -struct SCEVValidator : - public SCEVVisitor<SCEVValidator, class ValidatorResult> { +struct SCEVValidator + : public SCEVVisitor<SCEVValidator, class ValidatorResult> { private: const Region *R; ScalarEvolution &SE; @@ -349,8 +349,8 @@ public: /// @brief Check whether a SCEV refers to an SSA name defined inside a region. /// -struct SCEVInRegionDependences : - public SCEVVisitor<SCEVInRegionDependences, bool> { +struct SCEVInRegionDependences + : public SCEVVisitor<SCEVInRegionDependences, bool> { public: /// Returns true when the SCEV has SSA names defined in region R. |