aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/ChangeLog.gomp
blob: a08c43878bb8e5fbe27e51a584a083bc5ed24dca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
2015-10-13  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (finish_omp_clauses): Disallow modifiers on simd/for
	constructs.

2015-10-09  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (handle_omp_array_sections_1): Diagnose negative
	length even for pointer based array sections.

	* parser.c: Adjust OpenMP version numbers from 4.1 to 4.5 in
	all comments.

2015-10-01  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (handle_omp_for_class_iterator): Add collapse and
	ordered arguments.  Fix handling of lastprivate iterators in
	doacross loops.
	(finish_omp_for): Adjust caller.

2015-09-25  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_depend_sink): Put - sign
	into OMP_CLAUSE_DEPEND_SINK_NEGATIVE instead of negating the number.
	(cp_parser_omp_for_loop): Adjust for ordered clause counting
	source loops before collapsing instead of after it.  Require
	ordered clause parameter to be >= collapse parameter.
	* pt.c (tsubst_omp_clause_decl): Copy
	OMP_CLAUSE_DEPEND_SINK_NEGATIVE flag.

2015-09-10  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_ordered): Test tree_fits_shwi_p
	before INTEGRAL_TYPE_P test.

2015-09-02  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (handle_omp_array_sections): Set
	OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION even for
	GOMP_MAP_DELETE kinds.

2015-08-31  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_var_list_no_open): Parse struct element
	on map/to/from clauses.
	(cp_parser_omp_clause_map): Fix up parsing of delete kind.
	* pt.c (tsubst_expr): For OMP_TARGET{,_DATA} pass true instead of
	false to allows_field.
	* semantics.c (handle_omp_array_sections_1): Add IS_OMP argument,
	pass it down recursively.  Handle struct element based array sections.
	(handle_omp_array_sections): Adjust caller.  Handle struct element
	based array sections.
	(finish_omp_clauses): Handle struct element mappings and struct
	element based array sections.  Use generic_head instead of map_head
	for GOMP_MAP_FIRSTPRIVATE_POINTER duplicate testing.

2015-07-31  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (handle_omp_array_sections): Handle
	GOMP_MAP_RELEASE for zero-length array sections.

2015-07-29  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_target_data, cp_parser_omp_target_enter_data,
	cp_parser_omp_target_exit_data): Formatting fixes.  Disallow
	GOMP_MAP_POINTER, allow GOMP_MAP_FIRSTPRIVATE_POINTER but don't set
	map_seen for it.
	(cp_parser_omp_target): Set OMP_TARGET_COMBINED if combined.
	Disallow GOMP_MAP_POINTER, allow GOMP_MAP_FIRSTPRIVATE_POINTER.
	* semantics.c (handle_omp_array_sections): Add is_omp argument.
	Set OMP_CLAUSE_MAP_MAYBE_ZERO_LENGTH_ARRAY_SECTION if needed.
	Use GOMP_MAP_FIRSTPRIVATE_POINTER instead of GOMP_MAP_POINTER
	if is_omp.
	(finish_omp_clauses): Handle GOMP_MAP_FIRSTPRIVATE_POINTER.
	For is_device_ptr/use_device_ptr clauses allow ARRAY_TYPE
	and REFERENCE_TYPE to ARRAY_TYPE.

2015-07-21  Aldy Hernandez  <aldyh@redhat.com>

	* semantics.c (cp_finish_omp_clause_depend_sink): New.
	(finish_omp_clauses): Call cp_finish_omp_clause_depend_sink.

2015-07-17  Aldy Hernandez  <aldyh@redhat.com>

	* parser.c (cp_parser_omp_clause_depend_sink): Handle multiple
	undeclared sink variables gracefully.

2015-07-17  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_name): Handle link clause.
	(cp_parser_omp_var_list_no_open): Formatting fix.
	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_LINK.
	For PRAGMA_OMP_CLAUSE_TO, parse it as OMP_CLAUSE_TO_DECLARE
	rather than OMP_CLAUSE_TO if it is a declare target directive clause.
	(OMP_DECLARE_TARGET_CLAUSE_MASK): Define.
	(cp_parser_omp_declare_target): Parse directive with clauses forms.
	* semantics.c (finish_omp_clauses): Handle
	OMP_CLAUSE_{TO_DECLARE,LINK}.

