From: Thomas Schwinge Date: Fri, 12 Dec 2014 20:01:18 +0000 (+0100) Subject: A bit of walk_gimple_op maintenance. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e25a61aca4163c9f11d993dbf8aff808c41c413;p=gcc.git A bit of walk_gimple_op maintenance. * gimple-walk.c (walk_gimple_op) : Also check intermediate walk_tree results for for_incr. : Walk child_fn and data_arg, too. : Pretty printing. From-SVN: r218686 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bf9571bed98..3a200321b49 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-12-12 Thomas Schwinge + + * gimple-walk.c (walk_gimple_op) : Also check + intermediate walk_tree results for for_incr. + : Walk child_fn and data_arg, too. + : Pretty printing. + 2014-12-12 Richard Sandiford PR middle-end/64182 diff --git a/gcc/gimple-walk.c b/gcc/gimple-walk.c index 48fa05d7789..959d68eca28 100644 --- a/gcc/gimple-walk.c +++ b/gcc/gimple-walk.c @@ -321,11 +321,13 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, break; case GIMPLE_OMP_CRITICAL: - ret = walk_tree (gimple_omp_critical_name_ptr ( - as_a (stmt)), - callback_op, wi, pset); - if (ret) - return ret; + { + gomp_critical *omp_stmt = as_a (stmt); + ret = walk_tree (gimple_omp_critical_name_ptr (omp_stmt), + callback_op, wi, pset); + if (ret) + return ret; + } break; case GIMPLE_OMP_FOR: @@ -349,9 +351,9 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, return ret; ret = walk_tree (gimple_omp_for_incr_ptr (stmt, i), callback_op, wi, pset); + if (ret) + return ret; } - if (ret) - return ret; break; case GIMPLE_OMP_PARALLEL: @@ -404,7 +406,6 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, wi, pset); if (ret) return ret; - ret = walk_tree (gimple_omp_sections_control_ptr (stmt), callback_op, wi, pset); if (ret) @@ -420,10 +421,21 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, break; case GIMPLE_OMP_TARGET: - ret = walk_tree (gimple_omp_target_clauses_ptr (stmt), callback_op, wi, - pset); - if (ret) - return ret; + { + gomp_target *omp_stmt = as_a (stmt); + ret = walk_tree (gimple_omp_target_clauses_ptr (omp_stmt), + callback_op, wi, pset); + if (ret) + return ret; + ret = walk_tree (gimple_omp_target_child_fn_ptr (omp_stmt), + callback_op, wi, pset); + if (ret) + return ret; + ret = walk_tree (gimple_omp_target_data_arg_ptr (omp_stmt), + callback_op, wi, pset); + if (ret) + return ret; + } break; case GIMPLE_OMP_TEAMS: @@ -440,7 +452,6 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, callback_op, wi, pset); if (ret) return ret; - ret = walk_tree (gimple_omp_atomic_load_rhs_ptr (omp_stmt), callback_op, wi, pset); if (ret) @@ -449,11 +460,13 @@ walk_gimple_op (gimple stmt, walk_tree_fn callback_op, break; case GIMPLE_OMP_ATOMIC_STORE: - ret = walk_tree (gimple_omp_atomic_store_val_ptr ( - as_a (stmt)), - callback_op, wi, pset); - if (ret) - return ret; + { + gomp_atomic_store *omp_stmt = as_a (stmt); + ret = walk_tree (gimple_omp_atomic_store_val_ptr (omp_stmt), + callback_op, wi, pset); + if (ret) + return ret; + } break; case GIMPLE_TRANSACTION: