Thanks Jakub and Alex, I have committed the following to the branch to address your comments:
2016-01-15 Martin Jambor <mjam...@suse.cz> * gimple.h: Fixed comment of gimple_statement_omp_single_layout * omp-low.c (get_target_argument_value): Fixed spelling in its comment. (push_target_argument_according_to_value): Likewise. * tree.h (OMP_CLAUSE_GRIDDIM_DIMENSION): Renamed to OMP_CLAUSE__GRIDDIM__DIMENSION --- gcc/gimple.h | 2 +- gcc/omp-low.c | 12 ++++++------ gcc/tree-pretty-print.c | 2 +- gcc/tree.h | 5 +---- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/gcc/gimple.h b/gcc/gimple.h index 7eef07c..6d15dab 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -730,7 +730,7 @@ struct GTY((tag("GSS_OMP_CONTINUE"))) tree control_use; }; -/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_ORDERED */ +/* GIMPLE_OMP_SINGLE, GIMPLE_OMP_TEAMS, GIMPLE_OMP_ORDERED */ struct GTY((tag("GSS_OMP_SINGLE_LAYOUT"))) gimple_statement_omp_single_layout : public gimple_statement_omp diff --git a/gcc/omp-low.c b/gcc/omp-low.c index c534f5c..616c5bd 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -12741,7 +12741,7 @@ grid_get_kernel_launch_attributes (gimple_stmt_iterator *gsi, if (OMP_CLAUSE_CODE (clause) != OMP_CLAUSE__GRIDDIM_) continue; - unsigned dim = OMP_CLAUSE_GRIDDIM_DIMENSION (clause); + unsigned dim = OMP_CLAUSE__GRIDDIM__DIMENSION (clause); max_dim = MAX (dim, max_dim); grid_insert_store_range_dim (gsi, lattrs, @@ -12788,7 +12788,7 @@ get_target_argument_identifier (int device, bool subseqent_param, int id) return fold_convert (ptr_type_node, t); } -/* Return a target argument consisiting of DEVICE identifier, value identifier +/* Return a target argument consisting of DEVICE identifier, value identifier ID, and the actual VALUE. */ static tree @@ -12806,8 +12806,8 @@ get_target_argument_value (gimple_stmt_iterator *gsi, int device, int id, } /* If VALUE is an integer constant greater than -2^15 and smaller than 2^15, - push one argument to ARGS with bot the DEVICE, ID and VALUE embeded in it, - otherwise push an iedntifier (with DEVICE and ID) and the VALUE in two + push one argument to ARGS with both the DEVICE, ID and VALUE embedded in it, + otherwise push an identifier (with DEVICE and ID) and the VALUE in two arguments. */ static void @@ -17693,7 +17693,7 @@ grid_attempt_target_gridification (gomp_target *target, ws = build_zero_cst (uint32_type_node); tree c = build_omp_clause (UNKNOWN_LOCATION, OMP_CLAUSE__GRIDDIM_); - OMP_CLAUSE_SET_GRIDDIM_DIMENSION (c, (unsigned int) i); + OMP_CLAUSE__GRIDDIM__DIMENSION (c) = i; OMP_CLAUSE__GRIDDIM__SIZE (c) = gs; OMP_CLAUSE__GRIDDIM__GROUP (c) = ws; OMP_CLAUSE_CHAIN (c) = gimple_omp_target_clauses (target); @@ -17749,7 +17749,7 @@ grid_gridify_all_targets (gimple_seq *body_p) memset (&wi, 0, sizeof (wi)); walk_gimple_seq_mod (body_p, grid_gridify_all_targets_stmt, NULL, &wi); } - + /* Main entry point. */ diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 31cea10..9c13d84 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -944,7 +944,7 @@ dump_omp_clause (pretty_printer *pp, tree clause, int spc, int flags) case OMP_CLAUSE__GRIDDIM_: pp_string (pp, "_griddim_("); - pp_unsigned_wide_integer (pp, OMP_CLAUSE_GRIDDIM_DIMENSION (clause)); + pp_unsigned_wide_integer (pp, OMP_CLAUSE__GRIDDIM__DIMENSION (clause)); pp_colon (pp); dump_generic_node (pp, OMP_CLAUSE__GRIDDIM__SIZE (clause), spc, flags, false); diff --git a/gcc/tree.h b/gcc/tree.h index e885ea1..9b987bb 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -1636,12 +1636,9 @@ extern void protected_set_expr_location (tree, location_t); #define OMP_CLAUSE_TILE_LIST(NODE) \ OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE_TILE), 0) -#define OMP_CLAUSE_GRIDDIM_DIMENSION(NODE) \ +#define OMP_CLAUSE__GRIDDIM__DIMENSION(NODE) \ (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE__GRIDDIM_)\ ->omp_clause.subcode.dimension) -#define OMP_CLAUSE_SET_GRIDDIM_DIMENSION(NODE, DIMENSION) \ - (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE__GRIDDIM_)\ - ->omp_clause.subcode.dimension = (DIMENSION)) #define OMP_CLAUSE__GRIDDIM__SIZE(NODE) \ OMP_CLAUSE_OPERAND (OMP_CLAUSE_SUBCODE_CHECK (NODE, OMP_CLAUSE__GRIDDIM_), 0) #define OMP_CLAUSE__GRIDDIM__GROUP(NODE) \ -- 2.6.4