2015-07-16  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_priority): Fix typo.
	(cp_parser_omp_parallel): Allow parsing
	#pragma omp target parallel.
	(cp_parser_omp_target): Allow parsing #pragma omp target simd
	and #pragma omp target parallel{, for{, simd}}.

2015-07-16  Aldy Hernandez  <aldyh@redhat.com>

	* cp-tree.h (finish_omp_for): Add new argument.
	* parser.c (cp_parser_omp_for_loop): Pass new argument to
	finish_omp_for.
	* pt.c (tsubst_omp_for_iterator): New argument orig_declv.
	Set OMP_FOR_ORIG_DECLS from orig_declv if available.
	(tsubst_expr): Pass new vector to tsubst_omp_for_iterator.
	* semantics.c (finish_omp_for): Pass original DECLs to
	c_finish_omp_for.
	Set OMP_FOR_ORIG_DECLS.

2015-07-15  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_var_list_no_open): Don't process
	RID_THIS for kind == 0.  Don't call cp_parser_name_lookup_error
	if finish_this_expr returned error_mark_node.

	* parser.c (cp_parser_omp_clause_if): Add IS_OMP argument.  Parse
	and diagnose directive-name-modifier.
	(cp_parser_oacc_all_clauses, cp_parser_omp_all_clauses): Adjust
	callers.

2015-07-14  Aldy Hernandez  <aldyh@redhat.com>

	* parser.c (cp_parser_omp_clause_depend_sink): New.
	(cp_parser_omp_clause_depend): Call it.
	* pt.c (tsubst_omp_clause_decl): Handle OMP_CLAUSE_DEPEND_KIND.
	(tsubst_expr): Handle OMP_ORDERED_CLAUSES.
	* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DEPEND_KIND.

2015-07-14  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_name): Parse use_device_ptr
	and is_device_ptr.
	(cp_parser_omp_all_clauses): Handle OMP_CLAUSE_{USE,IS}_DEVICE_PTR.
	(OMP_TARGET_DATA_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR.
	(OMP_TARGET_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_IS_DEVICE_PTR.
	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_{USE,IS}_DEVICE_PTR.
	* semantics.c (finish_omp_clauses): Likewise.

2015-07-09  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_var_list_no_open): Parse this.
	* cp-tree.h (finish_omp_declare_simd_methods): New prototype.
	* semantics.c (handle_omp_array_sections_1): Disallow this based
	array sections for OpenMP.
	(finish_omp_declare_simd_methods): New function.
	(finish_omp_clauses): Don't attempt to adjust linear step of
	this if it points to TYPE_BEING_DEFINED.  Disallow this in
	all clauses expecting variable lists, except for declare simd
	linear/uniform/aligned clauses.
	(finish_struct_1): Call finish_omp_declare_simd_methods.

2015-07-06  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_name): Handle defaultmap clause.
	(cp_parser_omp_clause_defaultmap): New function.
	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_DEFAULTMAP.
	(OMP_TARGET_CLAUSE_MASK): Add private, firstprivate and defaultmap
	clauses.
	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_HINT and
	OMP_CLAUSE_DEFAULTMAP.
	* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_DEFAULTMAP.
	Track map, to and from clause decl uids separately from data sharing
	clauses.

2015-07-02  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_for_loop): Parse collapse + ordered - 1
	nested loops if ordered(n) clause is present.

2015-07-01  Jakub Jelinek  <jakub@redhat.com>

	* cp-tree.h (finish_omp_clauses): Add declare_simd argument.
	* parser.c (cp_parser_omp_all_clauses): If mask includes uniform
	clause, pass true to finish_omp_clauses' declare_simd.
	* pt.c (apply_late_template_attributes): Pass true to
	finish_omp_clauses' declare_simd.
	* semantics.c (finish_omp_clauses): Add declare_simd argument,
	don't set need_implicitly_determined if it is true.

