Introduce gimple_omp_parallel
commit07ec6b8258c4fae6d160a7d63e869e4f933a50f7
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 17 Dec 2013 15:25:47 +0000 (17 10:25 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:24:28 +0000 (24 17:24 -0400)
treed5d8810c1a1e740a086fcea1faddd45fe03b6de9
parent9b243966b86247c99eab2ea80afdc57858f6d2f9
Introduce gimple_omp_parallel

This corresponds to:
  [PATCH 39/89] Introduce gimple_omp_parallel
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01159.html
from the original 89-patch kit

That earlier patch was approved by Jeff:
> OK with expected changes due to renaming/updates to const handling.
> Please repost the final patch for archival purposes.
in https://gcc.gnu.org/ml/gcc-patches/2014-05/msg00827.html

gcc/
* coretypes.h (gimple_omp_parallel): New typedef.
(const_gimple_omp_parallel): New typedef.

* cgraphbuild.c (build_cgraph_edges): Convert check of code
against GIMPLE_OMP_PARALLEL to a dyn_cast <gimple_omp_parallel>
and new local.

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

* gimple-walk.c (walk_gimple_op): Likewise, introducing a local.

* gimple.c (gimple_build_omp_parallel): Return a
gimple_omp_parallel rather than a plain gimple.
(gimple_copy): Add checked casts to gimple_omp_parallel within
GIMPLE_OMP_PARALLEL case of switch statement, introducing locals.

* gimple.h (gimple_build_omp_parallel): Return a
gimple_omp_parallel rather than a plain gimple.
(gimple_omp_parallel_clauses_ptr): Require a gimple_omp_parallel
rather than a plain gimple.
(gimple_omp_parallel_set_clauses): Likewise.
(gimple_omp_parallel_data_arg_ptr): Likewise.
(gimple_omp_parallel_set_data_arg): Likewise.
(gimple_omp_parallel_child_fn_ptr): Likewise.
(gimple_omp_parallel_set_child_fn): Likewise.
(gimple_omp_parallel_child_fn): Require a
const_gimple_omp_parallel rather than a plain const_gimple.
(gimple_omp_parallel_data_arg): Likewise.

* omp-low.c (scan_omp_parallel): Strengthen local "stmt" from
gimple to gimple_omp_parallel.
(expand_parallel_call): Require a gimple_omp_parallel for
"entry_stmt" rather than a plain gimple.
(remove_exit_barrier):  Strengthen local "parallel_stmt" from
gimple to gimple_omp_parallel.
(expand_omp_taskreg): Add checked casts to gimple_omp_parallel.

* tree-inline.c (remap_gimple_stmt): Add a checked cast to
gimple_omp_parallel within GIMPLE_OMP_PARALLEL case of switch
statement, introducing local.
gcc/ChangeLog.gimple-classes
gcc/cgraphbuild.c
gcc/coretypes.h
gcc/gimple-pretty-print.c
gcc/gimple-walk.c
gcc/gimple.c
gcc/gimple.h
gcc/omp-low.c
gcc/tree-inline.c