Skip to content

Commit 68bfa9e

Browse files
Martien de Jongmartien-de-jong
authored andcommitted
[AIE][NFC] Use equivalent LoopUtils function
1 parent e25c678 commit 68bfa9e

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

llvm/lib/Target/AIE/AIEInterBlockScheduling.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// See https://llvm.org/LICENSE.txt for license information.
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
7-
// (c) Copyright 2024 Advanced Micro Devices, Inc. or its affiliates
7+
// (c) Copyright 2024-2025 Advanced Micro Devices, Inc. or its affiliates
88
//
99
//===----------------------------------------------------------------------===//
1010
// Implementations of the classes used to support inter-block scheduling
@@ -1140,16 +1140,7 @@ void BlockState::classify() {
11401140
// This can only be done if we have an epilogue and the epilogue is not itself
11411141
// a loop.
11421142
auto IsLoop = [](const MachineBasicBlock *MBB) {
1143-
int NumLoopEdges = 0;
1144-
int NumExitEdges = 0;
1145-
for (auto *S : MBB->successors()) {
1146-
if (S == MBB) {
1147-
NumLoopEdges++;
1148-
} else {
1149-
NumExitEdges++;
1150-
}
1151-
}
1152-
return NumLoopEdges == 1 && NumExitEdges == 1;
1143+
return AIELoopUtils::isSingleMBBLoop(MBB);
11531144
};
11541145

11551146
// We generalize slightly; we require the epilogue to be a dedicated exit of

0 commit comments

Comments
 (0)