Skip to content

Commit df3f245

Browse files
authored
[NFC][LLVM] Code cleanup in LoopBoundSplit (#163595)
1 parent 721a360 commit df3f245

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121

2222
#define DEBUG_TYPE "loop-bound-split"
2323

24-
namespace llvm {
25-
24+
using namespace llvm;
2625
using namespace PatternMatch;
2726

2827
namespace {
@@ -358,8 +357,7 @@ static bool splitLoopBound(Loop &L, DominatorTree &DT, LoopInfo &LI,
358357
IRBuilder<> Builder(&PostLoopPreHeader->front());
359358

360359
// Update phi nodes in header of post-loop.
361-
bool isExitingLatch =
362-
(L.getExitingBlock() == L.getLoopLatch()) ? true : false;
360+
bool isExitingLatch = L.getExitingBlock() == L.getLoopLatch();
363361
Value *ExitingCondLCSSAPhi = nullptr;
364362
for (PHINode &PN : L.getHeader()->phis()) {
365363
// Create LCSSA phi node in preheader of post-loop.
@@ -472,8 +470,7 @@ static bool splitLoopBound(Loop &L, DominatorTree &DT, LoopInfo &LI,
472470
PreservedAnalyses LoopBoundSplitPass::run(Loop &L, LoopAnalysisManager &AM,
473471
LoopStandardAnalysisResults &AR,
474472
LPMUpdater &U) {
475-
Function &F = *L.getHeader()->getParent();
476-
(void)F;
473+
[[maybe_unused]] Function &F = *L.getHeader()->getParent();
477474

478475
LLVM_DEBUG(dbgs() << "Spliting bound of loop in " << F.getName() << ": " << L
479476
<< "\n");
@@ -486,5 +483,3 @@ PreservedAnalyses LoopBoundSplitPass::run(Loop &L, LoopAnalysisManager &AM,
486483

487484
return getLoopPassPreservedAnalyses();
488485
}
489-
490-
} // end namespace llvm

0 commit comments

Comments
 (0)