Skip to content

Commit

Permalink
[Analysis] Use llvm::successors (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Jan 26, 2024
1 parent d7ff7c3 commit eeb0e9f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions llvm/lib/Analysis/InlineCost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2819,9 +2819,8 @@ InlineResult CallAnalyzer::analyze() {

// If we're unable to select a particular successor, just count all of
// them.
for (unsigned TIdx = 0, TSize = TI->getNumSuccessors(); TIdx != TSize;
++TIdx)
BBWorklist.insert(TI->getSuccessor(TIdx));
for (BasicBlock *Succ : successors(BB))
BBWorklist.insert(Succ);

onBlockAnalyzed(BB);
}
Expand Down

0 comments on commit eeb0e9f

Please sign in to comment.