@@ -1046,17 +1046,16 @@ class MFMAExpInterleaveOpt final : public IGLPStrategy {
1046
1046
if (!SyncPipe.size ())
1047
1047
return false ;
1048
1048
1049
- auto SuccSize = std ::count_if (
1050
- SU-> Succs . begin (), SU-> Succs . end (),
1051
- []( const SDep &Succ) { return Succ. getKind () == SDep::Data; });
1049
+ auto SuccSize = llvm ::count_if (SU-> Succs , []( const SDep &Succ) {
1050
+ return Succ. getKind () == SDep::Data;
1051
+ });
1052
1052
if (SuccSize >= Size)
1053
1053
return false ;
1054
1054
1055
1055
if (HasIntermediary) {
1056
1056
for (auto Succ : SU->Succs ) {
1057
- auto SuccSize = std::count_if (
1058
- Succ.getSUnit ()->Succs .begin (), Succ.getSUnit ()->Succs .end (),
1059
- [](const SDep &SuccSucc) {
1057
+ auto SuccSize =
1058
+ llvm::count_if (Succ.getSUnit ()->Succs , [](const SDep &SuccSucc) {
1060
1059
return SuccSucc.getKind () == SDep::Data;
1061
1060
});
1062
1061
if (SuccSize >= Size)
@@ -1087,17 +1086,16 @@ class MFMAExpInterleaveOpt final : public IGLPStrategy {
1087
1086
if (!SyncPipe.size ())
1088
1087
return false ;
1089
1088
1090
- auto SuccSize = std ::count_if (
1091
- SU-> Succs . begin (), SU-> Succs . end (),
1092
- []( const SDep &Succ) { return Succ. getKind () == SDep::Data; });
1089
+ auto SuccSize = llvm ::count_if (SU-> Succs , []( const SDep &Succ) {
1090
+ return Succ. getKind () == SDep::Data;
1091
+ });
1093
1092
if (SuccSize >= Size)
1094
1093
return true ;
1095
1094
1096
1095
if (HasIntermediary) {
1097
1096
for (auto Succ : SU->Succs ) {
1098
- auto SuccSize = std::count_if (
1099
- Succ.getSUnit ()->Succs .begin (), Succ.getSUnit ()->Succs .end (),
1100
- [](const SDep &SuccSucc) {
1097
+ auto SuccSize =
1098
+ llvm::count_if (Succ.getSUnit ()->Succs , [](const SDep &SuccSucc) {
1101
1099
return SuccSucc.getKind () == SDep::Data;
1102
1100
});
1103
1101
if (SuccSize >= Size)
@@ -1474,18 +1472,17 @@ bool MFMAExpInterleaveOpt::analyzeDAG(const SIInstrInfo *TII) {
1474
1472
MFMAChainLength = MFMAPipeCount / MFMAChains;
1475
1473
1476
1474
// The number of bit pack operations that depend on a single V_EXP
1477
- unsigned PackSuccCount = std::count_if (
1478
- PackSUs. begin (), PackSUs. end () , [this , &TempExp](SUnit *VPack) {
1475
+ unsigned PackSuccCount =
1476
+ llvm::count_if ( PackSUs, [this , &TempExp](SUnit *VPack) {
1479
1477
return DAG->IsReachable (VPack, *TempExp);
1480
1478
});
1481
1479
1482
1480
// The number of bit pack operations an MFMA depends on
1483
1481
unsigned PackPredCount =
1484
- std::count_if ((*TempMFMA)->Preds .begin (), (*TempMFMA)->Preds .end (),
1485
- [&isBitPack](SDep &Pred) {
1486
- auto Opc = Pred.getSUnit ()->getInstr ()->getOpcode ();
1487
- return isBitPack (Opc);
1488
- });
1482
+ llvm::count_if ((*TempMFMA)->Preds , [&isBitPack](SDep &Pred) {
1483
+ auto Opc = Pred.getSUnit ()->getInstr ()->getOpcode ();
1484
+ return isBitPack (Opc);
1485
+ });
1489
1486
1490
1487
auto *PackPred = llvm::find_if ((*TempMFMA)->Preds , [&isBitPack](SDep &Pred) {
1491
1488
auto Opc = Pred.getSUnit ()->getInstr ()->getOpcode ();
@@ -1499,20 +1496,18 @@ bool MFMAExpInterleaveOpt::analyzeDAG(const SIInstrInfo *TII) {
1499
1496
ExpRequirement = 0 ;
1500
1497
// How many MFMAs depend on a single bit pack operation
1501
1498
MFMAEnablement =
1502
- std::count_if (PackPred->getSUnit ()->Succs .begin (),
1503
- PackPred->getSUnit ()->Succs .end (), [&TII](SDep &Succ) {
1504
- return TII->isMFMAorWMMA (*Succ.getSUnit ()->getInstr ());
1505
- });
1499
+ llvm::count_if (PackPred->getSUnit ()->Succs , [&TII](SDep &Succ) {
1500
+ return TII->isMFMAorWMMA (*Succ.getSUnit ()->getInstr ());
1501
+ });
1506
1502
1507
1503
// The number of MFMAs that depend on a single V_EXP
1508
1504
MFMAEnablement *= PackSuccCount;
1509
1505
1510
1506
// The number of V_EXPs required to resolve all dependencies for an MFMA
1511
1507
ExpRequirement =
1512
- std::count_if (ExpPipeCands.begin (), ExpPipeCands.end (),
1513
- [this , &PackPred](SUnit *ExpBase) {
1514
- return DAG->IsReachable (PackPred->getSUnit (), ExpBase);
1515
- });
1508
+ llvm::count_if (ExpPipeCands, [this , &PackPred](SUnit *ExpBase) {
1509
+ return DAG->IsReachable (PackPred->getSUnit (), ExpBase);
1510
+ });
1516
1511
1517
1512
ExpRequirement *= PackPredCount;
1518
1513
return true ;
0 commit comments