Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions llvm/lib/Transforms/Scalar/LoopBoundSplit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

#define DEBUG_TYPE "loop-bound-split"

namespace llvm {

using namespace llvm;
using namespace PatternMatch;

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

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

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

return getLoopPassPreservedAnalyses();
}

} // end namespace llvm