summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp8
-rw-r--r--polly/lib/CodeGen/CodeGeneration.cpp24
-rw-r--r--polly/lib/CodeGen/IslAst.cpp4
-rw-r--r--polly/lib/CodeGen/IslCodeGeneration.cpp8
4 files changed, 23 insertions, 21 deletions
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index bfd70641cb9..6eb2e583c38 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -179,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;
@@ -338,9 +338,9 @@ BlockGenerator::generateScalarStore(const StoreInst *Store, ValueMapT &BBMap,
return Builder.CreateStore(ValueOperand, NewPointer);
}
-void BlockGenerator::copyInstruction(const Instruction *Inst, ValueMapT &BBMap,
- ValueMapT &GlobalMap,
- LoopToScevMapT &LTS) {
+void
+BlockGenerator::copyInstruction(const Instruction *Inst, ValueMapT &BBMap,
+ ValueMapT &GlobalMap, LoopToScevMapT &LTS) {
// Terminator instructions control the control flow. They are explicitly
// expressed in the clast and do not need to be copied.
if (Inst->isTerminator())
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp
index 664638c00f6..833d20b7793 100644
--- a/polly/lib/CodeGen/CodeGeneration.cpp
+++ b/polly/lib/CodeGen/CodeGeneration.cpp
@@ -88,6 +88,7 @@ class ClastExpCodeGen {
Value *codegen(const clast_term *e, Type *Ty);
Value *codegen(const clast_binary *e, Type *Ty);
Value *codegen(const clast_reduction *r, Type *Ty);
+
public:
// A generator for clast expressions.
@@ -261,10 +262,10 @@ private:
void codegen(const clast_assignment *a);
- void codegen(const clast_assignment *a, ScopStmt *Statement,
- unsigned Dimension, int vectorDim,
- std::vector<ValueMapT> *VectorVMap = 0,
- std::vector<LoopToScevMapT> *VLTS = 0);
+ void
+ codegen(const clast_assignment *a, ScopStmt *Statement, unsigned Dimension,
+ int vectorDim, std::vector<ValueMapT> *VectorVMap = 0,
+ std::vector<LoopToScevMapT> *VLTS = 0);
void codegenSubstitutions(const clast_stmt *Assignment, ScopStmt *Statement,
int vectorDim = 0,
@@ -421,9 +422,9 @@ extractPartialSchedule(ScopStmt *Statement, isl_set *Domain) {
UnscheduledDimensions);
}
-void ClastStmtCodeGen::codegen(const clast_user_stmt *u,
- std::vector<Value *> *IVS, const char *iterator,
- isl_set *Domain) {
+void
+ClastStmtCodeGen::codegen(const clast_user_stmt *u, std::vector<Value *> *IVS,
+ const char *iterator, isl_set *Domain) {
ScopStmt *Statement = (ScopStmt *)u->statement->usr;
if (u->substitutions)
@@ -488,6 +489,7 @@ void ClastStmtCodeGen::codegenForSequential(const clast_for *f) {
// clast. Scalar parameters are scalar variables defined outside of the SCoP.
class ParameterVisitor : public ClastVisitor {
std::set<Value *> Values;
+
public:
ParameterVisitor() : ClastVisitor(), Values() {}
@@ -545,8 +547,8 @@ SetVector<Value *> ClastStmtCodeGen::getOMPValues(const clast_stmt *Body) {
return Values;
}
-void ClastStmtCodeGen::updateWithValueMap(
- OMPGenerator::ValueToValueMapTy &VMap) {
+void
+ClastStmtCodeGen::updateWithValueMap(OMPGenerator::ValueToValueMapTy &VMap) {
std::set<Value *> Inserted;
for (CharMapT::iterator I = ClastVars.begin(), E = ClastVars.end(); I != E;
@@ -986,8 +988,8 @@ public:
Region &R = S.getRegion();
- assert (!R.isTopLevelRegion() && "Top level regions are not supported");
- assert (R.getEnteringBlock() && "Only support regions with a single entry");
+ assert(!R.isTopLevelRegion() && "Top level regions are not supported");
+ assert(R.getEnteringBlock() && "Only support regions with a single entry");
if (!R.getExitingBlock()) {
BasicBlock *newExit = createSingleExitEdge(&R, this);
diff --git a/polly/lib/CodeGen/IslAst.cpp b/polly/lib/CodeGen/IslAst.cpp
index 4f68b89b2ac..0a42c1dd9c4 100644
--- a/polly/lib/CodeGen/IslAst.cpp
+++ b/polly/lib/CodeGen/IslAst.cpp
@@ -143,8 +143,8 @@ static void freeIslAstUser(void *Ptr) {
// dimension, then the loop is parallel. The distance is zero in the current
// dimension if it is a subset of a map with equal values for the current
// dimension.
-static bool astScheduleDimIsParallel(__isl_keep isl_ast_build *Build,
- Dependences *D) {
+static bool
+astScheduleDimIsParallel(__isl_keep isl_ast_build *Build, Dependences *D) {
isl_union_map *Schedule, *Deps;
isl_map *ScheduleDeps, *Test;
isl_space *ScheduleSpace;
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp
index 6e0d225ce16..32025e08ffc 100644
--- a/polly/lib/CodeGen/IslCodeGeneration.cpp
+++ b/polly/lib/CodeGen/IslCodeGeneration.cpp
@@ -698,8 +698,8 @@ void IslNodeBuilder::createUserVector(
isl_ast_node_free(User);
}
-void IslNodeBuilder::createForVector(__isl_take isl_ast_node *For,
- int VectorWidth) {
+void
+IslNodeBuilder::createForVector(__isl_take isl_ast_node *For, int VectorWidth) {
isl_ast_node *Body = isl_ast_node_for_get_body(For);
isl_ast_expr *Init = isl_ast_node_for_get_init(For);
isl_ast_expr *Inc = isl_ast_node_for_get_inc(For);
@@ -1028,8 +1028,8 @@ public:
Region &R = S.getRegion();
- assert (!R.isTopLevelRegion() && "Top level regions are not supported");
- assert (R.getEnteringBlock() && "Only support regions with a single entry");
+ assert(!R.isTopLevelRegion() && "Top level regions are not supported");
+ assert(R.getEnteringBlock() && "Only support regions with a single entry");
if (!R.getExitingBlock()) {
BasicBlock *newExit = createSingleExitEdge(&R, this);
OpenPOWER on IntegriCloud