aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2019-07-04 15:00:00 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2019-07-04 15:00:00 +0000
commitebebc928d8b0d17676e751848892f927373b1fe5 (patch)
tree5b00c4867b3d58dc4865627ffab29da1e0baa2d0 /gcc/except.c
parente57c896e86c4257741b574d99d7cacbfda219755 (diff)
downloadgcc-ebebc928d8b0d17676e751848892f927373b1fe5.zip
gcc-ebebc928d8b0d17676e751848892f927373b1fe5.tar.gz
gcc-ebebc928d8b0d17676e751848892f927373b1fe5.tar.bz2
introduce EH_ELSE_EXPR tree and gimplifier
I found GIMPLE_EH_ELSE offered exactly the semantics I needed for some Ada changes yet to be contributed, but GIMPLE_EH_ELSE was only built by GIMPLE passes, and I needed to build earlier something that eventually became GIMPLE_EH_ELSE. This patch does that, introducing an EH_ELSE_EXPR tree, and logic to dump it and to gimplify it. for gcc/ChangeLog * doc/generic.texi (Cleanups): Document EH_ELSE_EXPR. * except.c: Likewise. * expr.c (expand_expr_real_1): Reject it. * gimplify.c (gimplify_expr): Gimplify it, within TRY_FINALLY_EXPR. * tree-dump.c (dequeue_and_dump): Dump it. * tree-pretty-print.c (dump_generic_node): Likewise. * tree.c (block_may_fallthru): Handle it. * tree.def (EH_ELSE_EXPR): Introduce it. * gimple-pretty-print.c (dump_gimple_try): Dump TRY_FINALLY with GIMPLE_EH_ELSE as try/finally/else. From-SVN: r273084
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/except.c b/gcc/except.c
index edaeeb4..29f3339 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -27,14 +27,14 @@ along with GCC; see the file COPYING3. If not see
the compilation process:
In the beginning, in the front end, we have the GENERIC trees
- TRY_CATCH_EXPR, TRY_FINALLY_EXPR, WITH_CLEANUP_EXPR,
+ TRY_CATCH_EXPR, TRY_FINALLY_EXPR, EH_ELSE_EXPR, WITH_CLEANUP_EXPR,
CLEANUP_POINT_EXPR, CATCH_EXPR, and EH_FILTER_EXPR.
- During initial gimplification (gimplify.c) these are lowered
- to the GIMPLE_TRY, GIMPLE_CATCH, and GIMPLE_EH_FILTER nodes.
- The WITH_CLEANUP_EXPR and CLEANUP_POINT_EXPR nodes are converted
- into GIMPLE_TRY_FINALLY nodes; the others are a more direct 1-1
- conversion.
+ During initial gimplification (gimplify.c) these are lowered to the
+ GIMPLE_TRY, GIMPLE_CATCH, GIMPLE_EH_ELSE, and GIMPLE_EH_FILTER
+ nodes. The WITH_CLEANUP_EXPR and CLEANUP_POINT_EXPR nodes are
+ converted into GIMPLE_TRY_FINALLY nodes; the others are a more
+ direct 1-1 conversion.
During pass_lower_eh (tree-eh.c) we record the nested structure
of the TRY nodes in EH_REGION nodes in CFUN->EH->REGION_TREE.