OpenACC documentation updates.
[official-gcc.git] / gcc / fortran / ChangeLog.gomp
blob98e3971b13f70aa450f9f4742b8275f4b83e19a0
1 2014-11-05  Thomas Schwinge  <thomas@codesourcery.com>
3         * gfortran.texi: Update for OpenACC.
4         * intrinsic.texi: Likewise.
5         * invoke.texi: Likewise.
7 2014-11-04  Cesar Philippidis  <cesar@codesourcery.com>
9         * gfortran.h (ST_OACC_ROUTINE): New statement enum.
10         * match.h (gfc_match_oacc_routine): New prototype.
11         * openmp.c (gfc_match_oacc_routine): New function.
12         * parse.c (decode_oacc_directive): Handle the routine directive.
13         (next_statement): Handle ST_OACC_ROUTINE.
14         (gfc_ascii_statement): Likewise.
16 2014-11-03  Cesar Philippidis  <cesar@codesourcery.com>
18         * gfortran.h (enum OMP_LIST_HOST): Remove.
19         (enum OMP_LIST_DEVICE, OMP_LIST_DEVICE): Remove.
20         * dump-parse-tree.c (show_omp_clauses): Remove OMP_LIST_HOST and
21         OMP_LIST_DEVICE from here also.
22         * openmp.c (OMP_CLAUSE_SELF): New define.
23         (gfc_match_omp_clauses): Update handling of OMP_CLAUSE_HOST and
24         OMP_CLAUSE_DEVICE. Add support for OMP_CLAUSE_SELF.
25         * trans-openmp.c (gfc_trans_omp_clauses): Remove support for
26         OMP_LIST_HOST and OMP_LIST_DEVICE since they are treated as memory
27         maps now.
28         (gfc_trans_oacc_executable_directive): Remove stale EXEC_OACC_WAIT.
30 2014-10-31  Cesar Philippidis  <cesar@codesourcery.com>
32         * gfortran.h (struct gfc_omp_clauses): Remove non_clause_wait_expr.
33         * dump-parse-tree.c (show_omp_clauses): Likewise.
34         * openmp.c (gfc_free_omp_clauses): Likewise.
35         (gfc_match_omp_clauses): Update handling of async.
36         (OACC_WAIT_CLAUSE_MASK): New define.
37         (gfc_match_oacc_wait): Make the wait directive comply with OpenACC 2.0.
38         (resolve_omp_clauses): Use resolve_oacc_scalar_in_expr inspect
39         arguments to the wait clause.
40         (resolve_oacc_wait): Remove.
41         (gfc_resolve_oacc_directive): Handle EXEC_OACC_WAIT with
42         resolve_omp_clauses.
43         * trans-openmp.c (gfc_trans_omp_clauses): Update handling of OpenACC
44         wait arguments.
45         (gfc_trans_oacc_executable_directive): Remove EXEC_OACC_WAIT.
46         (gfc_trans_oacc_wait_directive): New function.
47         (gfc_trans_oacc_directive): Use it.
49 2014-10-15  James Norris  <jnorris@codesourcery.com>
51         * types.def (BT_FN_VOID_INT_PTR_INT): New type.
53 2014-09-23  Thomas Schwinge  <thomas@codesourcery.com>
55         * f95-lang.c (DEF_GOACC_BUILTIN_COMPILER): New macro.
56         * types.def (BT_FN_INT_INT): New type.
58 2014-09-08  Cesar Philippidis  <cesar@codesourcery.com>
60         * gfortran.h (enum OMP_LIST_FIRST, OMP_LIST_LAST): New
61         OMP enums.
62         * openmp.c (oacc_compatible_clauses): New function.
63         (resolve_omp_clauses): Use it.
64         (struct omp_context): Add is_openmp member.
65         (gfc_resolve_omp_parallel_blocks): Set is_openmp true.
66         (gfc_resolve_do_iterator): Scan for compatible clauses.
67         (typedef oacc_context): Remove.
68         (oacc_current_ctx): Remove. Use omp_current_ctx for both
69         OpenACC and OpenMP.
70         (resolve_oacc_directive_inside_omp_region): Replace
71         oacc_current_ctx with omp_current_ctx.
72         (resolve_omp_directive_inside_oacc_region): Likewise.
73         (resolve_oacc_nested_loops): Likewise.
74         (resolve_oacc_params_in_parallel): Likewise.
75         (resolve_oacc_loop_blocks): Likewise. Set is_openmp to false.
77 2014-07-28  Cesar Philippidis  <cesar@codesourcery.com>
78             Thomas Schwinge  <thomas@codesourcery.com>
79             Ilmir Usmanov  <i.usmanov@samsung.com>
81         * gfortran.h (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC,
82         OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
83         OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT.
84         (enum) Remove OMP_LIST_OACC_COPYIN, OMP_LIST_COPYOUT,
85         OMP_LIST_CREATE, OMP_LIST_DELETE, OMP_LIST_PRESENT,
86         OMP_LIST_PRESENT_OR_COPY, OMP_LIST_PRESENT_OR_COPYIN,
87         OMP_LIST_PRESENT_OR_COPYOUT, OMP_LIST_PRESENT_OR_CREATE.
88         * dump-parse-tree.c (show_omp_clauses): Remove handling of
89         OMP_LIST_OACC_COPYIN, OMP_LIST_COPYOUT, OMP_LIST_CREATE,
90         OMP_LIST_DELETE, OMP_LIST_PRESENT, OMP_LIST_PRESENT_OR_COPY,
91         OMP_LIST_PRESENT_OR_COPYIN, OMP_LIST_PRESENT_OR_COPYOUT,
92         OMP_LIST_PRESENT_OR_CREATE.
93         * openmp.c (OMP_CLAUSE_OACC_COPYIN): Remove define.
94         (gfc_match_omp_map_clause): New function.
95         (gfc_match_omp_clauses): New openacc argument. Treat
96         OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT, OMP_CLAUSE_CREATE,
97         OMP_CLAUSE_DELETE, OMP_CLAUSE_PRESENT, OMP_CLAUSE_PRESENT_OR_COPY,
98         OMP_CLAUSE_PRESENT_OR_COPYIN, OMP_CLAUSE_PRESENT_OR_COPYOUT, and
99         OMP_CLAUSE_PRESENT_OR_CREATE as OpenMP memory maps. Also, remove
100         support for OMP_CLAUSE_OACC_COPYIN. Make OMP_CLAUSE_COPYIN
101         represent the COPYIN clause for both OpenACC and OpenMP.
102         (OACC_PARALLEL_CLAUSES): Replace OMP_CLAUSE_OACC_COPYIN with
103         OMC_CLAUSE_COPYIN.
104         (OACC_KERNEL_CLAUSES): Likewise.
105         (OACC_DATA_CLAUSES): Likewise.
106         (OACC_DECLARE_CLAUSES): Likewise.
107         (OACC_ENTER_DATA_CLAUSES): Likewise.
108         (gfc_match_oacc_parallel_loop): Call gfc_match_omp_clauses with
109         the openacc parameter as true.
110         (gfc_match_oacc_parallel): Likewise.
111         (gfc_match_oacc_kernels_loop): Likewise.
112         (gfc_match_oacc_kernels): Likewise.
113         (gfc_match_oacc_data): Likewise.
114         (gfc_match_oacc_host_data): Likewise.
115         (gfc_match_oacc_loop): Likewise.
116         (gfc_match_oacc_declare): Likewise.
117         (gfc_match_oacc_update): Likewise.
118         (gfc_match_oacc_enter_data): Likewise.
119         (gfc_match_oacc_exit_data): Likewise.
120         (resolve_omp_clauses): New openacc argument. Call
121         resolve_oacc_data_clauses to check additional errors.
122         (resolve_oacc_loop): Update call to resolve_omp_clauses.
123         (resolve_oacc_wait): Likewise.
124         (gfc_resolve_oacc_declare): Likewise.
125         (gfc_resolve_oacc_directive): Likewise.
126         * trans-openmp.c (gfc_trans_omp_clauses): Remove
127         OMP_LIST_OACC_COPYIN, OMP_LIST_COPYOUT, OMP_LIST_CREATE,
128         OMP_LIST_DELETE, OMP_LIST_PRESENT, OMP_LIST_PRESENT_OR_COPY,
129         OMP_LIST_PRESENT_OR_COPYIN, OMP_LIST_PRESENT_OR_COPYOUT,
130         OMP_LIST_PRESENT_OR_CREATE switch items. Handle
131         OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO,
132         OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT
133         clause memory mappings.
135 2014-07-08  Cesar Philippidis  <cesar@codesourcery.com>
137         * gcc/fortran/scanner.c (gfc_next_char_literal): Fix the scan for
138         *$acc.
140 2014-07-03  Cesar Philippidis  <cesar@codesourcery.com>
142         * scanner.c (skip_fixed_comments): Reset openacc_flag
143         if an openacc directive wasn't found.
145 2014-06-13  Ilmir Usmanov  <i.usmanov@samsung.com>
146             Cesar Philippidis  <cesar@codesourcery.com>
148         * trans-openmp.c (gfc_trans_oacc_combined_directive): Move under
149         gfc_trans_omp_do.
150         (gfc_trans_omp_do, gfc_trans_oacc_directive): Handle EXEC_OACC_LOOP.
152 2014-04-05  Tobias Burnus  <burnus@net-b.de>
154         PR fortran/60283
155         * parse.c (decode_oacc_directive): Use gfc_unset_implicit_pure.
157 2014-03-18  Thomas Schwinge  <thomas@codesourcery.com>
159         * f95-lang.c (DEF_FUNCTION_TYPE_10): Define.
160         * types.def
161         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT): New type.
163 2014-03-13  Ilmir Usmanov  <i.usmanov@samsung.com>
165         OpenACC 1.0 support.
167         * dump-parse-tree.c
168         (show_omp_node): Dump also OpenACC executable statements.
169         (show_code_node): Call it.
170         (show_namespace): Dump !$ACC DECLARE directive.
171         * gfortran.h
172         (ST_OACC_PARALLEL_LOOP, ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL,
173         ST_OACC_END_PARALLEL, ST_OACC_KERNELS, ST_OACC_END_KERNELS,
174         ST_OACC_DATA, ST_OACC_END_DATA, ST_OACC_HOST_DATA,
175         ST_OACC_END_HOST_DATA, ST_OACC_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
176         ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
177         ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA,
178         ST_OACC_EXIT_DATA, ST_OACC_END_LOOP): New statements.
179         (gfc_expr_list): New structure to hold list of expressions.
180         (OMP_LIST_COPY, OMP_LIST_DATA_CLAUSE_FIRST,
181         OMP_LIST_OACC_COPYIN, OMP_LIST_COPYOUT, OMP_LIST_CREATE, OMP_LIST_DELETE,
182         OMP_LIST_PRESENT, OMP_LIST_PRESENT_OR_COPY,
183         OMP_LIST_PRESENT_OR_COPYIN, OMP_LIST_PRESENT_OR_COPYOUT,
184         OMP_LIST_PRESENT_OR_CREATE, OMP_LIST_DEVICEPTR,
185         OMP_LIST_DATA_CLAUSE_LAST, OMP_LIST_USE_DEVICE,
186         OMP_LIST_DEVICE_RESIDENT, OMP_LIST_HOST, OMP_LIST_DEVICE,
187         OMP_LIST_CACHE): New types of list, allowed in clauses.
188         (gfc_omp_clauses): Add OpenACC clauses.
189         (gfc_namespace): Add OpenACC declare directive clauses.
190         (EXEC_OACC_KERNELS_LOOP, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
191         EXEC_OACC_KERNELS, EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
192         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
193         EXEC_OACC_EXIT_DATA): New executable statements.
194         (gfc_free_expr_list): New function declaration.
195         (gfc_resolve_oacc_directive): Likewise.
196         (gfc_resolve_oacc_parallel_loop_blocks): Likewise.
197         (gfc_resolve_oacc_blocks): Likewise.
198         * match.c (match_exit_cycle): Add support of OpenACC regions and loops.
199         * match.h (gfc_match_oacc_cache): New function declaration.
200         (gfc_match_oacc_wait, gfc_match_oacc_update): Likewise.
201         (gfc_match_oacc_declare, gfc_match_oacc_loop): Likewise.
202         (gfc_match_oacc_host_data, gfc_match_oacc_data): Likewise.
203         (gfc_match_oacc_kernels, gfc_match_oacc_kernels_loop): Likewise.
204         (gfc_match_oacc_parallel, gfc_match_oacc_parallel_loop): Likewise.
205         (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data): Likewise.
206         * parse.c (decode_oacc_directive): New function.
207         (verify_token_free, verify_token_fixed): New helper functions.
208         (next_free, next_fixed): Decode !$ACC sentinel.
209         (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT, ST_OACC_CACHE,
210         ST_OACC_ENTER_DATA and ST_OACC_EXIT_DATA directives.
211         (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
212         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP and
213         ST_OACC_KERNELS_LOOP directives.
214         (push_state): Initialize OpenACC declare clauses.
215         (gfc_ascii_statement): Dump names of OpenACC directives.
216         (verify_st_order): Verify OpenACC declare directive as declarative.
217         (parse_spec): Push clauses to state stack when declare directive is
218         parsed.
219         (parse_oacc_structured_block, parse_oacc_loop): New functions.
220         (parse_executable): Call them.
221         (parse_progunit): Move declare clauses from state stack to namespace.
222         * parse.h (gfc_state_data): Add declare directive's clauses.
223         * resolve.c (gfc_resolve_blocks): Resolve OpenACC directives.
224         (resolve_code): Likewise.
225         * scanner.c (openacc_flag, openacc_locus): New static variables.
226         (skip_oacc_attribute, skip_omp_attribute): New helper functions.
227         (skip_free_comments, skip_fixed_comments): Don't skip !$ACC sentinel.
228         (gfc_next_char_literal): Support OpenACC directives.
229         * st.c (gfc_free_statement): Free also OpenACC directives. 
230         * openmp.c
231         (gfc_free_omp_clauses): Remove also OpenACC clauses.
232         (gfc_free_expr_list): New function to clear expression list.
233         (match_oacc_expr_list): New function to match expression list.
234         (match_oacc_clause_gang): New function to match OpenACC 2.0 gang clauses.
235         (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS,
236         OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH,
237         OMP_CLAUSE_COPY, OMP_CLAUSE_OACC_COPYIN,
238         OMP_CLAUSE_COPYOUT, OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT,
239         OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN,
240         OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE,
241         OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER,
242         OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT,
243         OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_HOST, OMP_CLAUSE_DEVICE_RESIDENT,
244         OMP_CLAUSE_DEVICE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_WAIT,
245         OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New clauses.
246         (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
247         OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES,
248         OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
249         OACC_UPDATE_CLAUSES, OACC_ENTER_DATA_CLAUSES,
250         OACC_EXIT_DATA_CLAUSES): New defines.
251         (gfc_match_oacc_parallel_loop, gfc_match_oacc_parallel,
252         gfc_match_oacc_kernels_loop, gfc_match_oacc_kernels,
253         gfc_match_oacc_data, gfc_match_oacc_host_data, gfc_match_oacc_loop,
254         gfc_match_oacc_declare, gfc_match_oacc_update,
255         gfc_match_oacc_enter_data, gfc_match_oacc_exit_data,
256         gfc_match_oacc_wait, gfc_match_oacc_cache, oacc_is_loop,
257         check_symbol_not_pointer, resolve_oacc_scalar_int_expr,
258         resolve_oacc_positive_int_expr, check_array_not_assumed,
259         resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause,
260         oacc_is_parallel, oacc_is_kernels, omp_code_to_statement,
261         oacc_code_to_statement, resolve_oacc_directive_inside_omp_region,
262         resolve_omp_directive_inside_oacc_region, resolve_oacc_nested_loops,
263         resolve_oacc_params_in_parallel, resolve_oacc_loop_blocks,
264         gfc_resolve_oacc_blocks, resolve_oacc_loop, resolve_oacc_cache,
265         resolve_oacc_wait, gfc_resolve_oacc_declare,
266         gfc_resolve_oacc_directive): New functions.
267         (resolve_omp_clauses): Resolve also OpenACC clauses.
268         (gfc_resolve_omp_directive): Check for enclosing OpenACC region. 
269         * trans-decl.c
270         (gfc_generate_function_code): Insert OACC_DECLARE GENERIC node.
271         * trans-openmp.c (gfc_convert_expr_to_tree): New helper function.
272         (gfc_trans_omp_array_reduction): Support also OpenACC. Add parameter.
273         (gfc_trans_omp_reduction_list): Update.
274         (gfc_trans_oacc_construct): New transform function.
275         (gfc_trans_omp_map_clause_list): Likewise.
276         (gfc_trans_oacc_executable_directive): Likewise.
277         (gfc_trans_oacc_combined_directive, gfc_trans_oacc_declare): Likewise.
278         (gfc_trans_oacc_directive): Use them.
279         (gfc_trans_oacc_loop): Stub.
280         (gfc_trans_omp_clauses): Transform OpenACC clauses.
281         * trans-stmt.h  (gfc_trans_oacc_directive): New function prototype.
282         (gfc_trans_oacc_declare): Likewise.
283         * trans.c (trans_code): Transform also OpenACC directives. 
285 2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>
287         * f95-lang.c (DEF_GOACC_BUILTIN): New macro.
288         Include "../oacc-builtins.def".
290         * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
292         * lang.opt (fopenacc): New option.
293         * invoke.texi (-fopenacc): Document it.
294         * gfortran.h (gfc_option_t): New member.
295         * options.c (gfc_init_options, gfc_handle_option): Handle it.
297 2013-09-26  Jakub Jelinek  <jakub@redhat.com>
299         * types.def
300         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
301         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
303 2013-09-19  Jakub Jelinek  <jakub@redhat.com>
305         * types.def (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR): Remove.
306         (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR): New.
308 2013-09-18  Jakub Jelinek  <jakub@redhat.com>
310         * trans-openmp.c (gfc_omp_clause_default_ctor,
311         gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION.
313 2013-09-05  Jakub Jelinek  <jakub@redhat.com>
315         * types.def (BT_FN_VOID_UINT_UINT, BT_FN_VOID_INT_SIZE_PTR_PTR_PTR,
316         BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR): New.
318 2013-07-09  Jakub Jelinek  <jakub@redhat.com>
320         * types.def (BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL): New.
322 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
324         * f95-lang.c (DEF_FUNCTION_TYPE_8): Define.
325         * types.def (DEF_FUNCTION_TYPE_8): Document.
326         (BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
327         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): Remove.
328         (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
329         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
330         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT): New.
332 2013-03-27  Jakub Jelinek  <jakub@redhat.com>
334         * f95-lang.c (ATTR_NULL): Define.
336 Copyright (C) 2013-2014 Free Software Foundation, Inc.
338 Copying and distribution of this file, with or without modification,
339 are permitted in any medium without royalty provided the copyright
340 notice and this notice are preserved.