Introduce gimple_catch
commit4f6980c71e3e7c6193133217cfabe900c185f655
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 16 Dec 2013 16:51:44 +0000 (16 11:51 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:24:06 +0000 (24 17:24 -0400)
tree54ce90c92a7220367f667f4d787e603d84f718b3
parentd13f61c244285c84f1f3f7eda2f03c7e63410b6f
Introduce gimple_catch

This corresponds to:
  [PATCH 25/89] Introduce gimple_catch
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01178.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_catch): New typedef.
(const_gimple_catch): New typedef.

* gimple-low.c (lower_try_catch): Add checked cast to gimple_catch.
(gimple_try_catch_may_fallthru): Likewise.

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

* gimple-walk.c (walk_gimple_op): Likewise.
(walk_gimple_stmt): Likewise.

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

* gimple.h (gimple_build_catch): Return a gimple_catch rather than
a plain gimple.
(gimple_catch_types_ptr): Require a gimple_catch rather than a
plain gimple.
(gimple_catch_handler_ptr): Likewise.
(gimple_catch_handler): Likewise.
(gimple_catch_set_types): Likewise.
(gimple_catch_set_handler): Likewise.

* omp-low.c (lower_omp_1): Add checked cast to gimple_catch within
GIMPLE_CATCH case of switch statement.

* tree-cfg.c (verify_gimple_in_seq_2): Likewise.
(do_warn_unused_result): Likewise.

* tree-eh.c (collect_finally_tree): Likewise.
(replace_goto_queue_1): Likewise.
(lower_catch): Convert local from gimple to gimple_catch.
(refactor_eh_r): Add checked cast to gimple_catch within
GIMPLE_CATCH case of switch statement.

* tree-inline.c (remap_gimple_stmt): Likewise.
(estimate_num_insns): Add checked cast to gimple_catch within
GIMPLE_CATCH case of switch statement, introducing 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/omp-low.c
gcc/tree-cfg.c
gcc/tree-eh.c
gcc/tree-inline.c