Introduce gimple_eh_else
commit6fc6973e0e091d6fac2b3bedda3c0b4a880bf317
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 16 Dec 2013 18:22:21 +0000 (16 13:22 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:24:11 +0000 (24 17:24 -0400)
tree3dd57e1073d4a7c87b7e106febe31948480960ad
parentf9d52516c192ce8530432a3c46af00f3c3c5e0e9
Introduce gimple_eh_else

This corresponds to:
  [PATCH 28/89] Introduce gimple_eh_else
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01156.html
from the original 89-patch kit

That earlier patch was approved by Jeff:
> OK after fixing up the naming/const stuff as discussed for prior
> patches.
> That applies to 22-30. Make sure to take care of
> the pretty printers per Trevor's comments as well. He indicated those
> were missing in a couple of those patches.
in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00628.html

gcc/
* coretypes.h (gimple_eh_else): New typedef.
(const_gimple_eh_else): New typedef.

* gimple.h (gimple_build_eh_else): Return a gimple_eh_else rather
than a plain gimple.
(gimple_eh_else_n_body_ptr): Require a gimple_eh_else rather than
a plain gimple.
(gimple_eh_else_n_body): Likewise.
(gimple_eh_else_e_body_ptr): Likewise.
(gimple_eh_else_e_body): Likewise.
(gimple_eh_else_set_n_body): Likewise.
(gimple_eh_else_set_e_body): Likewise.

* gimple-low.c (lower_stmt): Add checked cast to gimple_eh_else
within GIMPLE_EH_ELSE case of switch statement, introducing a new
local.
(gimple_stmt_may_fallthru): Likewise.

* gimple-pretty-print.c (dump_gimple_eh_else): Require a
gimple_eh_else rather than a plain gimple.
(pp_gimple_stmt_1): Add checked cast to gimple_eh_else within
GIMPLE_EH_ELSE case of switch statement

* gimple-walk.c (walk_gimple_stmt): Add checked cast to
gimple_eh_else within GIMPLE_EH_ELSE case of switch statement,
introducing a new local.

* gimple.c (gimple_build_eh_else): Return a gimple_eh_else
rather than a plain gimple.
(gimple_copy): Add checked casts to gimple_eh_else within
GIMPLE_EH_ELSE case of switch statement, introducing new locals.

* tree-cfg.c (verify_gimple_in_seq_2): Add checked cast to
gimple_eh_else within GIMPLE_EH_ELSE case of switch statement,
introducing a new local.

* tree-eh.c (collect_finally_tree): Likewise.
(replace_goto_queue_1): Likewise.
(get_eh_else): Return a gimple_eh_else rather than a plain gimple.
(honor_protect_cleanup_actions): Convert local "eh_else" from
gimple to gimple_eh_else.
(lower_try_finally_nofallthru): Likewise.
(lower_try_finally_onedest): Introduce locals "eh_else" and
"label_stmt", using them in favor of "x" for the gimple_eh_else
and the gimple_label.
(lower_try_finally_copy): Convert local "eh_else" from gimple to
gimple_eh_else.
(lower_try_finally_switch): Likewise.
(decide_copy_try_finally): Likewise.
(refactor_eh_r): Add checked cast to gimple_eh_else within
GIMPLE_EH_ELSE case of switch statement, introducing a new local.
gcc/ChangeLog.gimple-classes
gcc/coretypes.h
gcc/gimple-low.c
gcc/gimple-pretty-print.c
gcc/gimple-walk.c
gcc/gimple.c
gcc/gimple.h
gcc/tree-cfg.c
gcc/tree-eh.c