Introduce gimple_label and use it in a few places
commitef26006ac85f370e5428108c1f11a2561f9a203c
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 12 Dec 2013 01:27:10 +0000 (11 20:27 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:23:38 +0000 (24 17:23 -0400)
treed3d93d6e23a9fa51e4c6f03e08d92c15af0631b4
parent32adcef485831640c4ff0675b52479f9c9ae491c
Introduce gimple_label and use it in a few places

This corresponds to:
  [PATCH 06/89] Introduce gimple_label and use it in a few places
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01152.html
from the original 89-patch kit

That earlier patch was approved by Jeff:
> Same as prior patches for gimple_cond and gimple_assign.
in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00597.html

gcc/
* coretypes.h (gimple_label): New typedef.
(const_gimple_label): New typedef.

* gimple.h (struct gimple_statement_label): New subclass of
gimple_statement_with_ops, adding the invariant that
stmt->code == GIMPLE_LABEL.
(is_a_helper <gimple_statement_label>::test): New.

* gdbhooks.py (build_pretty_printer): Add gimple_label and its
variants, reusing the gimple printer.

* gimple-pretty-print.c (dump_gimple_label): Require a gimple_label
rather than just a gimple.
* tree-cfg.c (verify_gimple_label): Likewise.

* gimple.c (gimple_build_label): Return a gimple_label rather than
just a gimple.
* gimple.h (gimple_build_label): Likewise.

* gimplify.c (gimplify_case_label_expr): Update local to be a
gimple_label.
* tree-switch-conversion.c (gen_inbound_check): Likewise.

* gimple-pretty-print.c (pp_gimple_stmt_1): Add checked cast to
gimple_label in regions where a stmt is known to have code
GIMPLE_LABEL.
* tree-cfg.c (verify_gimple_stmt): Likewise.
gcc/ChangeLog.gimple-classes
gcc/coretypes.h
gcc/gdbhooks.py
gcc/gimple-pretty-print.c
gcc/gimple.c
gcc/gimple.h
gcc/gimplify.c
gcc/tree-cfg.c
gcc/tree-switch-conversion.c