aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2010-11-18 13:08:38 -0800
committerRichard Henderson <rth@gcc.gnu.org>2010-11-18 13:08:38 -0800
commitcd400280c4f431ef4873b68c63f12d3f7ada87aa (patch)
treeac49e6991cf94a0226441d0291cf1772f162ce65 /gcc/function.c
parentdf61e411f74162840e168dd21f6d6905890c28d6 (diff)
downloadgcc-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/function.c')
-rw-r--r--gcc/function.c20
1 files changed, 13 insertions, 7 deletions
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;
}