[NFC] Perform all legality checks for non-trivial unswitch in one function
authorMax Kazantsev <mkazantsev@azul.com>
Wed, 12 Oct 2022 11:14:06 +0000 (18:14 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Wed, 12 Oct 2022 11:35:12 +0000 (18:35 +0700)
commitfbad5fdc03d90988999b54eb630a9d509098d58d
treeb62b094f6a43ce44c1171e2c5a3ee1dc4a495bcf
parentf885c08034feaeb955bd74e3093d245125aa075d
[NFC] Perform all legality checks for non-trivial unswitch in one function

They have been scattered over the code. For better structuring, perform
them in one place. Potential CT drop is possible because we collect exit
blocks twice, but it's small price to pay for much better code structure.
llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp