| Submitter | Uros Bizjak |
|---|---|
| Date | Nov. 18, 2010, 10:50 p.m. |
| Message ID | <AANLkTikEZqCrgk-Jrp36hximSqOhQ2MhZpGcKEBNpjHX@mail.gmail.com> |
| Download | mbox | patch |
| Permalink | /patch/72162/ |
| State | New |
| Headers | show |
Comments
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~
Patch
Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 166920) +++ config/i386/i386.c (working copy) @@ -29640,7 +29640,11 @@ ix86_pad_returns (void) } if (replace) { - 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); delete_insn (ret); } }