This is the mail archive of the
mailing list for the GCC project.
Re: ifcvt/crossjump patch: Fix PR 42496, 21803
On 07/26/2010 03:40 PM, Paolo Bonzini wrote:
> - split the destination BB before the jump (into BB11 and BB12)
> - split the source BBs after the last moved instruction (into BB21 and
> BB22, BB31 and BB32, etc.)
> - redirect the jumps to BBn1 (n>=2) to go to BBn2.
> - graft BB21 between BB11 and BB12, remove all BBn1 for n>2
The funny thing is that when you look at merge_blocks_move and its
subroutines, which presumably would be used in the last step, you'll
find it's implemented using... reorder_insns!.
So, the above creates several useless BB structures, moves them about,
deletes them again, performs the roughly same number of reorder_insns
and delete_insn calls as the code it would be replacing, only to end up
with the same CFG as when it started. All in order to pretend we're
doing a CFG operation.