Introduce gimple_debug and use it in a few places
commit8838e2081789dd01485b19b6f96cf509e292e2bf
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 10 Dec 2013 18:19:47 +0000 (10 13:19 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:23:40 +0000 (24 17:23 -0400)
tree802e49b356152ffcdd81e2841ce608bbfd871909
parentef26006ac85f370e5428108c1f11a2561f9a203c
Introduce gimple_debug and use it in a few places

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

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

gcc/
* coretypes.h (gimple_debug): New typedef.
(const_gimple_debug): New typedef.

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

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

* gimple-pretty-print.c (dump_gimple_debug): Require a gimple_debug
rather than just a gimple.
* tree-inline.c (copy_debug_stmt): Likewise.

* tree-inline.h (struct copy_body_data): Strengthen field
"debug_stmts" from a vec<gimple> to a vec<gimple_debug>.

* gimple.c (gimple_build_debug_bind_stat): Return a gimple_debug
rather than just a gimple.
(gimple_build_debug_source_bind_stat): Likewise.
* gimple.h (gimple_build_debug_bind_stat): Likewise.
(gimple_build_debug_source_bind_stat): Likewise.

* tree-inline.c (remap_gimple_stmt): Update locals to be a
gimple_debug.
(maybe_move_debug_stmts_to_successors): Likewise.
(copy_debug_stmts): Likewise.

* gimple-pretty-print.c (pp_gimple_stmt_1): Add checked cast to
gimple_debug in regions where a stmt is known to have code
GIMPLE_DEBUG.
gcc/ChangeLog.gimple-classes
gcc/coretypes.h
gcc/gdbhooks.py
gcc/gimple-pretty-print.c
gcc/gimple.c
gcc/gimple.h
gcc/tree-inline.c
gcc/tree-inline.h