@@ -1024,8 +1024,8 @@ bool MachineBlockPlacement::isTrellis(
1024
1024
if (BB->succ_size () != 2 || ViableSuccs.size () != 2 )
1025
1025
return false ;
1026
1026
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 ());
1029
1029
// To avoid reviewing the same predecessors twice.
1030
1030
SmallPtrSet<const MachineBasicBlock *, 8 > SeenPreds;
1031
1031
@@ -1117,8 +1117,8 @@ MachineBlockPlacement::getBestTrellisSuccessor(
1117
1117
const BlockFilterSet *BlockFilter) {
1118
1118
1119
1119
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 ());
1122
1122
1123
1123
// We assume size 2 because it's common. For general n, we would have to do
1124
1124
// the Hungarian algorithm, but it's not worth the complexity because more
@@ -1209,8 +1209,8 @@ bool MachineBlockPlacement::canTailDuplicateUnplacedPreds(
1209
1209
unsigned int NumDup = 0 ;
1210
1210
1211
1211
// 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 ());
1214
1214
for (MachineBasicBlock *Pred : Succ->predecessors ()) {
1215
1215
// Make sure all unplaced and unfiltered predecessors can be
1216
1216
// tail-duplicated into.
0 commit comments