aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/ChangeLog.gomp
blob: 35e1f7df066c73b44823c32d5d053d1fb2c2e78d (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
2016-05-27  Jakub Jelinek  <jakub@redhat.com>

	* gfortran.h (enum gfc_statement): Add ST_OMP_ORDERED_DEPEND.
	(enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and
	OMP_DEPEND_SINK.
	(struct gfc_omp_clauses): Add depend_source field.
	* parse.c (decode_omp_directive): If ordered directive has
	depend clause as the first of the clauses, use
	gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of
	gfc_match_omp_ordered and ST_OMP_ORDERED.
	(case_executable): Add ST_OMP_ORDERED_DEPEND case.
	(gfc_ascii_statement): Handle ST_OMP_ORDERED_DEPEND.
	* st.c (gfc_free_statement): Free omp clauses even for
	EXEC_OMP_ORDERED.
	* dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST
	depend_op.
	(show_omp_clauses): Handle depend_source.
	(show_omp_node): Print clauses for EXEC_OMP_ORDERED.  Allow NULL
	c->block for EXEC_OMP_ORDERED.
	* trans-openmp.c (gfc_trans_omp_clauses): Handle OMP_DEPEND_SINK_FIRST
	depend_op.  Handle orderedc and depend_source.
	(gfc_trans_omp_do): Set collapse to orderedc if non-zero.  Fill in
	OMP_FOR_ORIG_DECLS for doacross loops.
	(gfc_trans_omp_ordered): Translate omp clauses, allow NULL
	code->block.
	(gfc_split_omp_clauses): Copy orderedc together with ordered.
	* frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_ORDERED.
	* openmp.c (gfc_match_omp_depend_sink): New function.
	(gfc_match_omp_clauses): Parse depend(source) and depend(sink: ...).
	(OMP_ORDERED_CLAUSES): Define.
	(gfc_match_omp_ordered): Parse clauses.
	(gfc_match_omp_ordered_depend): New function.
	(resolve_omp_clauses): Require orderedc >= collapse if specified.
	Handle depend(sink:) and depend(source) restrictions.  Disallow linear
	clause when orderedc is non-zero.
	(gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc
	if non-zero.
	(resolve_omp_do): Set collapse to orderedc if non-zero.
	* match.h (gfc_match_omp_ordered_depend): New prototype.
	* match.c (match_exit_cycle): Rename collapse variable to count,
	set it to orderedc if non-zero, instead of collapse.

2016-05-24  Jakub Jelinek  <jakub@redhat.com>

	* gfortran.h (enum gfc_omp_linear_op): New.
	(struct gfc_omp_namelist): Add u.linear_op field.
	* openmp.c (gfc_match_omp_clauses): Add support for parsing
	linear clause modifiers.
	(resolve_omp_clauses): Diagnose linear clause modifiers when not
	in declare simd.  Only check for integer type if ref modifier is not
	used.  Remove diagnostics for required VALUE attribute.  Diagnose
	VALUE attribute with ref or uval modifiers.  Allow non-constant
	linear-step, if it is a dummy argument alone and is mentioned in
	uniform clause.
	* dump-parse-tree.c (show_omp_namelist): Print linear clause
	modifiers.
	* trans-openmp.c (gfc_trans_omp_clauses): Test declare_simd
	instead of block == NULL_TREE.  Translate linear clause modifiers
	and clause with uniform dummy argument linear-step.

2016-05-20  Jakub Jelinek  <jakub@redhat.com>

	* trans.h (gfc_omp_scalar_p): New prototype.
	* f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p.
	* trans-openmp.c (gfc_omp_scalar_p): New function.
	(gfc_trans_omp_do): Clear sched_simd flag.
	(gfc_split_omp_clauses): Change firstprivate and lastprivate
	handling for OpenMP 4.5.
	(gfc_trans_omp_teams): Add omp_clauses argument, add it to other
	teams clauses.
	(gfc_trans_omp_target): For -fopenmp, translate num_teams and
	thread_limit clauses on combined target teams early and pass to
	gfc_trans_omp_teams.
	(gfc_trans_omp_directive): Adjust gfc_trans_omp_teams caller.

2016-05-17  Jakub Jelinek  <jakub@redhat.com>

	* trans-openmp.c (gfc_split_omp_clauses): Handle EXEC_OMP_TARGET_SIMD.
	(gfc_trans_omp_teams): Don't wrap into OMP_TEAMS if -fopenmp-simd.
	(gfc_trans_omp_target): Set OMP_TARGET_COMBINED if needed.

2016-05-16  Jakub Jelinek  <jakub@redhat.com>

	* trans.c (trans_code): Handle new OpenMP 4.5 constructs.
	* resolve.c (gfc_resolve_blocks): Likewise.
	(gfc_resolve_code): Likewise.
	* trans-openmp.c (gfc_trans_omp_clauses): Handle new OpenMP 4.5
	clauses and new clause modifiers.
	(gfc_trans_omp_do): Handle EXEC_OMP_TASKLOOP.
	(GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants.
	(gfc_split_omp_clauses): Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
	and EXEC_OMP_TASKLOOP{,_SIMD}.  Add handling for new OpenMP 4.5
	clauses and clause modifiers and handle if clause without/with
	modifiers.
	(gfc_trans_omp_target): Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
	and EXEC_OMP_TARGET_SIMD.
	(gfc_trans_omp_taskloop): New function.
	(gfc_trans_omp_directive): Handle EXEC_OMP_TASKLOOP{,_SIMD},
	EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and EXEC_OMP_TARGET_SIMD.
	* openmp.c (resolve_oacc_scalar_int_expr): Renamed to ...
	(resolve_scalar_int_expr): ... this.  Fix up formatting.
	(resolve_oacc_positive_int_expr): Renamed to ...
	(resolve_positive_int_expr): ... this.  Fix up formatting.
	(resolve_nonnegative_int_expr): New function.
	(resolve_omp_clauses): Adjust callers, use the above functions
	even for OpenMP clauses, add handling of new OpenMP 4.5 clauses.
	(gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs,
	replace underscores with spaces in a few construct names.
	(resolve_omp_do): Handle new OpenMP 4.5 constructs.
	(resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead
	of resolve_oacc_positive_int_expr.
	(gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs.

2016-05-13  Jakub Jelinek  <jakub@redhat.com>

	* parse.c (decode_omp_directive): Use gfc_match_omp_end_critical
	instead of gfc_match_omp_critical for !$omp end critical.
	Handle new OpenMP 4.5 constructs.
	(case_executable): Add ST_OMP_TARGET_ENTER_DATA and
	ST_OMP_TARGET_EXIT_DATA cases.
	(case_exec_markers): Add ST_OMP_TARGET_PARALLEL,
	ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
	ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases.
	(gfc_ascii_statement): Handle new OpenMP 4.5 constructs.
	(parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO,
	ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and
	ST_OMP_TASKLOOP_SIMD.
	(parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead
	of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses
	now.
	(parse_executable): Handle ST_OMP_TARGET_PARALLEL,
	ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
	ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD.
	* st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like
	EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL
	and new OpenMP 4.5 constructs.
	* dump-parse-tree.c (show_omp_node): Formatting fixes.  Adjust
	handling of EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs
	and some forgotten OpenMP 4.0 constructs.
	(show_code_node): Handle new OpenMP 4.5 constructs and some forgotten
	OpenMP 4.0 constructs.
	* trans-openmp.c (gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL
	handling.
	* gfortran.h (enum gfc_statement): Add ST_OMP_TARGET_PARALLEL,
	ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO,
	ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
	ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA,
	ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
	ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD and
	ST_OMP_END_TASKLOOP_SIMD.
	(struct gfc_omp_clauses): Add critical_name field.
	(enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL,
	EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
	EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
	EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
	EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD.
	* frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_CRITICAL,
	EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD, EXEC_OMP_TARGET_ENTER_DATA,
	EXEC_OMP_TARGET_EXIT_DATA, EXEC_OMP_TARGET_PARALLEL,
	EXEC_OMP_TARGET_PARALLEL_DO, EXEC_OMP_TARGET_PARALLEL_DO_SIMD and
	EXEC_OMP_TARGET_SIMD.
	* openmp.c (gfc_free_omp_clauses): Free critical_name field.
	(OMP_DO_CLAUSES): Add OMP_CLAUSE_LINEAR.
	(OMP_SIMD_CLAUSES): Add OMP_CLAUSE_SIMDLEN.
	(OMP_TASKLOOP_CLAUSES, OMP_TARGET_ENTER_DATA_CLAUSES,
	OMP_TARGET_EXIT_DATA_CLAUSES): Define.
	(gfc_match_omp_critical): Parse optional clauses and use omp_clauses
	union member instead of omp_name.
	(gfc_match_omp_end_critical): New function.
	(gfc_match_omp_distribute_parallel_do): Remove ordered and linear
	clauses from the mask.
	(gfc_match_omp_do_simd): Don't remove ordered clause from the mask.
	(gfc_match_omp_parallel_do_simd): Likewise.
	(gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield):
	Move around to where they belong alphabetically.
	(gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data,
	gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do,
	gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd): New
	functions.
	(gfc_match_omp_target_teams_distribute_parallel_do): Remove ordered
	and linear clauses from the mask.
	(gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd): New functions.
	(gfc_match_omp_teams_distribute_parallel_do): Remove ordered and
	linear clauses from the mask.
	* match.h (gfc_match_omp_target_enter_data,
	gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel,
	gfc_match_omp_target_parallel_do,
	gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
	gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd,
	gfc_match_omp_end_critical): New prototypes.

2016-05-06  Jakub Jelinek  <jakub@redhat.com>

	* gfortran.h (enum gfc_omp_map_op): Add OMP_MAP_RELEASE,
	OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM.
	(OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New.
	(enum gfc_omp_if_kind): New.
	(struct gfc_omp_clauses): Add orderedc, defaultmap, nogroup,
	sched_simd, sched_monotonic, sched_nonmonotonic, simd, threads,
	grainsize, hint, num_tasks, priority and if_exprs fields.
	* openmp.c (gfc_free_omp_clauses): Free grainsize, hint, num_tasks,
	priority and if_exprs.
	(enum omp_mask1): Add OMP_CLAUSE_DEFAULTMAP, OMP_CLAUSE_GRAINSIZE,
	OMP_CLAUSE_HINT, OMP_CLAUSE_IS_DEVICE_PTR, OMP_CLAUSE_LINK,
	OMP_CLAUSE_NOGROUP, OMP_CLAUSE_NUM_TASKS, OMP_CLAUSE_PRIORITY,
	OMP_CLAUSE_SIMD, OMP_CLAUSE_THREADS, OMP_CLAUSE_USE_DEVICE_PTR
	and OMP_CLAUSE_NOWAIT.
	(enum omp_mask2): Remove OMP_CLAUSE_OACC_DEVICE and OMP_CLAUSE_LINK.
	(gfc_match_omp_clauses): Move delete clause handling to where it
	alphabetically belongs.  Parse defaultmap, grainsize, hint,
	is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads
	and use_device_ptr clauses.  Parse if clause modifier.  Parse map
	clause always modifier, and release and delete kinds.  Parse ordered
	clause with argument.  Parse schedule clause modifiers.  Differentiate
	device clause parsing based on openacc flag.  Guard link clause
	parsing with openacc flag.
	(OACC_UPDATE_CLAUSES): Replace OMP_CLAUSE_OACC_DEVICE with
	OMP_CLAUSE_DEVICE.
	(OMP_TASK_CLAUSES): Add OMP_CLAUSE_PRIORITY.
	(OMP_TARGET_CLAUSES): Add OMP_CLAUSE_DEPEND, OMP_CLAUSE_NOWAIT,
	OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_DEFAULTMAP
	and OMP_CLAUSE_IS_DEVICE_PTR.     
	(OMP_TARGET_DATA_CLAUSES): Add OMP_CLAUSE_USE_DEVICE_PTR.
	(OMP_TARGET_UPDATE_CLAUSES): Add OMP_CLAUSE_DEPEND and
	OMP_CLAUSE_NOWAIT.
	(resolve_omp_clauses): Add dummy OMP_LIST_IS_DEVICE_PTR and
	OMP_LIST_USE_DEVICE_PTR cases.
	* frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5
	expressions.
	* dump-parse-tree.c (show_omp_clauses): Adjust for OpenMP 4.5
	clause changes.  

	* openmp.c (enum omp_mask1, enum omp_mask2): New enums.
	Change all OMP_CLAUSE_* defines into enum values, and change their
	values from ((uint64_t) 1 << bit) to just bit.
	(omp_mask, omp_inv_mask): New classes.  Add ctors and operators.
	(gfc_match_omp_clauses): Change mask argument from uint64_t to
	const omp_mask.  Assert OMP_MASK1_LAST and OMP_MASK2_LAST are
	at most 64.
	(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
	OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
	OACC_UPDATE_CLAUSES, OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES,
	OACC_WAIT_CLAUSES, OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES,
	OMP_DECLARE_SIMD_CLAUSES, OMP_DO_CLAUSES, OMP_SECTIONS_CLAUSES,
	OMP_SIMD_CLAUSES, OMP_TASK_CLAUSES, OMP_TARGET_CLAUSES,
	OMP_TARGET_DATA_CLAUSES, OMP_TARGET_UPDATE_CLAUSES,
	OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES): Replace first or only
	OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*).
	(OMP_SINGLE_CLAUSES): Define.
	(match_omp): Change mask argument from unsigned int to
	const omp_mask.
	(gfc_match_omp_distribute_parallel_do_simd, gfc_match_omp_do_simd,
	gfc_match_omp_parallel_do_simd,
	gfc_match_omp_target_teams_distribute_parallel_do_simd,
	gfc_match_omp_teams_distribute_parallel_do_simd): Use
	& ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*.
	(gfc_match_omp_single): Use OMP_SINGLE_CLAUSES.
	(gfc_match_omp_cancel, gfc_match_omp_end_single): Use
	omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*.

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

	* types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): Remove.
	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): New.

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.