function.c (free_after_compilation): Do not free computed_goto_common*.
authorJan Hubicka <jh@suse.cz>
Sat, 19 Jun 2004 18:52:04 +0000 (20:52 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Sat, 19 Jun 2004 18:52:04 +0000 (18:52 +0000)
* 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.

From-SVN: r83393

gcc/ChangeLog
gcc/function.c
gcc/function.h
gcc/stmt.c
gcc/tree-cfg.c

index 1315d72e91ce10f1fcc4be0394a3e3a85d0a67d1..22d6a04a344d05241c691998f0da529269e294c2 100644 (file)
@@ -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
index 8d25bd261d62b7fff633d2e826849a7646855f58..f4f2940f2ebd24412a15194f9e63a8f44f66229a 100644 (file)
@@ -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;
index 76a281a61926229f60c022416e896601492bf273..6dd0f3078047061f6422c30c69d092d6167d95e2 100644 (file)
@@ -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;
index d860bc727d56fbfc6210de4f43a4d3b3bfcfb0ee..aa970dfd2fb09f121ab8fe6b5b5f74b3316c3ba5 100644 (file)
@@ -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);
 }
 \f
 /* Handle goto statements and the labels that they can go to.  */
index 243a654171b4c26ceae54cd2c01a6075db3e7d59..8babdc293c534ff089b35520b344eacc4d63022e 100644 (file)
@@ -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);