MachineCycle can handle irreducible loop. Natural loop analysis (MachineLoop) can not return correct loop depth if the loop is irreducible loop. And MachineSink is sensitive to the loop depth, see MachineSinking::isProfitableToSinkTo().
In https://reviews.llvm.org/D120800, we prevent a sinking from shallower loop to deeper loop after checking irreducible cfg in the whole function.
This patch tries to use MachineCycle so that we can handle irreducible loop better.
I did not even know this is legal C++ syntax; Anyway please be consistent with the rest of LLVM here!