Commit 8e25a61a by Thomas Schwinge Committed by Thomas Schwinge

A bit of walk_gimple_op maintenance.

	* gimple-walk.c (walk_gimple_op) <GIMPLE_OMP_FOR>: Also check
	intermediate walk_tree results for for_incr.
	<GIMPLE_OMP_TARGET>: Walk child_fn and data_arg, too.
	<GIMPLE_OMP_CRITICAL, GIMPLE_OMP_ATOMIC_STORE>: Pretty printing.

From-SVN: r218686
parent c0b6f54b
2014-12-12 Thomas Schwinge <thomas@codesourcery.com>
* gimple-walk.c (walk_gimple_op) <GIMPLE_OMP_FOR>: Also check
intermediate walk_tree results for for_incr.
<GIMPLE_OMP_TARGET>: Walk child_fn and data_arg, too.
<GIMPLE_OMP_CRITICAL, GIMPLE_OMP_ATOMIC_STORE>: Pretty printing.
2014-12-12 Richard Sandiford <richard.sandiford@arm.com>
PR middle-end/64182
......@@ -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 <gomp_critical *> (stmt)),
callback_op, wi, pset);
if (ret)
return ret;
{
gomp_critical *omp_stmt = as_a <gomp_critical *> (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 <gomp_target *> (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 <gomp_atomic_store *> (stmt)),
callback_op, wi, pset);
if (ret)
return ret;
{
gomp_atomic_store *omp_stmt = as_a <gomp_atomic_store *> (stmt);
ret = walk_tree (gimple_omp_atomic_store_val_ptr (omp_stmt),
callback_op, wi, pset);
if (ret)
return ret;
}
break;
case GIMPLE_TRANSACTION:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment