WIP preserve move uniform cfg, BROKEN
Masks for blends originated from preserved CFG are `true` which is wrong
with the current algorithm, see blend_masks_triangle_phi in
predicator.ll
[VPlan][Predicator] Preserve some uniform control flow
Implements "Partial Control-Flow Linearization" by Simon Moll and
Sebastian Hack. Does **NOT** improve predication/masking yet, so
applicability is artificially narrowed, only some uniform branches are
preserved. In particular, the following is left for future PRs:
* Block masks still contains now-unnecessary term for the preserved
uniform branches.
* Mixed blends/phis aren't supported yet. Detecting where they would be
necessary is as complex as implementing proper support (which would
need either Luke's `reconstructSSA` or Iterated Dominance Frontier),
so we also limit it to a trivial/structured CFG where there's only
single block where those would need to be inserted.
I think even the current version might be enough to start implementing
an alternative to https://github.com/llvm/llvm-project/pull/141900 (see
BOSCC in the paper).
[VPlan] Make blend operands non-reorderable to optimize their masks in predicator
Sort the incoming edges according to RPOT order so that we could use
simpler source block mask instead of the edge mask.
[VPlan] Use compact RPOT instead of just RPOT
This is necessary for the future partial linearization change, but I
wanted to commit this bit independently because it changes some tests on
itself and could potentially provide more blend optimization
opportunites (at least I hoped) but that didn't seem to happen.