summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/function.c2
-rw-r--r--gcc/function.h4
-rw-r--r--gcc/stmt.c19
-rw-r--r--gcc/tree-cfg.c11
5 files changed, 11 insertions, 33 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1315d72e91c..22d6a04a344 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2004-06-19 Jan Hubicka <jh@suse.cz>
+
+ * function.c (free_after_compilation): Do not free computed_goto_common*.
+ * function.h (struct function): Kill computed_goto_common*.
+ * stmt.c (expand_computed_goto): Do not commonize the computed gotos.
+ * tree-cfg.c (disband_implicit_edges): Do not forward across the
+ commonized computed goto.
+
2004-06-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* doc/invoke.texi: Remove obsolete comment regarding PA 2.0 support
diff --git a/gcc/function.c b/gcc/function.c
index 8d25bd261d6..f4f2940f2eb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -440,8 +440,6 @@ free_after_compilation (struct function *f)
f->x_cleanup_label = NULL;
f->x_return_label = NULL;
f->x_naked_return_label = NULL;
- f->computed_goto_common_label = NULL;
- f->computed_goto_common_reg = NULL;
f->x_save_expr_regs = NULL;
f->x_stack_slot_list = NULL;
f->x_rtl_expr_chain = NULL;
diff --git a/gcc/function.h b/gcc/function.h
index 76a281a6192..6dd0f307804 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -259,10 +259,6 @@ struct function GTY(())
on machines which require execution of the epilogue on all returns. */
rtx x_naked_return_label;
- /* Label and register for unswitching computed gotos. */
- rtx computed_goto_common_label;
- rtx computed_goto_common_reg;
-
/* List (chain of EXPR_LISTs) of pseudo-regs of SAVE_EXPRs.
So we can mark them all live at the end of the function, if nonopt. */
rtx x_save_expr_regs;
diff --git a/gcc/stmt.c b/gcc/stmt.c
index d860bc727d5..aa970dfd2fb 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -502,23 +502,8 @@ expand_computed_goto (tree exp)
x = convert_memory_address (Pmode, x);
emit_queue ();
-
- if (! cfun->computed_goto_common_label)
- {
- cfun->computed_goto_common_reg = copy_to_mode_reg (Pmode, x);
- cfun->computed_goto_common_label = gen_label_rtx ();
-
- do_pending_stack_adjust ();
- emit_label (cfun->computed_goto_common_label);
- emit_indirect_jump (cfun->computed_goto_common_reg);
-
- current_function_has_computed_jump = 1;
- }
- else
- {
- emit_move_insn (cfun->computed_goto_common_reg, x);
- emit_jump (cfun->computed_goto_common_label);
- }
+ do_pending_stack_adjust ();
+ emit_indirect_jump (x);
}
/* Handle goto statements and the labels that they can go to. */
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 243a654171b..8babdc293c5 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -2574,7 +2574,7 @@ disband_implicit_edges (void)
basic_block bb;
block_stmt_iterator last;
edge e;
- tree stmt, label, forward;
+ tree stmt, label;
FOR_EACH_BB (bb)
{
@@ -2640,15 +2640,6 @@ disband_implicit_edges (void)
label = tree_block_label (e->dest);
- /* If this is a goto to a goto, jump to the final destination.
- Handles unfactoring of the computed jumps.
- ??? Why bother putting this back together when rtl is just
- about to take it apart again? */
- forward = last_and_only_stmt (e->dest);
- if (forward
- && TREE_CODE (forward) == GOTO_EXPR)
- label = GOTO_DESTINATION (forward);
-
stmt = build1 (GOTO_EXPR, void_type_node, label);
SET_EXPR_LOCUS (stmt, e->goto_locus);
bsi_insert_after (&last, stmt, BSI_NEW_STMT);