This patch implements simple hoisting of instructions from two
single-predecessor blocks to their common predecessor, as a subroutine
in the GVN pass.
The patch pairs two instructions (A and B) with the same value number,
moves A to the predecessor block, replaces all uses of B with A, and
Instructions are paired via sort/merge (could be hashing instead).
Certain instructions act as "hoist barriers" in the sense that they
stop scanning the block for more hoist candidates, thus preventing
instructions to be reordering above them. They themselves can be
hoisted, though, which creates opportunities to hoist other
instructions, which is achieved by consecutive iterations of the
Consecutive iterations are also needed to handle loads, which have
unique value numbers.
Initial benchmarking on Neoverse N1 looks good (speedup, higher is
(There's that 2% regression in mcf that I've not investigated yet).