The patch adds an ability to unroll loops using epilogue remainder and makes it default (instead of current prologue),
The epilogue remainder is better as it do not produce additional non-constant phi nodes.
for(i = 0; i < n; i++)
...
For now loop unrolling looks like:
PROLOG:
ip = phi [0, ip.next] ... ip.next = ip + 1 cmp ip, n&7
jne PROLOG
i0 = phi [0, ip.next]
LOOP (unrolling on 8):
i = phi [**i0**, i.next] i.next = i + 1 cmp i, n
jne LOOP
In the LOOP (this is supposed to be unrolled) we have i = phi [i0, i.next].
Basically, that means that we don't know where we start now, however before unrolling we knew the start position is 0.
Assuming unrolled part of the loop is hotter than remainder (prologue currently), it is better to move this induction variable with unknown start to remainder code (which is done by epilogue technique).