summaryrefslogtreecommitdiff
path: root/gcc/bb-reorder.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-03 23:58:44 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-12-03 23:58:44 +0000
commit6b7f685872c93ab3fdfb81930d3f97cc8135273b (patch)
tree0c8d554434d79763f71c942c0611cca67f9922f0 /gcc/bb-reorder.c
parentf4e60cf8d01160652a6ee2b550ef4389bd8af236 (diff)
downloadgcc-6b7f685872c93ab3fdfb81930d3f97cc8135273b.tar.gz
* bb-reorder.c (reorder_basic_blocks): Don't check for EH edges
unless exception handling is enabled, and if not using sjlj. * builtins.c (expand_builtin_setjmp_setup): New. (expand_builtin_setjmp_receiver): New. (expand_builtin_setjmp): Split out _setup and _receiver functions. Move argument parsing in from ... (expand_builtin): ... here. * except.c (receive_exception_label): Branch around receiver unless new-style exceptions. Call expand_builtin_setjmp_receiver. (start_dynamic_handler): Call expand_builtin_setjmp_setup. * expr.h: Update builtin setjmp decls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37982 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/bb-reorder.c')
-rw-r--r--gcc/bb-reorder.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index d2ea95d1f4e..45b5f2f680c 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1346,14 +1346,16 @@ reorder_basic_blocks ()
if (n_basic_blocks <= 1)
return;
- /* We do not currently handle correct re-placement of EH notes. */
- for (i = 0; i < n_basic_blocks; i++)
- {
- edge e;
- for (e = BASIC_BLOCK (i)->succ; e ; e = e->succ_next)
- if (e->flags & EDGE_EH)
- return;
- }
+ /* We do not currently handle correct re-placement of EH notes.
+ But that does not matter unless we intend to use them. */
+ if (flag_exceptions && ! exceptions_via_longjmp)
+ for (i = 0; i < n_basic_blocks; i++)
+ {
+ edge e;
+ for (e = BASIC_BLOCK (i)->succ; e ; e = e->succ_next)
+ if (e->flags & EDGE_EH)
+ return;
+ }
for (i = 0; i < n_basic_blocks; i++)
BASIC_BLOCK (i)->aux = xcalloc (1, sizeof (struct reorder_block_def));