[llvm-commits] [polly] r171242 - in /polly/trunk/lib: Analysis/ScopInfo.cpp CodeGen/BlockGenerators.cpp CodeGen/CodeGeneration.cpp CodeGen/IslCodeGeneration.cpp CodeGen/LoopGenerators.cpp
Tobias Grosser
grosser at fim.uni-passau.de
Sat Dec 29 15:57:18 PST 2012
Author: grosser
Date: Sat Dec 29 17:57:18 2012
New Revision: 171242
URL: http://llvm.org/viewvc/llvm-project?rev=171242&view=rev
Log:
Formatting: Break lines after binary operators such as '&&'
assert(Condition
&& "Text");
->
assert(Condition &&
"Text);
This aligns Polly with the style used in LLVM.
Modified:
polly/trunk/lib/Analysis/ScopInfo.cpp
polly/trunk/lib/CodeGen/BlockGenerators.cpp
polly/trunk/lib/CodeGen/CodeGeneration.cpp
polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
polly/trunk/lib/CodeGen/LoopGenerators.cpp
Modified: polly/trunk/lib/Analysis/ScopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopInfo.cpp?rev=171242&r1=171241&r2=171242&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopInfo.cpp (original)
+++ polly/trunk/lib/Analysis/ScopInfo.cpp Sat Dec 29 17:57:18 2012
@@ -185,8 +185,8 @@
__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));
Modified: polly/trunk/lib/CodeGen/BlockGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/BlockGenerators.cpp?rev=171242&r1=171241&r2=171242&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/BlockGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/BlockGenerators.cpp Sat Dec 29 17:57:18 2012
@@ -186,8 +186,8 @@
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 @@
__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 @@
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;
Modified: polly/trunk/lib/CodeGen/CodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/CodeGeneration.cpp?rev=171242&r1=171241&r2=171242&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/CodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/CodeGeneration.cpp Sat Dec 29 17:57:18 2012
@@ -385,9 +385,9 @@
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 @@
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 @@
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;
}
Modified: polly/trunk/lib/CodeGen/IslCodeGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslCodeGeneration.cpp?rev=171242&r1=171241&r2=171242&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslCodeGeneration.cpp (original)
+++ polly/trunk/lib/CodeGen/IslCodeGeneration.cpp Sat Dec 29 17:57:18 2012
@@ -171,8 +171,8 @@
}
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::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 @@
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::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::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::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 @@
}
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 @@
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 @@
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);
Modified: polly/trunk/lib/CodeGen/LoopGenerators.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/LoopGenerators.cpp?rev=171242&r1=171241&r2=171242&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/LoopGenerators.cpp (original)
+++ polly/trunk/lib/CodeGen/LoopGenerators.cpp Sat Dec 29 17:57:18 2012
@@ -42,8 +42,8 @@
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?");
More information about the llvm-commits
mailing list