diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-12 07:52:05 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-04-12 07:52:05 +0000 |
commit | f3cb52fc298256b40ac29a4ed315eedda710f9aa (patch) | |
tree | 30d336ac36e5d65e0f68d3dc7b5ef3da92af21cd /gcc/recog.c | |
parent | c69bb58b20cc4f58879198bb2bd386354ae61e71 (diff) | |
download | gcc-f3cb52fc298256b40ac29a4ed315eedda710f9aa.tar.gz |
PR bootstrap/4191
* config/d30v/d30v.h (INIT_SECTION_ASM_OP): Don't undef.
* flow.c (mark_used_reg): Manage reg_cond_dead properly for
modes spanning multiple hard regs.
* recog.c (peephole2_optimize): Rebuild jump labels as needed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52205 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 3289f6ebe10..7987d20ea88 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -3003,6 +3003,7 @@ peephole2_optimize (dump_file) bool changed; #endif bool do_cleanup_cfg = false; + bool do_rebuild_jump_labels = false; /* Initialize the regsets we're going to use. */ for (i = 0; i < MAX_INSNS_PER_PEEP2 + 1; ++i) @@ -3045,7 +3046,7 @@ peephole2_optimize (dump_file) prev = PREV_INSN (insn); if (INSN_P (insn)) { - rtx try, before_try; + rtx try, before_try, x; int match_len; rtx note; @@ -3139,7 +3140,6 @@ peephole2_optimize (dump_file) /* Re-insert the EH_REGION notes. */ if (note) { - rtx x; edge eh_edge; for (eh_edge = bb->succ; eh_edge @@ -3209,25 +3209,35 @@ peephole2_optimize (dump_file) COPY_REG_SET (live, peep2_insn_data[i].live_before); /* Update life information for the new sequence. */ + x = try; do { - if (INSN_P (try)) + if (INSN_P (x)) { if (--i < 0) i = MAX_INSNS_PER_PEEP2; - peep2_insn_data[i].insn = try; - propagate_one_insn (pbi, try); + peep2_insn_data[i].insn = x; + propagate_one_insn (pbi, x); COPY_REG_SET (peep2_insn_data[i].live_before, live); } - try = PREV_INSN (try); + x = PREV_INSN (x); } - while (try != prev); + while (x != prev); /* ??? Should verify that LIVE now matches what we had before the new sequence. */ peep2_current = i; #endif + + /* If we generated a jump instruction, it won't have + JUMP_LABEL set. Recompute after we're done. */ + for (x = try; x != before_try; x = PREV_INSN (x)) + if (GET_CODE (x) == JUMP_INSN) + { + do_rebuild_jump_labels = true; + break; + } } } @@ -3242,6 +3252,9 @@ peephole2_optimize (dump_file) FREE_REG_SET (peep2_insn_data[i].live_before); FREE_REG_SET (live); + if (do_rebuild_jump_labels) + rebuild_jump_labels (get_insns ()); + /* If we eliminated EH edges, we may be able to merge blocks. Further, we've changed global life since exception handlers are no longer reachable. */ |