@@ -1024,8 +1024,8 @@ bool MachineBlockPlacement::isTrellis(
10241024 if (BB->succ_size () != 2 || ViableSuccs.size () != 2 )
10251025 return false ;
10261026
1027- SmallPtrSet<const MachineBasicBlock *, 2 > Successors (BB-> succ_begin () ,
1028- BB->succ_end ());
1027+ SmallPtrSet<const MachineBasicBlock *, 2 > Successors (llvm::from_range ,
1028+ BB->successors ());
10291029 // To avoid reviewing the same predecessors twice.
10301030 SmallPtrSet<const MachineBasicBlock *, 8 > SeenPreds;
10311031
@@ -1117,8 +1117,8 @@ MachineBlockPlacement::getBestTrellisSuccessor(
11171117 const BlockFilterSet *BlockFilter) {
11181118
11191119 BlockAndTailDupResult Result = {nullptr , false };
1120- SmallPtrSet<const MachineBasicBlock *, 4 > Successors (BB-> succ_begin () ,
1121- BB->succ_end ());
1120+ SmallPtrSet<const MachineBasicBlock *, 4 > Successors (llvm::from_range ,
1121+ BB->successors ());
11221122
11231123 // We assume size 2 because it's common. For general n, we would have to do
11241124 // the Hungarian algorithm, but it's not worth the complexity because more
@@ -1209,8 +1209,8 @@ bool MachineBlockPlacement::canTailDuplicateUnplacedPreds(
12091209 unsigned int NumDup = 0 ;
12101210
12111211 // For CFG checking.
1212- SmallPtrSet<const MachineBasicBlock *, 4 > Successors (BB-> succ_begin () ,
1213- BB->succ_end ());
1212+ SmallPtrSet<const MachineBasicBlock *, 4 > Successors (llvm::from_range ,
1213+ BB->successors ());
12141214 for (MachineBasicBlock *Pred : Succ->predecessors ()) {
12151215 // Make sure all unplaced and unfiltered predecessors can be
12161216 // tail-duplicated into.
0 commit comments