2015-06-26  Jakub Jelinek  <jakub@redhat.com>

	* cp-tree.h (push_omp_privatization_clauses): Add bool
	argument.
	(omp_privatize_field): New prototype.
	* parser.c (cp_parser_omp_for_incr): For processing_template_decl
	use cp_tree_equals.
	(cp_parser_omp_for_loop_init): Change return type to tree,
	handle non-static data member iterators, return decl to
	add to private clause if one should be added.
	(cp_parser_omp_for_loop): Adjust caller.  For OMP_SIMD,
	add OMP_CLAUSE_LINEAR or OMP_CLAUSE_LASTPRIVATE instead of
	OMP_CLAUSE_PRIVATE.  Handle NULL TREE_TYPE as non-pointer.
	(cp_parser_pragma): Adjust push_omp_privatization_clauses callers.
	* pt.c (tsubst_omp_clauses): If there is a single OMP_CLAUSE_LINEAR
	with NULL OMP_CLAUSE_LINEAR_STEP, make sure it is NULL even after
	finish_omp_clauses.
	(omp_parallel_combined_clauses): New variable.
	(tsubst_omp_for_iterator): Handle non-static data members,
	for combined parallel for move lastprivate clause from parallel
	to for and avoid making already private iterator private again.
	(tsubst_expr): Adjust push_omp_privatization_clauses callers.
	For OMP_PARALLEL with OMP_PARALLEL_COMBINED temporarily set
	omp_parallel_combined_clauses and clear it in OMP_FOR
	and OMP_SECTIONS.
	(instantiate_decl): Call save_omp_privatization_clauses
	and restore_omp_privatization_clauses if nested.
	(dependent_omp_for_p): Return true even if the iterator
	is non-type dependent SCOPE_REF.
	* semantics.c (omp_private_member_ignore_next): New variable.
	(omp_privatize_field): No longer static.
	(push_omp_privatization_clauses): Add ignore_next argument.
	Set omp_private_member_ignore_next to it, return NULL early
	if omp_private_member_ignore_next was set before.
	(pop_omp_privatization_clauses): Do nothing if stmt is NULL.
	(save_omp_privatization_clauses): Save also
	omp_private_member_ignore_next flag in the vector.
	(restore_omp_privatization_clauses): And restore it.
	(finish_omp_for): For OMP_SIMD, fill in OMP_CLAUSE_LINEAR_STEP
	for the iterator if NULL.

2015-06-23  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (handle_omp_for_class_iterator): Handle
	OMP_TASKLOOP class iterators.
	(finish_omp_for): Adjust handle_omp_for_class_iterator
	caller.

2015-06-18  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (OMP_TASKLOOP_CLAUSE_MASK): Add priority clause.

	PR c++/66571
	* pt.c (tsubst_omp_clause_decl): Use tsubst_expr instead of
	tsubst_copy.  Undo convert_from_reference if non-REFERENCE_REF_P
	became REFERENCE_REF_P after tsubst_expr.
	(tsubst_omp_clauses): Use tsubst_omp_clause_decl instead of
	tsubst_copy for OMP_CLAUSE_DECL on all clauses.  Remove earlier
	INDIRECT_REF adjustments in the allow_fields handling.

2015-06-12  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_name): Parse hint clause.
	(cp_parser_omp_clause_hint): New function.
	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_HINT.
	(OMP_CRITICAL_CLAUSE_MASK): Define.
	(cp_parser_omp_critical): Parse optional hint clause.  Adjust
	c_finish_omp_critical caller.
	* pt.c (tsubst_expr): Handle OMP_CRITICAL like OMP_SECTIONS.
	* semantics.c (finish_omp_clauses): Handle OMP_CLAUSE_HINT.

	* parser.c (cp_parser_omp_clause_schedule): Parse optional
	simd: modifier in schedule clause.

2015-06-11  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_linear): Handle linear clause
	modifiers.
	* semantics.c (finish_omp_clauses): Diagnose linear(ref(var))
	where var isn't a reference.  Don't use pointer_sum
	for ref(var), just multiply by size of pointer.

