From 6cae7b6bf7a9b5a6e46fae677a56a9e88e498f0a Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 16 Dec 2013 14:07:56 -0500 Subject: Introduce gimple_eh_dispatch This corresponds to: [PATCH 30/89] Introduce gimple_eh_dispatch https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01236.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_dispatch): New typedef. (const_gimple_eh_dispatch): New typedef. * gimple-pretty-print.c (dump_gimple_eh_dispatch): Require a gimple_eh_dispatch rather than a plain gimple. (pp_gimple_stmt_1): Add a checked cast to gimple_eh_dispatch within GIMPLE_EH_DISPATCH case of switch statement. * gimple-streamer-in.c (input_gimple_stmt): Likewise. * gimple-streamer-out.c (output_gimple_stmt): Likewise. * gimple.c (gimple_build_eh_dispatch): Return a gimple_eh_dispatch rather than a plain gimple. * gimple.h (gimple_build_eh_dispatch): Return a gimple_eh_dispatch rather than a plain gimple. (gimple_eh_dispatch_region): Require a const_gimple_eh_dispatch rather than a plain const_gimple. (gimple_eh_dispatch_set_region): Require a gimple_eh_dispatch rather than a plain gimple. * tree-cfg.c (make_edges): Add a checked cast to gimple_eh_dispatch within GIMPLE_EH_DISPATCH case of switch statement. (gimple_verify_flow_info): Likewise. (gimple_redirect_edge_and_branch): Likewise. (move_stmt_r): Likewise, adding a local. * tree-eh.c (emit_eh_dispatch): Convert local from gimple to gimple_eh_dispatch. (make_eh_dispatch_edges): Require a gimple_eh_dispatch rather than a plain gimple. (redirect_eh_dispatch_edge): Likewise. (lower_eh_dispatch): Likewise. (execute_lower_eh_dispatch): Add a checked cast to gimple_eh_dispatch. (mark_reachable_handlers): Likewise. (verify_eh_dispatch_edge): Require a gimple_eh_dispatch rather than a plain gimple. * tree-eh.h (make_eh_dispatch_edges): Likewise. (redirect_eh_dispatch_edge): Likewise. (verify_eh_dispatch_edge): Likewise. * tree-inline.c (remap_gimple_stmt): Add a checked cast to gimple_eh_dispatch within GIMPLE_EH_DISPATCH case of switch statement, adding a local. (copy_edges_for_bb): Add a checked cast to gimple_eh_dispatch. --- gcc/gimple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/gimple.c') diff --git a/gcc/gimple.c b/gcc/gimple.c index c94611a66fd..2b008699a03 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -760,11 +760,11 @@ gimple_build_switch (tree index, tree default_label, vec args) /* Build a GIMPLE_EH_DISPATCH statement. */ -gimple +gimple_eh_dispatch gimple_build_eh_dispatch (int region) { - gimple_statement_eh_dispatch *p = - as_a ( + gimple_eh_dispatch p = + as_a ( gimple_build_with_ops (GIMPLE_EH_DISPATCH, ERROR_MARK, 0)); p->region = region; return p; -- cgit v1.2.1