Introduce gimple_return
commit9ca0c27614bd358ee1ccb711720ae22240fc224e
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 13 Dec 2013 21:08:57 +0000 (13 16:08 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:24:00 +0000 (24 17:24 -0400)
treeccaad5a61aca761460c99225a46b9997c664dda5
parentb8782001dbb586b92ac335d5e77b275366f584bb
Introduce gimple_return

This corresponds to:
  [PATCH 21/89] Introduce gimple_return
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01180.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_return): New typedef.
(const_gimple_return): New typedef.

* gimple.h (gimple_statement_return): New subclass of
gimple_statement_with_memory_ops, adding the invariant that
stmt->code == GIMPLE_RETURN.
(is_a_helper <gimple_statement_return>::test): New.
(gimple_build_return): Return a gimple_return rather
than a plain gimple.

* gimple.c (gimple_build_return): Return a gimple_return rather
than a plain gimple.

* cgraphunit.c (expand_thunk): Convert local from a gimple to
a gimple_return.

* gimple-low.c (struct return_statements_t): Convert field "stmt"
from a gimple to a gimple_return.
(lower_gimple_return): Convert local from a gimple to a
gimple_return.

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

* gimplify.c (gimplify_return_expr): Convert locals from
gimple to gimple_return.

* ipa-split.c (split_function): Likewise.

* tree-cfg.c (verify_gimple_assign): Require a gimple_return
rather than a plain gimple.
(verify_gimple_stmt): Add checked cast to gimple_return within
case GIMPLE_RETURN of switch statement.

* tree-tailcall.c (adjust_return_value): Convert local from
gimple to gimple_return.
12 files changed:
gcc/ChangeLog.gimple-classes
gcc/cgraphunit.c
gcc/coretypes.h
gcc/gimple-low.c
gcc/gimple-pretty-print.c
gcc/gimple.c
gcc/gimple.h
gcc/gimplify.c
gcc/ipa-split.c
gcc/omp-low.c
gcc/tree-cfg.c
gcc/tree-tailcall.c