Introduce gimple_omp_critical
commit06b91a3dfccbf95409bd2a7eb2005b0dc74234c5
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 16 Dec 2013 22:13:08 +0000 (16 17:13 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 24 Oct 2014 21:24:24 +0000 (24 17:24 -0400)
tree1647685757e71e625141bdbc851ff35155f921b9
parent0ff9e61b747b68d87dd5eb9cd091a10669ac73c3
Introduce gimple_omp_critical

This corresponds to:
  [PATCH 37/89] Introduce gimple_omp_critical
  https://gcc.gnu.org/ml/gcc-patches/2014-04/msg01158.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/msg00809.html

gcc/
* coretypes.h (gimple_omp_critical): New typedef.
(const_gimple_omp_critical): New typedef.

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

* gimple-walk.c (walk_gimple_op): Likewise.

* gimple.c (gimple_build_omp_critical): Return a gimple_omp_critical
rather than a plain gimple.
(gimple_copy): Add checked casts to gimple_omp_critical
within GIMPLE_OMP_CRITICAL case of switch statement.

* gimple.h (gimple_debug): Likewise.
(gimple_build_omp_critical): Return a gimple_omp_critical rather
than a plain gimple.
(gimple_omp_critical_name): Require a const_gimple_omp_critical
rather than a plain const_gimple.
(gimple_omp_critical_name_ptr): Require a gimple_omp_critical
rather than a plain gimple.
(gimple_omp_critical_set_name): Likewise.

* omp-low.c (check_omp_nesting_restrictions): Add a checked cast
to gimple_omp_critical within GIMPLE_OMP_CRITICAL case of switch
statement, introducing a new local "other_crit" for type-safety.
(lower_omp_critical): Strengthen local "stmt" to
gimple_omp_critical.

* tree-inline.c (remap_gimple_stmt): Add a checked cast to
gimple_omp_critical within GIMPLE_OMP_CRITICAL case of switch
statement.
gcc/ChangeLog.gimple-classes
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