Introduce gimple_goto
commitd3e44e6c18d1aca3d4d72794fa5c16915f40919e
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 13 Dec 2013 21:21:32 +0000 (13 16:21 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:24:01 +0000 (24 17:24 -0400)
treeda88c561cbe06cb034d52bd7f6354a3b83971e49
parent9ca0c27614bd358ee1ccb711720ae22240fc224e
Introduce gimple_goto

This corresponds to:
  [PATCH 22/89] Introduce gimple_goto
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01174.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_goto): New typedef.
(const_gimple_goto): New typedef.

* gimple.h (gimple_statement_goto): New subclass of
gimple_statement_with_ops, adding the invariant that
stmt->code == GIMPLE_GOTO.
(is_a_helper <gimple_statement_goto>::test): New.
(gimple_build_goto): Return a gimple_goto rather than a
plain gimple.

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

* gimple.c (gimple_build_goto): Return a gimple_goto rather than a
plain gimple.

* tree-cfg.c (verify_gimple_goto): Require a gimple_goto rather
than a plain gimple.
(verify_gimple_stmt): Add a checked cast to gimple_goto within
GIMPLE_GOTO case of switch statement.
gcc/ChangeLog.gimple-classes
gcc/coretypes.h
gcc/gimple-pretty-print.c
gcc/gimple.c
gcc/gimple.h
gcc/tree-cfg.c