Skip to content

Commit 978fa9c

Browse files
d0klegrosbuffle
authored andcommitted
[LoopUnroll] Fold variable only used in assert into the assert
Avoids warnings in Release builds. NFCI.
1 parent 7f1233f commit 978fa9c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3528,8 +3528,8 @@ static int32_t computeHeuristicUnrollFactor(CanonicalLoopInfo *CLI) {
35283528
return 1;
35293529
}
35303530

3531-
unsigned LoopSize = UCE.getRolledLoopSize();
3532-
LLVM_DEBUG(dbgs() << "Estimated loop size is " << LoopSize << "\n");
3531+
LLVM_DEBUG(dbgs() << "Estimated loop size is " << UCE.getRolledLoopSize()
3532+
<< "\n");
35333533

35343534
// TODO: Determine trip count of \p CLI if constant, computeUnrollCount might
35353535
// be able to use it.

llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,8 @@ tryToUnrollAndJamLoop(Loop *L, DominatorTree &DT, LoopInfo *LI,
333333
}
334334

335335
unsigned InnerLoopSize = InnerUCE.getRolledLoopSize();
336-
unsigned OuterLoopSize = OuterUCE.getRolledLoopSize();
337-
LLVM_DEBUG(dbgs() << " Outer Loop Size: " << OuterLoopSize << "\n");
336+
LLVM_DEBUG(dbgs() << " Outer Loop Size: " << OuterUCE.getRolledLoopSize()
337+
<< "\n");
338338
LLVM_DEBUG(dbgs() << " Inner Loop Size: " << InnerLoopSize << "\n");
339339

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

0 commit comments

Comments
 (0)