diff options
author | Jan Hubicka <jh@suse.cz> | 2004-06-19 20:52:04 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2004-06-19 18:52:04 +0000 |
commit | eb4e1c013c5b2f53ec8a31c98fbcd752d089ff4b (patch) | |
tree | 30da390cd33e90e6db68cf86fe6de34dadaf8ca5 /gcc | |
parent | bc443e6def9f79e0fbfa1d3b70e59a158c85ebd9 (diff) | |
download | gcc-eb4e1c013c5b2f53ec8a31c98fbcd752d089ff4b.zip gcc-eb4e1c013c5b2f53ec8a31c98fbcd752d089ff4b.tar.gz gcc-eb4e1c013c5b2f53ec8a31c98fbcd752d089ff4b.tar.bz2 |
function.c (free_after_compilation): Do not free computed_goto_common*.
* 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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/function.c | 2 | ||||
-rw-r--r-- | gcc/function.h | 4 | ||||
-rw-r--r-- | gcc/stmt.c | 19 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 11 |
5 files changed, 11 insertions, 33 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1315d72..22d6a04 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 8d25bd2..f4f2940 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 76a281a..6dd0f307 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; @@ -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 243a654..8babdc2 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); |