[Bug middle-end/30905] [dataflow] Fails to cross-jump
--- Comment #3 from steven at gcc dot gnu dot org 2007-05-08 23:15 --- This patch would fix it, but it's brute-force and it causes a ~1.5% slowdown. Some form of DCE a little more delicate than this will be necessary to fix this bug, though. Index: cfgcleanup.c === --- cfgcleanup.c(revision 124550) +++ cfgcleanup.c(working copy) @@ -2286,10 +2286,10 @@ cleanup_cfg (int mode) { delete_unreachable_blocks (), changed = true; if (!(mode CLEANUP_NO_INSN_DEL) - (mode CLEANUP_EXPENSIVE) - !reload_completed) + (mode (CLEANUP_EXPENSIVE | CLEANUP_CROSSJUMP))) { - if (!delete_trivially_dead_insns (get_insns (), max_reg_num ())) + gcc_assert (df); + if (! run_fast_dce ()) break; } else @@ -2343,10 +2343,9 @@ static unsigned int rest_of_handle_jump2 (void) { delete_trivially_dead_insns (get_insns (), max_reg_num ()); + delete_unreachable_blocks (); if (dump_file) dump_flow_info (dump_file, dump_flags); - cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) - | (flag_thread_jumps ? CLEANUP_THREADING : 0)); return 0; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30905
[Bug middle-end/30905] [dataflow] Fails to cross-jump
--- Comment #1 from steven at gcc dot gnu dot org 2007-02-21 20:59 --- Confirmed, we almost never do cross-jumping on the dataflow-branch anymore: only after regmove. -- steven at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-02-21 20:59:58 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30905
[Bug middle-end/30905] [dataflow] Fails to cross-jump
--- Comment #2 from steven at gcc dot gnu dot org 2007-02-21 22:09 --- On the trunk, *and* on the dataflow branch, we crossjump the code starting with if (i != 1) on the first cleanup_cfg iteration when it's called from rest_of_handle_stack_adjustments. Trunk then goes on to crossjump the other blocks, but the df-branch stops because there is a set to the CC-reg in the way. That set has a REG_UNUSED flag on it. What probably happens, is that flow on the trunk does some dce in the liveness update, and the df-branch does not. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30905