================
@@ -1600,6 +1600,17 @@ static bool callWaitsOnFunctionReturn(const MachineInstr
&MI) {
return true;
}
+/// \returns true if \p MI is not the first terminator of its associated MBB.
+static bool checkIfMBBNonFirstTerminator(const MachineInstr &MI) {
+ const auto &MBB = MI.getParent();
+ if (MBB->getFirstTerminator() == MI)
+ return false;
+ for (const auto &I : MBB->terminators())
+ if (&I == &MI)
+ return true;
----------------
arsenm wrote:
This iterator logic is clumsy (you're effectively using getFirstTerminator
twice)
https://github.com/llvm/llvm-project/pull/112116
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits