diff options
author | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-12-29 23:57:18 +0000 |
---|---|---|
committer | Tobias Grosser <grosser@fim.uni-passau.de> | 2012-12-29 23:57:18 +0000 |
commit | ae2d83ec410b2959b7fa4bf5e3f9f9fdf8ef8b19 (patch) | |
tree | b2fff4aa17ba01f54f3d968cda9a9f9c1729b774 | |
parent | 1bb59b0dcfccdaada07e2d180d5929a2dd0b1493 (diff) | |
download | bcm5719-llvm-ae2d83ec410b2959b7fa4bf5e3f9f9fdf8ef8b19.tar.gz bcm5719-llvm-ae2d83ec410b2959b7fa4bf5e3f9f9fdf8ef8b19.zip |
Formatting: Break lines after binary operators such as '&&'
assert(Condition
&& "Text");
->
assert(Condition &&
"Text);
This aligns Polly with the style used in LLVM.
llvm-svn: 171242
-rw-r--r-- | polly/lib/Analysis/ScopInfo.cpp | 4 | ||||
-rw-r--r-- | polly/lib/CodeGen/BlockGenerators.cpp | 12 | ||||
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 14 | ||||
-rw-r--r-- | polly/lib/CodeGen/IslCodeGeneration.cpp | 52 | ||||
-rw-r--r-- | polly/lib/CodeGen/LoopGenerators.cpp | 4 |
5 files changed, 43 insertions, 43 deletions
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index b8772dbe52e..8626ae27a6f 100644 --- a/polly/lib/Analysis/ScopInfo.cpp +++ b/polly/lib/Analysis/ScopInfo.cpp @@ -185,8 +185,8 @@ public: __isl_give isl_pw_aff *visitAddRecExpr(const SCEVAddRecExpr *Expr) { assert(Expr->isAffine() && "Only affine AddRecurrences allowed"); - assert(S->getRegion().contains(Expr->getLoop()) - && "Scop does not contain the loop referenced in this AddRec"); + assert(S->getRegion().contains(Expr->getLoop()) && + "Scop does not contain the loop referenced in this AddRec"); isl_pw_aff *Start = visit(Expr->getStart()); isl_pw_aff *Step = visit(Expr->getOperand(1)); diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp index 75122cadab9..ca2fdacac87 100644 --- a/polly/lib/CodeGen/BlockGenerators.cpp +++ b/polly/lib/CodeGen/BlockGenerators.cpp @@ -186,8 +186,8 @@ public: if (!IV) return Expr; - assert(Expr->getNumOperands() == 2 - && "An AddRecExpr with more than two operands can not be rewritten."); + assert(Expr->getNumOperands() == 2 && + "An AddRecExpr with more than two operands can not be rewritten."); const SCEV *Base, *Step, *IVExpr, *Product; @@ -439,8 +439,8 @@ std::vector<Value*> BlockGenerator::getMemoryAccessIndex( __isl_keep isl_map *AccessRelation, Value *BaseAddress, ValueMapT &BBMap, ValueMapT &GlobalMap) { - assert((isl_map_dim(AccessRelation, isl_dim_out) == 1) - && "Only single dimensional access functions supported"); + assert((isl_map_dim(AccessRelation, isl_dim_out) == 1) && + "Only single dimensional access functions supported"); std::vector<Value *> IVS; for (unsigned i = 0; i < Statement.getNumIterators(); ++i) { @@ -482,8 +482,8 @@ Value *BlockGenerator::generateLocationAccessed(const Instruction *Inst, isl_map *CurrentAccessRelation = Access.getAccessRelation(); isl_map *NewAccessRelation = Access.getNewAccessRelation(); - assert(isl_map_has_equal_space(CurrentAccessRelation, NewAccessRelation) - && "Current and new access function use different spaces"); + assert(isl_map_has_equal_space(CurrentAccessRelation, NewAccessRelation) && + "Current and new access function use different spaces"); Value *NewPointer; diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index 06378db25fb..bd8f3d1300a 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -385,9 +385,9 @@ void ClastStmtCodeGen::codegenSubstitutions(const clast_stmt *Assignment, int Dimension = 0; while (Assignment) { - assert(CLAST_STMT_IS_A(Assignment, stmt_ass) - && "Substitions are expected to be assignments"); - codegen((const clast_assignment *)Assignment, Statement, Dimension, + assert(CLAST_STMT_IS_A(Assignment, stmt_ass) && + "Substitions are expected to be assignments"); + codegen((const clast_assignment *) Assignment, Statement, Dimension, vectorDim, VectorVMap); Assignment = Assignment->next; Dimension++; @@ -684,8 +684,8 @@ void ClastStmtCodeGen::codegenForGPGPU(const clast_for *F) { std::vector<int> NumIterations; PTXGenerator::ValueToValueMapTy VMap; - assert(!GPUTriple.empty() - && "Target triple should be set properly for GPGPU code generation."); + assert(!GPUTriple.empty() && + "Target triple should be set properly for GPGPU code generation."); PTXGenerator PTXGen(Builder, P, GPUTriple); // Get original IVS and ScopStmt @@ -823,8 +823,8 @@ bool ClastStmtCodeGen::isParallelFor(const clast_for *f) { void ClastStmtCodeGen::codegen(const clast_for *f) { bool Vector = PollyVectorizerChoice != VECTORIZER_NONE; if ((Vector || OpenMP) && isParallelFor(f)) { - if (Vector && isInnermostLoop(f) && (-1 != getNumberOfIterations(f)) - && (getNumberOfIterations(f) <= 16)) { + if (Vector && isInnermostLoop(f) && (-1 != getNumberOfIterations(f)) && + (getNumberOfIterations(f) <= 16)) { codegenForVector(f); return; } diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index 48934b61795..e90488a4fc0 100644 --- a/polly/lib/CodeGen/IslCodeGeneration.cpp +++ b/polly/lib/CodeGen/IslCodeGeneration.cpp @@ -171,8 +171,8 @@ Type *IslExprBuilder::getWidestType(Type *T1, Type *T2) { } Value *IslExprBuilder::createOpUnary(__isl_take isl_ast_expr *Expr) { - assert (isl_ast_expr_get_op_type(Expr) == isl_ast_op_minus - && "Unsupported unary operation"); + assert(isl_ast_expr_get_op_type(Expr) == isl_ast_op_minus && + "Unsupported unary operation"); Value *V; Type *MaxType = getType(Expr); @@ -188,10 +188,10 @@ Value *IslExprBuilder::createOpUnary(__isl_take isl_ast_expr *Expr) { } Value *IslExprBuilder::createOpNAry(__isl_take isl_ast_expr *Expr) { - assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op - && "isl ast expression not of type isl_ast_op"); - assert(isl_ast_expr_get_op_n_arg(Expr) >= 2 - && "We need at least two operands in an n-ary operation"); + assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && + "isl ast expression not of type isl_ast_op"); + assert(isl_ast_expr_get_op_n_arg(Expr) >= 2 && + "We need at least two operands in an n-ary operation"); Value *V; @@ -241,10 +241,10 @@ Value *IslExprBuilder::createOpBin(__isl_take isl_ast_expr *Expr) { Type *MaxType; isl_ast_op_type OpType; - assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op - && "isl ast expression not of type isl_ast_op"); - assert(isl_ast_expr_get_op_n_arg(Expr) == 2 - && "not a binary isl ast expression"); + assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && + "isl ast expression not of type isl_ast_op"); + assert(isl_ast_expr_get_op_n_arg(Expr) == 2 && + "not a binary isl ast expression"); OpType = isl_ast_expr_get_op_type(Expr); @@ -328,8 +328,8 @@ Value *IslExprBuilder::createOpBin(__isl_take isl_ast_expr *Expr) { } Value *IslExprBuilder::createOpSelect(__isl_take isl_ast_expr *Expr) { - assert (isl_ast_expr_get_op_type(Expr) == isl_ast_op_select - && "Unsupported unary isl ast expression"); + assert(isl_ast_expr_get_op_type(Expr) == isl_ast_op_select && + "Unsupported unary isl ast expression"); Value *LHS, *RHS, *Cond; Type *MaxType = getType(Expr); @@ -440,8 +440,8 @@ Value *IslExprBuilder::createOpBoolean(__isl_take isl_ast_expr *Expr) { } Value *IslExprBuilder::createOp(__isl_take isl_ast_expr *Expr) { - assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op - && "Expression not of type isl_ast_expr_op"); + assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_op && + "Expression not of type isl_ast_expr_op"); switch (isl_ast_expr_get_op_type(Expr)) { case isl_ast_op_error: case isl_ast_op_cond: @@ -479,8 +479,8 @@ Value *IslExprBuilder::createOp(__isl_take isl_ast_expr *Expr) { } Value *IslExprBuilder::createId(__isl_take isl_ast_expr *Expr) { - assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_id - && "Expression not of type isl_ast_expr_ident"); + assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_id && + "Expression not of type isl_ast_expr_ident"); isl_id *Id; Value *V; @@ -506,8 +506,8 @@ IntegerType *IslExprBuilder::getType(__isl_keep isl_ast_expr *Expr) { } Value *IslExprBuilder::createInt(__isl_take isl_ast_expr *Expr) { - assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_int - && "Expression not of type isl_ast_expr_int"); + assert(isl_ast_expr_get_type(Expr) == isl_ast_expr_int && + "Expression not of type isl_ast_expr_int"); isl_int Int; Value *V; APInt APValue; @@ -611,8 +611,8 @@ __isl_give isl_ast_expr *IslNodeBuilder::getUpperBound( Iterator = isl_ast_node_for_get_iterator(For); Type = isl_ast_expr_get_op_type(Cond); - assert(isl_ast_expr_get_type(Cond) == isl_ast_expr_op - && "conditional expression is not an atomic upper bound"); + assert(isl_ast_expr_get_type(Cond) == isl_ast_expr_op && + "conditional expression is not an atomic upper bound"); switch (Type) { case isl_ast_op_le: @@ -627,18 +627,18 @@ __isl_give isl_ast_expr *IslNodeBuilder::getUpperBound( Arg0 = isl_ast_expr_get_op_arg(Cond, 0); - assert(isl_ast_expr_get_type(Arg0) == isl_ast_expr_id - && "conditional expression is not an atomic upper bound"); + assert(isl_ast_expr_get_type(Arg0) == isl_ast_expr_id && + "conditional expression is not an atomic upper bound"); UBID = isl_ast_expr_get_id(Arg0); - assert(isl_ast_expr_get_type(Iterator) == isl_ast_expr_id - && "Could not get the iterator"); + assert(isl_ast_expr_get_type(Iterator) == isl_ast_expr_id && + "Could not get the iterator"); IteratorID = isl_ast_expr_get_id(Iterator); - assert(UBID == IteratorID - && "conditional expression is not an atomic upper bound"); + assert(UBID == IteratorID && + "conditional expression is not an atomic upper bound"); UB = isl_ast_expr_get_op_arg(Cond, 1); diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp index dbcaf563b60..230cb6369c8 100644 --- a/polly/lib/CodeGen/LoopGenerators.cpp +++ b/polly/lib/CodeGen/LoopGenerators.cpp @@ -42,8 +42,8 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride, Builder.SetInsertPoint(HeaderBB); // Use the type of upper and lower bound. - assert(LB->getType() == UB->getType() - && "Different types for upper and lower bound."); + assert(LB->getType() == UB->getType() && + "Different types for upper and lower bound."); IntegerType *LoopIVType = dyn_cast<IntegerType>(UB->getType()); assert(LoopIVType && "UB is not integer?"); |