aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@cygnus.com>1999-01-19 09:39:37 +0000
committerAndrew Macleod <amacleod@gcc.gnu.org>1999-01-19 09:39:37 +0000
commitb472794d0e1babaa0e0e33975712084279933fe8 (patch)
tree78fafd43b4dbc569ee78f3f8754835b0bd6960e4 /gcc/optabs.c
parent35a6fc82940b2f9eb35d6b1c73b02c9f565168c1 (diff)
downloadgcc-b472794d0e1babaa0e0e33975712084279933fe8.zip
gcc-b472794d0e1babaa0e0e33975712084279933fe8.tar.gz
gcc-b472794d0e1babaa0e0e33975712084279933fe8.tar.bz2
optabs.c (emit_libcall_block): Add a REG_EH_REGION reg note to all calls within a libcall block to indicate no...
* optabs.c (emit_libcall_block): Add a REG_EH_REGION reg note to all calls within a libcall block to indicate no throws are possible. * flow.c (find_basic_blocks, find_basic_blocks_1): Don't look for libcall blocks. Don't add edges to exception handlers if we see a REG_EH_REGION note with a value of 0. (make_edges): Override active_eh_region vector if the call has a note indicating the call does not throw. From-SVN: r24757
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 7c53589..8780f4e 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -2596,6 +2596,21 @@ emit_libcall_block (insns, target, result, equiv)
{
rtx prev, next, first, last, insn;
+ /* look for any CALL_INSNs in this sequence, and attach a REG_EH_REGION
+ reg note to indicate that this call cannot throw. (Unless there is
+ already a REG_EH_REGION note.) */
+
+ for (insn = insns; insn; insn = NEXT_INSN (insn))
+ {
+ if (GET_CODE (insn) == CALL_INSN)
+ {
+ rtx note = find_reg_note (insn, REG_EH_REGION, NULL_RTX);
+ if (note == NULL_RTX)
+ REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_EH_REGION, GEN_INT (0),
+ REG_NOTES (insn));
+ }
+ }
+
/* First emit all insns that set pseudos. Remove them from the list as
we go. Avoid insns that set pseudos which were referenced in previous
insns. These can be generated by move_by_pieces, for example,