diff options
author | Richard Henderson <rth@redhat.com> | 2010-11-18 13:08:38 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2010-11-18 13:08:38 -0800 |
commit | cd400280c4f431ef4873b68c63f12d3f7ada87aa (patch) | |
tree | ac49e6991cf94a0226441d0291cf1772f162ce65 /gcc | |
parent | df61e411f74162840e168dd21f6d6905890c28d6 (diff) | |
download | gcc-cd400280c4f431ef4873b68c63f12d3f7ada87aa.zip gcc-cd400280c4f431ef4873b68c63f12d3f7ada87aa.tar.gz gcc-cd400280c4f431ef4873b68c63f12d3f7ada87aa.tar.bz2 |
re PR middle-end/46515 (Many libjava failures)
PR middle-end/46515
* function.c (maybe_copy_prologue_epilogue_insn): Rename from
maybe_copy_epilogue_insn; handle prologue insns as well.
* rtl.h, cfglayout.c: Update for rename.
* recog.c (peep2_attempt): Copy prologue/epilogue data for
RTX_FRAME_RELATED_P insns.
From-SVN: r166920
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cfglayout.c | 2 | ||||
-rw-r--r-- | gcc/function.c | 20 | ||||
-rw-r--r-- | gcc/recog.c | 4 | ||||
-rw-r--r-- | gcc/rtl.h | 2 |
5 files changed, 28 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 12eaf9c..62adb26 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2010-11-18 Richard Henderson <rth@redhat.com> + + PR middle-end/46515 + * function.c (maybe_copy_prologue_epilogue_insn): Rename from + maybe_copy_epilogue_insn; handle prologue insns as well. + * rtl.h, cfglayout.c: Update for rename. + * recog.c (peep2_attempt): Copy prologue/epilogue data for + RTX_FRAME_RELATED_P insns. + 2010-11-18 Jakub Jelinek <jakub@redhat.com> PR middle-end/46534 diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c index be99991..e883af4 100644 --- a/gcc/cfglayout.c +++ b/gcc/cfglayout.c @@ -1179,7 +1179,7 @@ duplicate_insn_chain (rtx from, rtx to) || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC) break; copy = emit_copy_of_insn_after (insn, get_last_insn ()); - maybe_copy_epilogue_insn (insn, copy); + maybe_copy_prologue_epilogue_insn (insn, copy); break; case CODE_LABEL: diff --git a/gcc/function.c b/gcc/function.c index b9805dc..0ed674d 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5140,19 +5140,25 @@ record_insns (rtx insns, rtx end, htab_t *hashp) } } -/* INSN has been duplicated as COPY, as part of duping a basic block. - If INSN is an epilogue insn, then record COPY as epilogue as well. */ +/* INSN has been duplicated or replaced by as COPY, perhaps by duplicating a + basic block, splitting or peepholes. If INSN is a prologue or epilogue + insn, then record COPY as well. */ void -maybe_copy_epilogue_insn (rtx insn, rtx copy) +maybe_copy_prologue_epilogue_insn (rtx insn, rtx copy) { + htab_t hash; void **slot; - if (epilogue_insn_hash == NULL - || htab_find (epilogue_insn_hash, insn) == NULL) - return; + hash = epilogue_insn_hash; + if (!hash || !htab_find (hash, insn)) + { + hash = prologue_insn_hash; + if (!hash || !htab_find (hash, insn)) + return; + } - slot = htab_find_slot (epilogue_insn_hash, copy, INSERT); + slot = htab_find_slot (hash, copy, INSERT); gcc_assert (*slot == NULL); *slot = copy; } diff --git a/gcc/recog.c b/gcc/recog.c index b140c0e..edbf82b 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -3219,6 +3219,10 @@ peep2_attempt (basic_block bb, rtx insn, int match_len, rtx attempt) if (!new_set || !rtx_equal_p (new_set, old_set)) add_reg_note (new_insn, REG_FRAME_RELATED_EXPR, old_set); } + + /* Copy prologue/epilogue status. This is required in order to keep + proper placement of EPILOGUE_BEG and the DW_CFA_remember_state. */ + maybe_copy_prologue_epilogue_insn (old_insn, new_insn); } /* If we are splitting a CALL_INSN, look for the CALL_INSN @@ -2411,7 +2411,7 @@ extern int prologue_epilogue_contains (const_rtx); extern int sibcall_epilogue_contains (const_rtx); extern void mark_temp_addr_taken (rtx); extern void update_temp_slot_address (rtx, rtx); -extern void maybe_copy_epilogue_insn (rtx, rtx); +extern void maybe_copy_prologue_epilogue_insn (rtx, rtx); /* In stmt.c */ extern void expand_null_return (void); |