2015-06-11  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_map): Handle release
	map kind.  Adjust to use GOMP_MAP_ALWAYS_* and only on
	clauses where it makes sense.
	(cp_parser_omp_target_data): Diagnose invalid map-kind
	for the construct.
	(cp_parser_omp_target_enter_data): Adjust for new encoding
	of always,from, always,to and always,tofrom.  Accept
	GOMP_MAP_POINTER.
	(cp_parser_omp_target_exit_data): Likewise.
	(cp_parser_omp_target): Diagnose invalid map-kind for the
	construct.

2015-06-10  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_var_list_no_open): Allow array sections
	for OMP_CLAUSE_REDUCTION.
	* semantics.c (omp_clause_decl_field, omp_note_field_privatization,
	omp_privatize_field): New functions.
	(omp_clause_printable_decl): Use omp_clause_decl_field, move
	earlier.
	(handle_omp_array_sections_1): Fix a comment typo.
	Handle OMP_CLAUSE_REDUCTION array sections.  Report zero size
	array sections on OMP_CLAUSE_DEPEND.
	(handle_omp_array_sections): Handle OMP_CLAUSE_REDUCTION array
	sections.
	(finish_omp_reduction_clause): Handle OMP_CLAUSE_REDUCTION array
	sections and arrays.
	(finish_omp_clauses): Likewise.  Use omp_note_field_privatization,
	omp_clause_decl_field and omp_privatize_field.

2015-06-03  Jakub Jelinek  <jakub@redhat.com>

	* semantics.c (omp_clause_printable_decl): New function.
	(finish_omp_reduction_clause, finish_omp_clauses): Use it.

2015-06-02  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_lambda_body): Call
	save_omp_privatization_clauses and restore_omp_privatization_clauses
	around lambda body parsing.
	(cp_parser_oacc_all_clauses, cp_parser_omp_all_clauses,
	cp_parser_omp_for_loop, cp_omp_split_clauses, cp_parser_oacc_cache,
	cp_parser_cilk_for): Adjust finish_omp_clauses callers.
	(cp_parser_pragma): Call push_omp_privatization_clauses and
	pop_omp_privatization_clauses around OpenMP pragma parsing.
	* cp-gimplify.c (cxx_omp_disregard_value_expr): New function.
	* pt.c (apply_late_template_attributes): Adjust finish_omp_clauses
	and tsubst_omp_clauses callers.
	(tsubst_omp_clauses): Add ALLOW_FIELDS argument, adjust possible
	non-static data member arguments and pass ALLOW_FIELDS down to
	finish_omp_clauses.
	(tsubst_omp_for_iterator): Adjust finish_omp_clauses caller.
	(tsubst_expr): Adjust tsubst_omp_clauses caller, call
	push_omp_privatization_clauses and pop_omp_privatization_clauses
	around instantiation of the constructs.
	* cp-tree.h (DECL_OMP_PRIVATIZED_MEMBER): Define.
	(finish_omp_clauses): Add ALLOW_FIELDS argument to prototype.
	(push_omp_privatization_clauses, pop_omp_privatization_clauses,
	save_omp_privatization_clauses, restore_omp_privatization_clauses,
	cxx_omp_disregard_value_expr): New prototypes.
	* cp-objcp-common.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR): Redefine.
	* semantics.c (omp_private_member_map, omp_private_member_vec): New
	variables.
	(finish_non_static_data_member): Return dummy decl for privatized
	non-static data members.
	(finish_omp_clauses): Add ALLOW_FIELDS argument.  Handle
	non-static data member privatization in {,first,last,copy}private,
	reduction and linear clauses.  Diagnose linear with predetermined
	decls.
	(push_omp_privatization_clauses, pop_omp_privatization_clauses,
	save_omp_privatization_clauses, restore_omp_privatization_clauses):
	New functions.
	(finish_omp_for): Adjust finish_omp_clauses caller.

