This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Properly check the end of basic block
On 11/18/2010 02:50 PM, Uros Bizjak wrote:
> - emit_jump_insn_before (gen_return_internal_long (), ret);
> + /* We have to update BB_END (bb) here - delete_insn will
> + not do it automatically since CFG is not available in
> + machine_reorg pass. */
> + BB_END (bb)
> + = emit_jump_insn_before (gen_return_internal_long (), ret);
While that by itself is fine, calling compute_bb_for_insn at the
beginning of md_reorg will make sure that things stay up-to-date
for any other changes that are being made within that function.
I.e. compute_bb_for_insn seems safer overall.
r~