Skip to content

Commit

Permalink
[LoopUnroll] Fold variable only used in assert into the assert
Browse files Browse the repository at this point in the history
Avoids warnings in Release builds. NFCI.
  • Loading branch information
d0k committed Sep 27, 2023
1 parent 65de98f commit 4731623
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3528,8 +3528,8 @@ static int32_t computeHeuristicUnrollFactor(CanonicalLoopInfo *CLI) {
return 1;
}

unsigned LoopSize = UCE.getRolledLoopSize();
LLVM_DEBUG(dbgs() << "Estimated loop size is " << LoopSize << "\n");
LLVM_DEBUG(dbgs() << "Estimated loop size is " << UCE.getRolledLoopSize()
<< "\n");

// TODO: Determine trip count of \p CLI if constant, computeUnrollCount might
// be able to use it.
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ tryToUnrollAndJamLoop(Loop *L, DominatorTree &DT, LoopInfo *LI,
}

unsigned InnerLoopSize = InnerUCE.getRolledLoopSize();
unsigned OuterLoopSize = OuterUCE.getRolledLoopSize();
LLVM_DEBUG(dbgs() << " Outer Loop Size: " << OuterLoopSize << "\n");
LLVM_DEBUG(dbgs() << " Outer Loop Size: " << OuterUCE.getRolledLoopSize()
<< "\n");
LLVM_DEBUG(dbgs() << " Inner Loop Size: " << InnerLoopSize << "\n");

if (InnerUCE.NumInlineCandidates != 0 || OuterUCE.NumInlineCandidates != 0) {
Expand Down

0 comments on commit 4731623

Please sign in to comment.