forked from OSchip/llvm-project
Adjust formatting to commit r292110 [NFC]
llvm-svn: 292123
This commit is contained in:
parent
92fd612c84
commit
21a059af09
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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";
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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 <S,
|
|||
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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue