Skip to content

Commit 9e29a55

Browse files
committed
[TSAR, Tfm, Interchange] Fix, trivial.
1 parent 5a7876e commit 9e29a55

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/Transform/Clang/LoopInterchange.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ class ClangLoopInterchangeVisitor
362362
llvm::SmallVector<clang::VarDecl *, 4> ValueSwaps;
363363
for (auto [Literal, Clause] : mSwaps) {
364364
auto Str{Literal->getString()};
365-
unsigned InductIdx{0}, InductIdxE{mInductions.size()};
365+
unsigned InductIdx{0}, InductIdxE = mInductions.size();
366366
for (; InductIdx < InductIdxE; ++InductIdx) {
367367
if (!std::get<clang::VarDecl *>(mInductions[InductIdx]))
368368
continue;
@@ -455,7 +455,7 @@ class ClangLoopInterchangeVisitor
455455
std::transform(mInductions.begin(), mInductions.begin() + MaxIdx + 1,
456456
std::back_inserter(Order),
457457
[](auto &I) { return std::get<clang::VarDecl *>(I); });
458-
for (unsigned I{0}, EI{ValueSwaps.size()}; I < EI; I += 2) {
458+
for (unsigned I{0}, EI = ValueSwaps.size(); I < EI; I += 2) {
459459
auto FirstItr{find(Order, ValueSwaps[I])};
460460
assert(FirstItr != Order.end() && "Induction must exist!");
461461
auto SecondItr{find(Order, ValueSwaps[I + 1])};
@@ -514,7 +514,7 @@ class ClangLoopInterchangeVisitor
514514
clang::ForStmt *isMemoryAccessedIn(const DIMemory *DIM, const Loop *L,
515515
LoopNest::iterator I,
516516
LoopNest::iterator EI) {
517-
assert(std::get<const CanonicalLoopInfo *>(Induct) &&
517+
assert(DIM &&
518518
"Results of canonical loop analysis must be available for a loop!");
519519
for (auto &Induct : make_range(I, EI)) {
520520
if (isMemoryAccessedIn(

0 commit comments

Comments
 (0)