Also, rename `getCurPreheader` -> `getOrCreatePreheader` to make it clear that this method may alter CFG. Update `Changed` if the method modified a loop by splitting a critical edge (this change is not strictly NFC). The removed parameter was probably intended to save compile time by not trying to a critical edge after the first attempt has failed, but it is only tried once per loop. PR: https://github.com/llvm/llvm-project/pull/135554
64 KiB
64 KiB