2015-05-27  Jakub Jelinek  <jakub@redhat.com>

	* cp-gimplify.c (cxx_omp_finish_clause): Don't complain about
	reference type here.
	* semantics.c (finish_omp_clauses): Allow references in
	{{,first,last}private,linear} clauses.

2015-05-26  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_name): Handle grainsize, nogroup,
	num_tasks, priority, simd and threads clauses.
	(cp_parser_omp_clause_num_tasks, cp_parser_omp_clause_grainsize,
	cp_parser_omp_clause_priority): New functions.
	(cp_parser_omp_clause_ordered): Handle parsing of optional argument.
	(cp_parser_omp_clause_nogroup, cp_parser_omp_clause_orderedkind):
	New functions.
	(cp_parser_omp_clause_depend): Add LOC argument.  Handle parsing of
	depend(source) and partially handle depend(sink:vec).
	(cp_parser_omp_clause_map): Parse optional always map type modifier.
	Handle parsing of delete map kind.
	(cp_parser_omp_all_clauses): Handle
	PRAGMA_OMP_CLAUSE_{GRAINSIZE,NUM_TASKS,PRIORITY,NOGROUP,THREADS,SIMD}.
	(OMP_SIMD_CLAUSE_MASK): Add simdlen clause.
	(OMP_FOR_CLAUSE_MASK): Add linear clause.
	(OMP_ORDERED_CLAUSE_MASK, OMP_ORDERED_DEPEND_CLAUSE_MASK): Define.
	(cp_parser_omp_ordered): Handle parsing of the clauses, and if depend
	clause is present, parse it as standalone directive.  Add CONTEXT
	argument.
	(OMP_TASK_CLAUSE_MASK): Add priority clause.
	(cp_parser_omp_target_data): Diagnose if no map clauses are present.
	(OMP_TARGET_ENTER_DATA_CLAUSE_MASK): Define.
	(cp_parser_omp_target_enter_data): New function.
	(OMP_TARGET_EXIT_DATA_CLAUSE_MASK): Define.
	(cp_parser_omp_target_exit_data): New function.
	(OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK): Add nowait
	and depend clauses.
	(cp_parser_omp_target): Handle #pragma omp target {enter,exit} data.
	(OMP_TASKLOOP_CLAUSE_MASK): Define.
	(cp_parser_omp_taskloop): New function.
	(cp_parser_omp_construct): Don't handle PRAGMA_OMP_ORDERED here.
	Handle PRAGMA_OMP_TASKLOOP.
	(cp_parser_pragma): Handle PRAGMA_OMP_ORDERED directly.  Handle
	PRAGMA_OMP_TASKLOOP.
	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_NUM_TASKS,
	OMP_CLAUSE_GRAINSIZE, OMP_CLAUSE_PRIORITY, OMP_CLAUSE_NOGROUP,
	OMP_CLAUSE_THREADS, OMP_CLAUSE_SIMD.  Handle argument
	of OMP_CLAUSE_ORDERED.
	(tsubst_expr): Handle OMP_TASKLOOP.
	* semantics.c (finish_omp_clauses): Allow NULL OMP_CLAUSE_DECL
	for OMP_CLAUSE_DEPEND_SOURCE.  Diagnose simdlen > safelen.  Handle
	OMP_CLAUSE_{PRIORITY,GRAINSIZE,NUM_TASKS,NOGROUP,THREADS,SIMD}
	clauses.  Warn about non-positive num_threads/num_teams/thread_limit
	arguments.
	* cp-gimplify.c (cp_gimplify_expr, cp_genericize_r): Handle
	OMP_TASKLOOP.
	* cp-tree.h (OMP_FOR_GIMPLIFYING_P): Adjust comment to
	include OMP_TASKLOOP.

2015-04-29  Jakub Jelinek  <jakub@redhat.com>

	* parser.c (cp_parser_omp_clause_ordered): Clear
	OMP_CLAUSE_ORDERED_EXPR.
	(cp_parser_omp_ordered): Pass NULL_TREE as clauses
	to c_finish_omp_ordered.

Copyright (C) 2015 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.