summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2017-01-16 14:08:10 +0000
committerTobias Grosser <tobias@grosser.es>2017-01-16 14:08:10 +0000
commit21a059af09620306404f3b6bf31aa975c49d2ca2 (patch)
treec1460890c5a744a8cee8824bc53d2384ac3d6e76
parent92fd612c8453ec693a658e3a189bc74392143872 (diff)
downloadbcm5719-llvm-21a059af09620306404f3b6bf31aa975c49d2ca2.tar.gz
bcm5719-llvm-21a059af09620306404f3b6bf31aa975c49d2ca2.zip
Adjust formatting to commit r292110 [NFC]
llvm-svn: 292123
-rw-r--r--polly/lib/Analysis/DependenceInfo.cpp15
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp5
-rw-r--r--polly/lib/Analysis/ScopDetectionDiagnostic.cpp9
-rw-r--r--polly/lib/Analysis/ScopInfo.cpp10
-rw-r--r--polly/lib/CodeGen/BlockGenerators.cpp16
-rw-r--r--polly/lib/CodeGen/IslNodeBuilder.cpp5
-rw-r--r--polly/lib/Support/SCEVValidator.cpp5
-rw-r--r--polly/lib/Support/ScopHelper.cpp5
-rw-r--r--polly/lib/Transform/ScheduleOptimizer.cpp13
-rw-r--r--polly/unittests/Isl/IslTest.cpp21
10 files changed, 61 insertions, 43 deletions
diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp
index 6b4e1352326..250bf73ab4b 100644
--- a/polly/lib/Analysis/DependenceInfo.cpp
+++ b/polly/lib/Analysis/DependenceInfo.cpp
@@ -151,8 +151,9 @@ static void collectInfo(Scop &S, isl_union_map **Read, isl_union_map **Write,
// to match the new access domains, thus we need
// [Stmt[i0, i1] -> MemAcc_A[i0 + i1]] -> [0, i0, 2, i1, 0]
isl_map *Schedule = Stmt.getSchedule();
- assert(Schedule && "Schedules that contain extension nodes require "
- "special handling.");
+ assert(Schedule &&
+ "Schedules that contain extension nodes require special "
+ "handling.");
Schedule = isl_map_apply_domain(
Schedule,
isl_map_reverse(isl_map_domain_map(isl_map_copy(accdom))));
@@ -163,8 +164,9 @@ static void collectInfo(Scop &S, isl_union_map **Read, isl_union_map **Write,
accdom = tag(accdom, MA, Level);
if (Level > Dependences::AL_Statement) {
auto *StmtScheduleMap = Stmt.getSchedule();
- assert(StmtScheduleMap && "Schedules that contain extension nodes "
- "require special handling.");
+ assert(StmtScheduleMap &&
+ "Schedules that contain extension nodes require special "
+ "handling.");
isl_map *Schedule = tag(StmtScheduleMap, MA, Level);
*StmtSchedule = isl_union_map_add_map(*StmtSchedule, Schedule);
}
@@ -274,8 +276,9 @@ void Dependences::addPrivatizationDependences() {
*PrivMap = isl_union_map_apply_range(isl_union_map_copy(*Map),
isl_union_map_copy(TC_RED));
*PrivMap = isl_union_map_union(
- *PrivMap, isl_union_map_apply_range(isl_union_map_copy(TC_RED),
- isl_union_map_copy(*Map)));
+ *PrivMap,
+ isl_union_map_apply_range(isl_union_map_copy(TC_RED),
+ isl_union_map_copy(*Map)));
*Map = isl_union_map_union(*Map, *PrivMap);
}
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index 60911a7e5b9..5809b442a85 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -218,8 +218,9 @@ STATISTIC(NumProfScopsDepthFour,
"Number of scops with maximal loop depth 4 (profitable scops only)");
STATISTIC(NumProfScopsDepthFive,
"Number of scops with maximal loop depth 5 (profitable scops only)");
-STATISTIC(NumProfScopsDepthLarger, "Number of scops with maximal loop depth 6 "
- "and larger (profitable scops only)");
+STATISTIC(NumProfScopsDepthLarger,
+ "Number of scops with maximal loop depth 6 and larger "
+ "(profitable scops only)");
class DiagnosticScopFound : public DiagnosticInfo {
private:
diff --git a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
index 1dc1270787f..2eff1f81eed 100644
--- a/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
+++ b/polly/lib/Analysis/ScopDetectionDiagnostic.cpp
@@ -60,8 +60,8 @@ llvm::Statistic RejectStatistics[] = {
SCOP_STAT(LoopBound, "Uncomputable loop bounds"),
SCOP_STAT(LoopHasNoExit, "Loop without exit"),
SCOP_STAT(FuncCall, "Function call with side effects"),
- SCOP_STAT(NonSimpleMemoryAccess, "Compilated access semantics (volatile or "
- "atomic)"),
+ SCOP_STAT(NonSimpleMemoryAccess,
+ "Compilated access semantics (volatile or atomic)"),
SCOP_STAT(Alias, "Base address aliasing"),
SCOP_STAT(Other, ""),
SCOP_STAT(IntToPtr, "Integer to pointer conversions"),
@@ -309,8 +309,9 @@ bool ReportDifferentArrayElementSize::classof(const RejectReason *RR) {
std::string ReportDifferentArrayElementSize::getEndUserMessage() const {
llvm::StringRef BaseName = BaseValue->getName();
std::string Name = (BaseName.size() > 0) ? BaseName : "UNKNOWN";
- return "The array \"" + Name + "\" is accessed through elements that differ "
- "in size";
+ return "The array \"" + Name +
+ "\" is accessed through elements that differ "
+ "in size";
}
//===----------------------------------------------------------------------===//
diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 35fd272a721..ee464d158f8 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -2168,8 +2168,9 @@ static bool calculateMinMaxAccess(__isl_take isl_union_map *Accesses,
isl_union_set *Locations = isl_union_map_range(Accesses);
Locations = isl_union_set_coalesce(Locations);
Locations = isl_union_set_detect_equalities(Locations);
- bool Valid = (0 == isl_union_set_foreach_set(Locations, buildMinMaxAccess,
- &MinMaxAccesses));
+ bool Valid = (0 ==
+ isl_union_set_foreach_set(Locations, buildMinMaxAccess,
+ &MinMaxAccesses));
isl_union_set_free(Locations);
return Valid;
}
@@ -3055,8 +3056,9 @@ bool Scop::buildAliasGroups(AliasAnalysis &AA) {
// Bail out if the number of values we need to compare is too large.
// This is important as the number of comparisons grows quadratically with
// the number of values we need to compare.
- if (!Valid || (MinMaxAccessesNonReadOnly.size() + ReadOnlyPairs.size() >
- RunTimeChecksMaxArraysPerGroup))
+ if (!Valid ||
+ (MinMaxAccessesNonReadOnly.size() + ReadOnlyPairs.size() >
+ RunTimeChecksMaxArraysPerGroup))
return false;
// Calculate minimal and maximal accesses for read only accesses.
diff --git a/polly/lib/CodeGen/BlockGenerators.cpp b/polly/lib/CodeGen/BlockGenerators.cpp
index 236e0ceccd8..8ef26557b47 100644
--- a/polly/lib/CodeGen/BlockGenerators.cpp
+++ b/polly/lib/CodeGen/BlockGenerators.cpp
@@ -476,9 +476,9 @@ void BlockGenerator::generateScalarStores(
__isl_keep isl_id_to_ast_expr *NewAccesses) {
Loop *L = LI.getLoopFor(Stmt.getBasicBlock());
- assert(Stmt.isBlockStmt() && "Region statements need to use the "
- "generateScalarStores() function in the "
- "RegionGenerator");
+ assert(Stmt.isBlockStmt() &&
+ "Region statements need to use the generateScalarStores() function in "
+ "the RegionGenerator");
for (MemoryAccess *MA : Stmt) {
if (MA->isOriginalArrayKind() || MA->isRead())
@@ -1060,8 +1060,9 @@ void VectorBlockGenerator::verifyNoScalarStores(ScopStmt &Stmt) {
void VectorBlockGenerator::copyStmt(
ScopStmt &Stmt, __isl_keep isl_id_to_ast_expr *NewAccesses) {
- assert(Stmt.isBlockStmt() && "TODO: Only block statements can be copied by "
- "the vector block generator");
+ assert(Stmt.isBlockStmt() &&
+ "TODO: Only block statements can be copied by the vector block "
+ "generator");
BasicBlock *BB = Stmt.getBasicBlock();
BasicBlock *CopyBB = SplitBlock(Builder.GetInsertBlock(),
@@ -1237,8 +1238,9 @@ void RegionGenerator::copyStmt(ScopStmt &Stmt, LoopToScevMapT &LTS,
BlockMap[R->getExit()] = ExitBBCopy;
BasicBlock *ExitDomBBCopy = BlockMap.lookup(findExitDominator(DT, R));
- assert(ExitDomBBCopy && "Common exit dominator must be within region; at "
- "least the entry node must match");
+ assert(ExitDomBBCopy &&
+ "Common exit dominator must be within region; at least the entry node "
+ "must match");
DT.changeImmediateDominator(ExitBBCopy, ExitDomBBCopy);
// As the block generator doesn't handle control flow we need to add the
diff --git a/polly/lib/CodeGen/IslNodeBuilder.cpp b/polly/lib/CodeGen/IslNodeBuilder.cpp
index d162fc24e09..1a9bf8a659c 100644
--- a/polly/lib/CodeGen/IslNodeBuilder.cpp
+++ b/polly/lib/CodeGen/IslNodeBuilder.cpp
@@ -458,8 +458,9 @@ void IslNodeBuilder::createForSequential(__isl_take isl_ast_node *For,
CmpInst::Predicate Predicate;
bool Parallel;
- Parallel = KnownParallel || (IslAstInfo::isParallel(For) &&
- !IslAstInfo::isReductionParallel(For));
+ Parallel =
+ KnownParallel ||
+ (IslAstInfo::isParallel(For) && !IslAstInfo::isReductionParallel(For));
Body = isl_ast_node_for_get_body(For);
diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp
index 848357f5afb..d5cc338a2bf 100644
--- a/polly/lib/Support/SCEVValidator.cpp
+++ b/polly/lib/Support/SCEVValidator.cpp
@@ -487,8 +487,9 @@ public:
Values.insert(Unknown->getValue());
Instruction *Inst = dyn_cast<Instruction>(Unknown->getValue());
- if (!Inst || (Inst->getOpcode() != Instruction::SRem &&
- Inst->getOpcode() != Instruction::SDiv))
+ if (!Inst ||
+ (Inst->getOpcode() != Instruction::SRem &&
+ Inst->getOpcode() != Instruction::SDiv))
return false;
auto *Dividend = SE.getSCEV(Inst->getOperand(1));
diff --git a/polly/lib/Support/ScopHelper.cpp b/polly/lib/Support/ScopHelper.cpp
index 71fc9e887a6..6dd52d9a0e9 100644
--- a/polly/lib/Support/ScopHelper.cpp
+++ b/polly/lib/Support/ScopHelper.cpp
@@ -296,8 +296,9 @@ private:
else
IP = RTCBB->getParent()->getEntryBlock().getTerminator();
- if (!Inst || (Inst->getOpcode() != Instruction::SRem &&
- Inst->getOpcode() != Instruction::SDiv))
+ if (!Inst ||
+ (Inst->getOpcode() != Instruction::SRem &&
+ Inst->getOpcode() != Instruction::SDiv))
return visitGenericInst(E, Inst, IP);
const SCEV *LHSScev = SE.getSCEV(Inst->getOperand(0));
diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp
index fc549e0d274..354d65ded9b 100644
--- a/polly/lib/Transform/ScheduleOptimizer.cpp
+++ b/polly/lib/Transform/ScheduleOptimizer.cpp
@@ -174,10 +174,12 @@ static cl::opt<int> FirstLevelDefaultTileSize(
" --polly-tile-sizes)"),
cl::Hidden, cl::init(32), cl::ZeroOrMore, cl::cat(PollyCategory));
-static cl::list<int> FirstLevelTileSizes(
- "polly-tile-sizes", cl::desc("A tile size for each loop dimension, filled "
+static cl::list<int>
+ FirstLevelTileSizes("polly-tile-sizes",
+ cl::desc("A tile size for each loop dimension, filled "
"with --polly-default-tile-size"),
- cl::Hidden, cl::ZeroOrMore, cl::CommaSeparated, cl::cat(PollyCategory));
+ cl::Hidden, cl::ZeroOrMore, cl::CommaSeparated,
+ cl::cat(PollyCategory));
static cl::opt<bool>
SecondLevelTiling("polly-2nd-level-tiling",
@@ -1064,8 +1066,9 @@ bool ScheduleTreeOptimizer::isProfitableSchedule(
return true;
auto *NewScheduleMap = isl_schedule_get_map(NewSchedule);
isl_union_map *OldSchedule = S.getSchedule();
- assert(OldSchedule && "Only IslScheduleOptimizer can insert extension nodes "
- "that make Scop::getSchedule() return nullptr.");
+ assert(OldSchedule &&
+ "Only IslScheduleOptimizer can insert extension nodes "
+ "that make Scop::getSchedule() return nullptr.");
bool changed = !isl_union_map_is_equal(OldSchedule, NewScheduleMap);
isl_union_map_free(OldSchedule);
isl_union_map_free(NewScheduleMap);
diff --git a/polly/unittests/Isl/IslTest.cpp b/polly/unittests/Isl/IslTest.cpp
index 1eb01db81be..c3ef5ba3458 100644
--- a/polly/unittests/Isl/IslTest.cpp
+++ b/polly/unittests/Isl/IslTest.cpp
@@ -303,8 +303,9 @@ TEST(Isl, Foreach) {
EXPECT_EQ(isl_stat_error,
foreachEltWithBreak(
TestMap, [&](IslPtr<isl_basic_map> BMap) -> isl_stat {
- EXPECT_EQ(isl_bool_true, isl_basic_map_is_equal(
- BMap.keep(), TestBMap.keep()));
+ EXPECT_EQ(
+ isl_bool_true,
+ isl_basic_map_is_equal(BMap.keep(), TestBMap.keep()));
NumBMaps++;
return isl_stat_error;
}));
@@ -328,13 +329,15 @@ TEST(Isl, Foreach) {
auto TestPwAff =
give(isl_pw_aff_val_on_domain(TestSet.copy(), isl_val_zero(Ctx.get())));
auto NumPieces = 0;
- foreachPieceWithBreak(TestPwAff, [&](IslPtr<isl_set> Domain,
- IslPtr<isl_aff> Aff) -> isl_stat {
- EXPECT_EQ(isl_bool_true, isl_set_is_equal(Domain.keep(), TestSet.keep()));
- EXPECT_EQ(isl_bool_true, isl_aff_is_cst(Aff.keep()));
- NumPieces++;
- return isl_stat_error;
- });
+ foreachPieceWithBreak(
+ TestPwAff,
+ [&](IslPtr<isl_set> Domain, IslPtr<isl_aff> Aff) -> isl_stat {
+ EXPECT_EQ(isl_bool_true,
+ isl_set_is_equal(Domain.keep(), TestSet.keep()));
+ EXPECT_EQ(isl_bool_true, isl_aff_is_cst(Aff.keep()));
+ NumPieces++;
+ return isl_stat_error;
+ });
EXPECT_EQ(1, NumPieces);
}
}
OpenPOWER on IntegriCloud