Make expand_omp_for_static_chunk usable for OpenACC.
[official-gcc.git] / gcc / ChangeLog.gomp
blobf8a9d74e5ceaf4e015ed2847b32438667da0ff14
1 2014-07-24  Thomas Schwinge  <thomas@codesourcery.com>
3         * omp-low.c (expand_omp_for_static_chunk): Merge changes
4         previously applied to expand_omp_for_static_nochunk.
6 2014-07-14  Cesar Philippidis  <cesar@codesourcery.com>
8         * omp-low.c (extract_omp_for_data): Likewise.
9         (expand_omp_for_static_nochunk): Likewise.
11 2014-07-14  Cesar Philippidis  <cesar@codesourcery.com>
13         * omp-low.c (process_reduction_data): Check for new
14         binding level and skip for-loops which don't have a
15         reduction clause.
17 2014-07-08  Cesar Philippidis  <cesar@codesourcery.com>
18             Thomas Schwinge  <thomas@codesourcery.com>
20         * omp-low.c (omp_get_id): New function.
21         (lookup_reduction): New function.
22         (maybe_lookup_reduction): New function.
23         (build_outer_var_ref): Remove openacc assert.
24         (new_omp_context): Preserve ctx->reduction_map.
25         (scan_sharing_clauses): Handle OMP_CLAUSE_REDUCTION.
26         (scan_oacc_offload): Initialize ctx->reduction_map.
27         (lower_reduction_clauses): Handle OpenACC reductions.
28         (omp_gimple_assign_with_ops): New function.
29         (initialize_reduction_data): New function.
30         (finalize_reduction_data): New function.
31         (process_reduction_data): New function.
32         (lower_oacc_offload): Handle reductions.
33         * gcc/omp-builtins.def (BUILT_IN_OMP_SET_NUM_THREADS): New.
35 2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
36             Ilmir Usmanov  <i.usmanov@samsung.com>
38         * tree-pretty-print.c (dump_omp_clause): Instead of
39         OMP_CLAUSE_DECL, use more specific accessors for some clauses.
41 2014-06-13  Thomas Schwinge  <thomas@codesourcery.com>
42             Cesar Philippidis  <cesar@codesourcery.com>
44         * omp-low.c (extract_omp_for_data, scan_sharing_clauses): For
45         OpenACC directives, the collapse(1) clause is supported.
47 2014-06-13  Cesar Philippidis  <cesar@codesourcery.com>
49         * omp-low.c (scan_sharing_clauses): Preliminary support for
50         OMP_CLAUSE_PRIVATE for OpenACC.
52         * omp-low.c (scan_sharing_clauses): For clauses currently not
53         supported with OpenACC directives, emit a sorry message instead of
54         aborting.
56 2014-06-12  Thomas Schwinge  <thomas@codesourcery.com>
57             James Norris  <jnorris@codesourcery.com>
59         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_IF.
60         (expand_oacc_offload, expand_omp_target): Handle it.
62 2014-06-06  Thomas Schwinge  <thomas@codesourcery.com>
63             James Norris  <jnorris@codesourcery.com>
65         * gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_UPDATE, and
66         extend mask size, GF_OMP_TARGET_KIND_MASK.
67         (is_gimple_omp_oacc_specifically): Handle
68         GF_OMP_TARGET_KIND_OACC_UPDATE.
69         * gimplify.c (gimplify_omp_target_update, gimplify_expr):
70         Likewise.
71         * gimple-pretty-print.c (dump_gimple_omp_target): Likewise.
72         * omp-low.c (scan_omp_target, expand_omp_target)
73         (build_omp_regions_1, lower_omp_target, lower_omp_1)
74         (make_gimple_omp_edges): Likewise.
75         * oacc-builtins.def (BUILT_IN_GOACC_UPDATE): New builtin.
77 2014-06-05  Thomas Schwinge  <thomas@codesourcery.com>
79         * gimplify.c (gimplify_scan_omp_clauses)
80         (gimplify_adjust_omp_clauses): Handle
81         OMP_CLAUSE_MAP_FORCE_DEVICEPTR.
82         * omp-low.c (scan_sharing_clauses, lower_oacc_offload)
83         (lower_omp_target): Likewise.
84         * tree-core.h (enum omp_clause_map_kind)
85         <OMP_CLAUSE_MAP_FORCE_DEVICEPTR>: Update comment.
87         * gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP>:
88         Don't block OMP_CLAUSE_MAP_FORCE_PRESENT.
90 2014-06-04  Thomas Schwinge  <thomas@codesourcery.com>
92         * cgraphunit.c (ipa_passes, compile): Handle flag_openacc next to
93         flag_openmp.
94         * ipa-inline-analysis.c (inline_generate_summary): Likewise.
95         * lto-streamer.c (lto_streamer_init, gate_lto_out): Likewise.
96         * passes.c (ipa_write_summaries): Likewise.
98 2014-05-12  Bernd Schmidt  <bernds@codesourcery.com>
100         * lto-wrapper.c (ompbegin): New static variable.
101         (find_ompbeginend): Renamed from find_ompend.  Also look for
102         crtompbegin.o.
103         (run_gcc): Also use ompbegin.
105 2014-05-08  Thomas Schwinge  <thomas@codesourcery.com>
107         * omp-low.c (get_offload_symbol_decl): Mark __OPENMP_TARGET__ as
108         addressable.
110 2014-04-04  Bernd Schmidt  <bernds@codesourcery.com>
112         * lto-wrapper.c (replace_special_characters): Remove functions and
113         all calls to it.
115         * lto-section-names.h (OFFLOAD_VAR_TABLE_SECTION_NAME,
116         OFFLOAD_FUNC_TABLE_SECTION_NAME): Define.
117         * lto-wrapper.c (OFFLOAD_FUNC_TABLE_SECTION_NAME): Don't define.
118         (ompend): New static variable.
119         (copy_file, find_ompend): New static functions.
120         (run_gcc): Call find_ompend if we have offload images.  Add its
121         return value to the output.
122         * omp-low.c: Include "lto-section-names.h".
123         (omp_finish_file): Initialize section names from macros defined there.
125         * omp-low.c (offload_symbol_decl): New static variable.
126         (get_offload_symbol_decl): New static function.
127         (expand_oacc_offload, expand_omp_target): Use it.
129 2014-04-02  Thomas Schwinge  <thomas@codesourcery.com>
131         * omp-low.c (omp_finish_file): Use num_vars instead of num_funcs
132         when recording offload symbols v_vars.
134         * omp-low.c (expand_oacc_offload): Handle __OPENMP_TARGET__
135         symbol.
137 2014-03-20  Bernd Schmidt  <bernds@codesourcery.com>
139         Mostly by Michael Zolotukhin:
140         * lto-wrapper.c (OFFLOAD_FUNC_TABLE_SECTION_NAME,
141         OFFLOAD_TARGET_NAMES_ENV): New defines.
142         (offload_names): New static variable.
143         (free_array_of_ptrs, parse_env_var, access_check,
144         prepare_target_image, replace_special_characters,
145         compile_images_for_openmp_targets): New static functions.
146         (run_gcc): Determine whether offload sections are present.  If so,
147         run compile_images_for_openmp_targets and print the image names.
149         * Makefile.in (COLLECT2_OBJS): Add collect-utils.o.
150         (LTO_WRAPPER_OBJS): New variable.
151         (lto-wrapper$(exeext)): Use it.
152         * collect2.c: Include "collect-utils.h".
153         (vflag, debug): Remove variables.  Rename all uses of vflag to
154         verbose.
155         (at_file_supplied): No longer static.
156         (tool_name): New variable.
157         (do_wait, fork_execute, maybe_unlink): Don't declare.
158         (tool_cleanup): Renamed from collect_atexit.  New arg from_signal.
159         (collect_atexit): New static function.
160         (notice): Remove function.
161         (handler): Just call tool_cleanup.
162         (maybe_run_lto_and_relink, main, do_dsymutil): Add new arg to
163         fork_execute calls.
164         (collect_wait, do_wait, collect_execute): Remove functions.
165         (maybe_unlink): No longer static.
166         * collect2.h (vflag, debug): Don't declare.
167         (at_file_supplied): Declare.
168         * collect-utils.c (utils_cleanup): New arg from_signal.  All callers
169         changed.
170         (collect_execute): Replace with implementation from collect2, plus a
171         new arg use_atfile.  All callers changed.
172         (collect_wait): Replace with implementation from collect2.
173         (maybe_unlink_file): Remove function.
174         (fork_execute): Replace with implementation from collect2, plus a
175         new arg use_atfile.  All callers changed.
176         (do_wait): Add call to utils_cleanup to the error path.
177         * collect-utils.h (collect_execute, fork_execute, utils_cleanup,
178         tool_cleanup): Adjust declarations.
179         * lto-wrapper.c (tool_cleanup): Add unused bool argument.
180         * tlink.c: Include "collect-utils.h".
181         (tlink_execute): New arg use_atfile.  All callers changed.
182         (tlink_init, tlink_execute): Remove declarations.
184         * Makefile.in (ALL_HOST_BACKEND_OBJS): Add collect-utils.o.
185         (lto-wrapper$(exeext)): Link with collect-utils.o.
186         * collect-utils.c: New file.
187         * collect-utils.h: New file.
188         * lto-wrapper.c: Include "collect-utils.h".
189         (args_name): Delete variable.
190         (tool_name): New variable.
191         (tool_cleanup): New function.
192         (maybe_unlink): Renamed from maybe_unlink_file.  All callers changed.
193         (lto_wrapper_cleanup, fatal_signal, fatal, fatal_perror,
194         collect_execute, collect_wait, fork_execute): Remove functions.
196         Mostly by Michael Zolotukhin:
197         * omp-low.c: Include "common/common-target.h".
198         (expand_omp_target): Pass in address of __OPENMP_TARGET__.
199         (add_decls_addresses_to_decl_constructor, omp_finish_file): New
200         functions.
201         * omp-low.h (omp_finish_file): Declare.
202         * toplev.c: Include "omp-low.h".
203         (compile_file): Call omp_finish_file.
204         * target.def (record_offload_symbol): New hook.
205         * doc/tm.texi.in (TARGET_RECORD_OFFLOAD_SYMBOL): Add.
206         * doc/tm.texi: Regenerate.
207         * configure.ac (ENABLE_OFFLOADING): Define if we have offload_targets.
208         * configure: Regenerate.
209         * config.in: Regenerate.
211         * config/darwin.c: Include "lto-section-names.h".
212         (LTO_SEGMENT_NAME): Don't define.
213         * config/i386/winnt.c: Include "lto-section-names.h".
214         * lto-streamer.c: Include "lto-section-names.h".
215         * lto-streamer.h (LTO_SECTION_NAME_PREFIX, OMP_SECTION_NAME_PREFIX):
216         Don't define.
217         (section_name_prefix): Don't declare.
218         * lto-wrapper.c: Include "lto-section-names.h".
219         (LTO_SECTION_NAME_PREFIX): Don't define.
220         * lto-section-names.h: New file.
221         * cgraphunit.c: Include "lto-section-names.h".
223         * configure.ac (real_target_noncanonical, tool_prefix,
224         accel_dir_suffix, offload_targets): Compute new variables.
225         (--enable-as-accelerator-for, --enable-as-accelerator,
226         --enable-offload-targets): New options.
227         * configure: Regenerate.
228         * config.in: Regenerate.
229         * Makefile.in (real_target_noncanonical, tool_prefix,
230         accel_dir_suffix, enable_as_accelerator): New variables substituted
231         by configure.
232         (libsubdir, libexecsubdir, GCC_TARGET_INSTALL_NAME): Tweak for the
233         possibility of being configured as an offload compiler.
234         (install_driver): Likewise.
235         (DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and
236         ACCEL_DIR_SUFFIX.
237         * gcc.c (spec_host_machine, accel_dir_suffix): New variables.
238         (process_command): Tweak path construction for the possibility
239         of being configured as an offload compiler.
240         (main): Likewise. Look up specs in just_machine_suffix only if not
241         ACCEL_COMPILER.  Construct OFFLOAD_TARGET_NAMES environment variable
242         if we have OFFLOAD_TARGETS.
244 2014-03-20  Thomas Schwinge  <thomas@codesourcery.com>
246         * gimple.h (enum gf_mask): Add GF_OMP_FOR_KIND_OACC_LOOP.
247         (is_gimple_omp_oacc_specifically): Handle it.
248         * gimple-pretty-print.c (dump_gimple_omp_for): Likewise.
249         * gimple.def (GIMPLE_OMP_FOR): Update for OpenACC loop.
250         * gimple.c (gimple_build_omp_for): Don't explicitly mention some
251         clauses.
252         (gimple_copy) <GIMPLE_OMP_FOR>: Handle GF_OMP_FOR_KIND_OACC_LOOP.
253         * omp-low.c (extract_omp_for_data, scan_sharing_clauses)
254         (check_omp_nesting_restrictions, lower_rec_input_clauses)
255         (lower_lastprivate_clauses, lower_reduction_clauses)
256         (expand_omp_for_generic, expand_omp_for_static_nochunk)
257         (expand_omp_for_static_chunk, maybe_add_implicit_barrier_cancel)
258         (lower_omp_for): Likewise.
259         * tree-inline.c (remap_gimple_stmt): Likewise.
260         * tree-nested.c (walk_gimple_omp_for)
261         (convert_nonlocal_reference_stmt, convert_local_reference_stmt)
262         (convert_gimple_call): Likewise.
263         * doc/gimple.texi (GIMPLE_OMP_FOR): Don't explicitly mention some
264         clauses.
265         * gimplify.c (gimplify_omp_for, gimplify_expr): Handle OACC_LOOP.
267         * tree.def (OACC_LOOP): Sort after OMP_DISTRIBUTE.
268         * tree.h (OMP_LOOP_CHECK): Update accordingly.
269         * gimplify.c (is_gimple_stmt): Sort OACC_LOOP after
270         OMP_DISTRIBUTE.
271         * tree-pretty-print.c (dump_generic_node): Likewise.
272         * doc/generic.texi (OACC_LOOP): Sort after OACC_HOST_DATA.
273         (OMP_FOR): Fix and extend for OACC_LOOP.
275         * gimple.h (enum gf_mask): Add and use GF_OMP_FOR_SIMD.
276         * omp-low.c: Update accordingly.
278         * gimple.h (enum gf_mask): Rewrite "<< 0" shift expressions used
279         for GF_OMP_FOR_KIND_MASK, GF_OMP_FOR_KIND_FOR,
280         GF_OMP_FOR_KIND_DISTRIBUTE, GF_OMP_FOR_KIND_SIMD,
281         GF_OMP_FOR_KIND_CILKSIMD, GF_OMP_TARGET_KIND_MASK,
282         GF_OMP_TARGET_KIND_REGION, GF_OMP_TARGET_KIND_DATA,
283         GF_OMP_TARGET_KIND_UPDATE, GF_OMP_TARGET_KIND_OACC_DATA.
285         * omp-low.c (check_omp_nesting_restrictions): Allow nesting of
286         OpenACC constructs inside of OpenACC data constructs.
288 2014-03-18  Ilmir Usmanov  <i.usmanov@samsung.com>
290         * tree.def (OACC_LOOP): New tree code.
291         * tree-pretty-print.c (dump_generic_node): Show it.
292         * tree.h (OACC_KERNELS_COMBINED, OACC_PARALLEL_COMBINED): New macros.
293         * doc/generic.texi: Document loop directive.
294         * gimplify.c (is_gimple_stmt, gimplify_expr): Stub gimplification of 
295         loop directive and combined directives.
297 2014-03-18  Thomas Schwinge  <thomas@codesourcery.com>
299         * builtin-types.def
300         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT): New type.
301         * oacc-builtins.def (BUILT_IN_GOACC_KERNELS)
302         (BUILT_IN_GOACC_PARALLEL): Switch to that one.
303         * gimplify.c (gimplify_scan_omp_clauses)
304         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NUM_GANGS,
305         OMP_CLAUSE_NUM_WORKERS, OMP_CLAUSE_VECTOR_LENGTH.
306         * omp-low.c (scan_sharing_clauses, expand_oacc_offload): Likewise.
308 2014-03-13  Thomas Schwinge  <thomas@codesourcery.com>
310         * tree.h (OMP_CLAUSE_VECTOR_EXPR): Check for OMP_CLAUSE_VECTOR
311         instead of OMP_CLAUSE_VECTOR_LENGTH.
312         (OMP_WAIT_EXPR): Rename to OMP_CLAUSE_WAIT_EXPR.  Change
313         all users.
315 2014-03-13  Thomas Schwinge  <thomas@codesourcery.com>
317         * omp-low.c (create_omp_child_function): Use
318         is_gimple_omp_offloaded when looking for offloaded regions.
320 2014-03-12  Thomas Schwinge  <thomas@codesourcery.com>
322         * omp-low.c (scan_sharing_clauses): Move offloaded logic into...
323         * gimple.h (is_gimple_omp_offloaded): ... this new static inline
324         function.
326 2014-02-28  Thomas Schwinge  <thomas@codesourcery.com>
328         * gimple.def (GIMPLE_OACC_KERNELS): New code.
329         * doc/gimple.texi: Document it.
330         * gimple.h (gimple_has_substatements, CASE_GIMPLE_OMP)
331         (is_gimple_omp_oacc_specifically): Handle it.
332         (gimple_statement_oacc_kernels): New struct.
333         (gimple_build_oacc_kernels): New prototype.
334         (gimple_oacc_kernels_clauses, gimple_oacc_kernels_clauses_ptr)
335         (gimple_oacc_kernels_set_clauses, gimple_oacc_kernels_child_fn)
336         (gimple_oacc_kernels_child_fn_ptr)
337         (gimple_oacc_kernels_set_child_fn, gimple_oacc_kernels_data_arg)
338         (gimple_oacc_kernels_data_arg_ptr)
339         (gimple_oacc_kernels_set_data_arg): New inline functions.
340         * gimple.c (gimple_build_oacc_kernels): New function.
341         (gimple_copy): Handle GIMPLE_OACC_KERNELS.
342         * gimple-low.c (lower_stmt): Likewise.
343         * gimple-walk.c (walk_gimple_op, walk_gimple_stmt): Likewise.
344         * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
345         (dump_gimple_oacc_parallel): Rename to dump_gimple_oacc_offload.
346         Also handle GIMPLE_OACC_KERNELS.  Update all callers.
347         * gimplify.c (gimplify_omp_workshare, gimplify_expr): Handle
348         OACC_KERNELS.
349         * oacc-builtins.def (BUILT_IN_GOACC_KERNELS): New builtin.
350         * omp-low.c (scan_oacc_parallel, expand_oacc_parallel)
351         (lower_oacc_parallel): Rename to scan_oacc_offload,
352         expand_oacc_offload, and lower_oacc_offload.  Also handle
353         GIMPLE_OACC_KERNELS.  Update all callers.
354         (scan_sharing_clauses, scan_omp_1_stmt, expand_omp, lower_omp_1)
355         (diagnose_sb_0, diagnose_sb_1, diagnose_sb_2)
356         (make_gimple_omp_edges): Handle GIMPLE_OACC_KERNELS.
357         * tree-inline.c (remap_gimple_stmt, estimate_num_insns): Likewise.
358         * tree-nested.c (convert_nonlocal_reference_stmt)
359         (convert_local_reference_stmt, convert_tramp_reference_stmt)
360         (convert_gimple_call): Likewise.
362 2014-02-27  Thomas Schwinge  <thomas@codesourcery.com>
364         * gimplify.c (gimplify_oacc_parallel): Merge into
365         gimplify_omp_workshare.  Update all callers.
367 2014-02-27  Ilmir Usmanov  <i.usmanov@samsung.com>
369         Fix OpenACC ASYNC clause: it cannot contain integer-expression-list.
371         gcc/
372         * tree.h (OMP_CLAUSE_ASYNC_EXPR): Reorder.
373         * tree.c (omp_clause_num_ops, omp_clause_code_name): Reorder clauses.
374         * tree-core.h (enum omp_clause_code): Likewise.
375         * omp-low.c (scan_sharing_clauses): Likewise.
376         * gimplify.c (gimplify_scan_omp_clauses): Likewise.
378 2014-02-21  Thomas Schwinge  <thomas@codesourcery.com>
380         * gimple.h (enum gf_mask): Add GF_OMP_TARGET_KIND_OACC_DATA.
381         (is_gimple_omp_oacc_specifically): Handle it.
382         * gimple-pretty-print.c (dump_gimple_omp_target): Likewise.
383         * gimplify.c (gimplify_omp_workshare, gimplify_expr): Likewise.
384         * omp-low.c (scan_sharing_clauses, scan_omp_target)
385         (expand_omp_target, lower_omp_target, lower_omp_1): Likewise.
386         * gimple.def (GIMPLE_OMP_TARGET): Update comment.
387         * gimple.c (gimple_build_omp_target): Likewise.
388         (gimple_copy): Catch unimplemented case.
389         * tree-inline.c (remap_gimple_stmt): Likewise.
390         * tree-nested.c (convert_nonlocal_reference_stmt)
391         (convert_local_reference_stmt, convert_gimple_call): Likewise.
392         * oacc-builtins.def (BUILT_IN_GOACC_DATA_START)
393         (BUILT_IN_GOACC_DATA_END): New builtins.
395         * omp-low.c (scan_sharing_clauses): Catch unexpected occurrences
396         of OMP_CLAUSE_TO, OMP_CLAUSE_FROM, OMP_CLAUSE_MAP.
398         * gimplify.c (enum omp_region_type): Make ORT_TARGET_OFFLOAD a
399         flag for ORT_TARGET, in its negation replacing ORT_TARGET_DATA.
400         Update all users.
402         * omp-low.c (gimple_code_is_oacc): Move to...
403         * gimple.h (is_gimple_omp_oacc_specifically): ... here.  Update
404         users, and also use it in more places where currently we've only
405         been checking for GIMPLE_OACC_PARALLEL.
407 2014-02-18  Thomas Schwinge  <thomas@codesourcery.com>
409         * omp-low.c (diagnose_sb_0, diagnose_sb_1, diagnose_sb_2): Handle
410         GIMPLE_OACC_PARALLEL.
411         * gimplify.c (gimplify_case_label_expr): Update comment.
413         * omp-low.c (diagnose_sb_0): Generalize detection which kind of
414         structured block we're in.
416 2014-02-17  Thomas Schwinge  <thomas@codesourcery.com>
418         * tree-core.h (omp_clause_code) <map>: Mention pcopy, pcopyin,
419         pcopyout, pcreate OpenACC clauses.
421 2014-02-14  Ilmir Usmanov  <i.usmanov@samsung.com>
422             Dmitry Bocharnikov  <dmitry.b@samsung.com>
423             Evgeny Gavrin  <e.gavrin@samsung.com>
425         Add OpenACC 1.0 support to GENERIC, except loop directive and subarrays.
427         gcc/
428         * gimplify.c (is_gimple_stmt, gimplify_scan_omp_clauses,
429         implify_adjust_omp_clauses, gimplify_expr): Stub OpenACC directives
430         and clauses.
431         * omp-low.c (scan_sharing_clauses): Likewise.
432         (gimple_code_is_oacc): New helper function.
433         (scan_sharing_clauses): Use it.
434         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_HOST,
435         OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT,
436         OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_GANG, OMP_CLAUSE_WAIT,
437         OMP_NO_CLAUSE_CACHE, OMP_CLAUSE_INDEPENDENT, OMP_CLAUSE_ASYNC,
438         OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, OMP_CLAUSE_NUM_GANGS,
439         OMP_CLAUSE_NUM_WORKERS and OMP_CLAUSE_VECTOR_LENGTH clauses.
440         * tree-pretty-print.c (dump_omp_clause): Print OpenACC clause.
441         (dump_generic_node): Print OpenACC directives and its clauses.
442         * tree.c (omp_clause_num_ops, omp_clause_code_name,
443         walk_tree_1): Add OpenACC clauses.
444         * tree.def (OACC_KERNELS, OACC_DATA, OACC_HOST_DATA, OACC_DECLARE,
445         OACC_UPDATE, OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_WAIT,
446         OACC_CACHE): New tree node.
447         * tree.h (OACC_KERNELS_BODY, OACC_KERNELS_CLAUSES,
448         OACC_CLAUSE_NUM_GANGS_EXPR, OMP_CLAUSE_NUM_WORKERS_EXPR,
449         OMP_CLAUSE_VECTOR_LENGTH_EXPR, OMP_CLAUSE_VECTOR_EXPR,
450         OMP_CLAUSE_WORKER_EXPR, OMP_CLAUSE_GANG_EXPR, OMP_CLAUSE_ASYNC_EXPR,
451         OMP_WAIT_EXPR, OACC_DATA_BODY, OACC_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
452         OACC_UPDATE_CLAUSES, OACC_WAIT_CLAUSES, OACC_CACHE_CLAUSES,
453         OACC_HOST_DATA_BODY, OACC_HOST_DATA_CLAUSES): New macros.
454         gcc/doc/
455         * generic.texi: Document OACC_KERNELS, OACC_DATA, OACC_HOST_DATA,
456         OACC_DECLARE, OACC_UPDATE, OACC_ENTER_DATA, OACC_EXIT_DATA, OACC_WAIT,
457         OACC_CACHE.
459 2014-02-07  Ilya Tocar  <ilya.tocar@intel.com>
461         * ipa-inline-analysis.c (inline_free_summary): Always remove
462         hooks.
464 2014-01-28  Thomas Schwinge  <thomas@codesourcery.com>
466         * tree-core.h (omp_clause_code): Update description for
467         OMP_CLAUSE_MAP.
469         * tree-core.h (omp_clause_map_kind): Add OMP_CLAUSE_MAP_FORCE,
470         OMP_CLAUSE_MAP_FORCE_ALLOC, OMP_CLAUSE_MAP_FORCE_TO,
471         OMP_CLAUSE_MAP_FORCE_FROM, OMP_CLAUSE_MAP_FORCE_TOFROM,
472         OMP_CLAUSE_MAP_FORCE_PRESENT, OMP_CLAUSE_MAP_FORCE_DEALLOC, and
473         OMP_CLAUSE_MAP_FORCE_DEVICEPTR.
474         * tree-pretty-print.c (dump_omp_clause): Handle these.
475         * gimplify.c (gimplify_omp_var_data): Add GOVD_MAP_FORCE.
476         (omp_region_type): Add ORT_TARGET_MAP_FORCE.
477         (omp_add_variable, omp_notice_threadprivate_variable)
478         (omp_notice_variable, gimplify_scan_omp_clauses)
479         (gimplify_adjust_omp_clauses_1): Extend accordingly.
480         (gimplify_oacc_parallel): Add ORT_TARGET_MAP_FORCE to ORT_TARGET
481         usage.
482         * omp-low.c (install_var_field, scan_sharing_clauses)
483         (lower_oacc_parallel, lower_omp_target): Extend accordingly.
485         * tree-core.h (omp_clause_map_kind): Make the identifiers' bit
486         patterns more obvious.  Add comments.
487         * omp-low.c (lower_oacc_parallel, lower_omp_target): Test for
488         omp_clause_map_kind flags set instead of for values.
490         * gimplify.c (gimplify_call_expr, gimplify_modify_expr)
491         (omp_firstprivatize_variable, omp_notice_threadprivate_variable)
492         (omp_notice_variable, gimplify_adjust_omp_clauses)
493         (gimplify_omp_workshare): Treat ORT_TARGET as a flag, not as a
494         value.
496 2013-12-18  Thomas Schwinge  <thomas@codesourcery.com>
498         * omp-low.c (lower_oacc_parallel): Switch kinds array to unsigned
499         short, and shift alignment description to begin at bit 8.
501 2013-12-04  Thomas Schwinge  <thomas@codesourcery.com>
503         * gimple.h (is_a_helper): Handle GIMPLE_OACC_PARALLEL.
505 2013-11-30  Balaji V. Iyer  <balaji.v.iyer@intel.com>
507         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
508         Removed a carriage return from the warning string.
510 2013-11-21  Jakub Jelinek  <jakub@redhat.com>
512         * config/i386/i386.c (ix86_cilkplus_default_vecsize_mangle,
513         ix86_cilkplus_vecsize_for_mangle): Remove.
514         (ix86_simd_clone_compute_vecsize_and_simdlen,
515         ix86_simd_clone_adjust, ix86_simd_clone_usable): New functions.
516         (TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE,
517         TARGET_CILKPLUS_VECSIZE_FOR_MANGLE): Remove.
518         (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
519         TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Define.
520         * omp-low.c (class argno_map): Remove.
521         (argno_map::argno_map): Remove.
522         (simd_clone_vector_of_formal_parm_types): New function.
523         (simd_clone_struct_alloc): Use struct cgraph_simd_clone
524         instead of struct simd_clone and struct cgraph_simd_clone_arg
525         instead of struct simd_clone_arg.
526         (simd_clone_struct_copy): Likewise.
527         (simd_clone_clauses_extract): Likewise.  Return struct
528         cgraph_simd_clone *, don't change anything in node.
529         Use simd_clone_vector_of_formal_parm_types instead of argno_map.
530         Fail if ignoring linear step.
531         (vecsize_mangle): Remove.
532         (simd_clone_compute_base_data_type): Add clone_info argument.
533         Use simd_clone_vector_of_formal_parm_types instead of argno_map.
534         (simd_clone_compute_vecsize_and_simdlen): Remove.
535         (simd_clone_mangle): Remove new_node argument, add clone_info
536         argument, return the identifier rather than changing anything in
537         node.  If mangled name doesn't already exist among simd clones,
538         fail.
539         (simd_clone_create): Handle !old_node->definition case, don't
540         ICE if cgraph_function_versioning fails.
541         (simd_clone_adjust_return_type): Handle simdlens larger than
542         what can be returned or passed in hw register.  Handle
543         !node->definition.
544         (simd_clone_adjust_argument_types): Likewise.  Use
545         ipa_get_vector_of_formal_parms or
546         simd_clone_vector_of_formal_parm_types instead of argno_map.
547         (simd_clone_init_simd_arrays): Handle simdlens larger than
548         what can be passed in hw register.
549         (ipa_simd_modify_function_body): Likewise.  Call walk_gimple_op
550         also on GIMPLE_RETURN.
551         (simd_clone_adjust): Call targetm.simd_clone.adjust.  Create
552         PHI for the iter, rather than waiting for into ssa.  Handle
553         aligned clause on uniform pointer arguments.  Handle linear
554         arguments properly.
555         (expand_simd_clones): Don't do anything if noclone attribute
556         is present.  Ignore non-prototype C declarations.  Rewritten to
557         only clone if it is possible and desirable to create the simd clone.
558         Use new target simd_clone hooks to drive the process, allow
559         creating more than two clones.  Handle !node->definition cloning.
560         (ipa_omp_simd_clone): Use FOR_EACH_FUNCTION instead of
561         FOR_EACH_DEFINED_FUNCTION.
562         (pass_omp_simd_clone::gate): Return true also for flag_openmp_simd.
563         * ipa-cp.c (determine_versionability): Use simd_clones field instead
564         of has_simd_clones.  Also fail if node->simdclone is non-NULL.
565         (initialize_node_lattices): Set disable = true for simd clones.
566         * cgraph.c (get_simd_clone): Remove.
567         * ipa.c (symtab_remove_unreachable_nodes): If node with simd clones
568         is kept, keep also the simd clones.
569         * ipa-prop.h (ipa_get_vector_of_formal_parm_types): New prototype.
570         * ipa-prop.c (get_vector_of_formal_parm_types): Renamed to ...
571         (ipa_get_vector_of_formal_parm_types): ... this.  No longer static.
572         (ipa_modify_formal_parameters): Adjust caller.
573         * target.def (TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE,
574         TARGET_CILKPLUS_VECSIZE_FOR_MANGLE): Remove.
575         (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
576         TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): New target
577         hooks.
578         * tree-vect-data-refs.c (vect_analyze_data_refs): Use simd_clones
579         field instead of has_simd_clones.
580         * target.h (struct cgraph_node, struct cgraph_simd_node): Declare.
581         * doc/tm.texi.in (TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE,
582         TARGET_CILKPLUS_VECSIZE_FOR_MANGLE): Remove.
583         (TARGET_SIMD_CLONE_COMPUTE_VECSIZE_AND_SIMDLEN,
584         TARGET_SIMD_CLONE_ADJUST, TARGET_SIMD_CLONE_USABLE): Add.
585         * doc/tm.texi: Regenerated.
586         * cgraph.h (enum simd_clone_arg_type): Rename to ...
587         (enum cgraph_simd_clone_arg_type): ... this.  Add
588         SIMD_CLONE_ARG_TYPE_MASK.
589         (struct simd_clone_arg): Rename to ...
590         (struct cgraph_simd_clone_arg): ... this.  Add orig_type and
591         vector_type fields.  Adjust arg_type field's type.
592         (struct simd_clone): Rename to ...
593         (struct cgraph_simd_clone): ... this.  Remove hw_vector_size
594         field.  Add vecsize_int, vecsize_float, prev_clone, next_clone
595         and origin fields.  Adjust args field's type.
596         (struct cgraph_node): Adjust simdclone field's type.  Remove
597         simdclone_of and has_simd_clones fields.  Add simd_clones field.
598         (get_simd_clone): Remove prototype.
599         * tree-vect-stmts.c (vectorizable_simd_clone_call): Use simd_clones
600         field instead of has_simd_clones, improve walking of simd clones,
601         handle arguments and/or return types larger than corresponding
602         ISA hw vector size, use targetm.simd_clone.usable hook.
604 2013-11-21  Ilya Tocar  <ilya.tocar@intel.com>
606         * cgraph.h (symtab_node): Add need_dump.
607         * cgraphunit.c (ipa_passes): Run ipa_write_summaries for omp.
608         (compile): Intialize streamer for omp.
609         * ipa-inline-analysis.c (inline_generate_summary): Add flag_openmp.
610         * lto-cgraph.c (lto_set_symtab_encoder_in_partition): Respect
611         need_dump flag.
612         (select_what_to_dump): New.
613         * lto-streamer.c (section_name_prefix): New.
614         (lto_get_section_name): Use section_name_prefix.
615         (lto_streamer_init): Add flag_openmp.
616         * lto-streamer.h (OMP_SECTION_NAME_PREFIX): New.
617         (section_name_prefix): Ditto.
618         (select_what_to_dump): Ditto.
619         * lto/lto-partition.c (add_symbol_to_partition_1): Set need_dump.
620         (lto_promote_cross_file_statics): Dump everyhtinh.
621         * passes.c (ipa_write_summaries): Add parameter,
622         call select_what_to_dump.
623         * tree-pass.h (void ipa_write_summaries): Add parameter.
625 2013-11-15  Jakub Jelinek  <jakub@redhat.com>
627         * tree-vect-stmts.c (vectorizable_simd_clone_call): Avoid
628         -Wsign-compare warning.
630 2013-11-12  Aldy Hernandez  <aldyh@redhat.com>
632         * ipa-prop.h (enum ipa_parm_op): Adjust comment to IPA_PARM_OP_NEW
633         entry.
635 2013-11-12  Aldy Hernandez  <aldyh@redhat.com>
637         * ipa-prop.c (ipa_modify_expr): Pass expr by address.
638         (ipa_get_adjustment_candidate): Add another level of indirection
639         to expr.  Adjust comment.
640         (ipa_get_adjustment_candidate): Add another level of indirection
641         to first argument.
643 2013-11-11  Aldy Hernandez  <aldyh@redhat.com>
645         * ipa-prop.c (get_ssa_base_param): New.
646         * ipa-prop.h (ipa_modify_expr): Rename from ipa_sra_modify_expr.
647         Remove ipa_sra_modify_function_body.
648         (ipa_get_adjustment_candidate): Rename from
649         sra_ipa_get_adjustment_candidate.
650         * omp-low.c (ipa_simd_modify_stmt_ops): Rename
651         sra_ipa_get_adjustment_candidate to ipa_get_adjustment_candidate.
652         * tree-sra.c (get_ssa_base_param): Remove default_def argument.
653         (create_access): Remove lass argument to get_ssa_base_param.
654         (disqualify_base_of_expr): Same.
655         (sra_ipa_get_adjustment_candidate): Rename to
656         ipa_get_adjustment_candidate and move to ipa-prop.c.
657         (sra_ipa_modify_expr): Rename to ipa_modify_expr and move to
658         ipa-prop.c.
659         (sra_ipa_modify_assign): Rename sra_ipa_modify_expr to
660         ipa_modify_expr.
661         (ipa_sra_modify_function_body): Same.
663 2013-11-11  Jakub Jelinek  <jakub@redhat.com>
665         * tree-vect-data-refs.c (vect_analyze_data_refs): Check loop->safelen
666         rather than loop->simdlen.
667         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
669 2013-11-08  Aldy Hernandez  <aldyh@redhat.com>
671         * ipa-prop.c (ipa_modify_formal_parameters): Remove
672         synth_parm_prefix argument.
673         Use operator enum instead of bit fields.
674         Add assert for properly handling vector of references.
675         (ipa_modify_call_arguments): Use operator enum instead of bit
676         fields.
677         (ipa_combine_adjustments): Same.
678         Assert that IPA_PARM_OP_NEW is not used.
679         (ipa_dump_param_adjustments): Rename reduction to new_decl.
680         Use operator enum instead of bit fields.
681         * ipa-prop.h (enum ipa_parm_op): New.
682         (struct ipa_parm_adjustment): New field op.
683         Rename reduction to new_decl.
684         Rename new_arg_prefix to arg_prefix.
685         Remove new_param, remove_param, copy_param.
686         (ipa_modify_formal_parameters): Remove argument.
687         * omp-low.c (simd_clone_adjust_argument_types): Set arg_prefix.
688         Use operator enum instead of bit fields.
689         (simd_clone_adjust_argument_types): Use operator enum instead of
690         bit fields.
691         Remove last argument to ipa_modify_formal_parameters call.
692         (simd_clone_init_simd_arrays): Use operator enum.
693         (ipa_simd_modify_stmt_ops): Rename reduction to new_decl.
694         (ipa_simd_modify_function_body): Same.
695         * tree-sra.c (turn_representatives_into_adjustments): Use operator
696         enum.  Set arg_prefix.
697         (get_adjustment_for_base): Use operator enum.
698         (sra_ipa_get_adjustment_candidate): Same.
699         (sra_ipa_modify_expr): Rename reduction to new_decl.
700         (sra_ipa_reset_debug_stmts): Use operator enum.
701         (modify_function): Do not pass prefix argument.
703 2013-11-07  Jakub Jelinek  <jakub@redhat.com>
705         * tree-vectorizer.h (enum stmt_vec_info_type): Add
706         call_simd_clone_vec_info_type.
707         * expr.c (store_constructor): Allow CONSTRUCTOR with VECTOR_TYPE
708         (same sized) elements even if the type of the CONSTRUCTOR has
709         vector mode and target is a REG.
710         * tree-vect-data-refs.c: Include cgraph.h.
711         (vect_analyze_data_refs): Inline by hand find_data_references_in_loop
712         and find_data_references_in_bb, if find_data_references_in_stmt
713         fails, still allow calls to #pragma omp declare simd functions
714         in #pragma omp simd loops unless they contain data references among
715         the call arguments or in lhs.
716         * tree-vect-loop.c (vect_determine_vectorization_factor): If a call
717         doesn't have lhs, set STMT_VINFO_VECTYPE to vector type corresponding
718         to any of the argument types and exclude it from adjustments of the
719         vectorization factor.
720         * tree-vect-stmts.c: Include tree-ssa-loop.h and
721         tree-scalar-evolution.h.
722         (vectorizable_function): Don't handle functions with simd clones here.
723         (vectorizable_call): Nor here.  Return early if call doesn't have lhs.
724         (struct simd_call_arg_info): New type.
725         (vectorizable_simd_clone_call): New function.
726         (vect_analyze_stmt, vect_transform_stmt): Call it.
728 2013-11-07  Thomas Schwinge  <thomas@codesourcery.com>
730         * gimple.def (GIMPLE_OACC_PARALLEL): New code.
731         * doc/gimple.texi: Document it.
732         * gimple.h (gimple_build_oacc_parallel): New declaration.
733         (gimple_oacc_parallel_clauses, gimple_oacc_parallel_clauses_ptr)
734         (gimple_oacc_parallel_set_clauses, gimple_oacc_parallel_child_fn)
735         (gimple_oacc_parallel_child_fn_ptr)
736         (gimple_oacc_parallel_set_child_fn, gimple_oacc_parallel_data_arg)
737         (gimple_oacc_parallel_data_arg_ptr)
738         (gimple_oacc_parallel_set_data_arg): New inline functions.
739         (CASE_GIMPLE_OMP): Add GIMPLE_OACC_PARALLEL.
740         * gimple.c (gimple_build_oacc_parallel): New function.
741         (walk_gimple_op, walk_gimple_stmt, gimple_copy): Handle
742         GIMPLE_OACC_PARALLEL.
743         * gimplify.c (is_gimple_stmt): Handle GIMPLE_OACC_PARALLEL.
744         (gimplify_oacc_parallel): New function.
745         (gimplify_expr): Handle OACC_PARALLEL.
746         * cgraphbuild.c (build_cgraph_edges): Handle GIMPLE_OACC_PARALLEL.
747         * gimple-low.c (lower_stmt): Likewise.
748         * gimple-pretty-print.c (pp_gimple_stmt_1): Likewise.
749         (dump_gimple_oacc_parallel): New function.
750         * oacc-builtins.def (BUILT_IN_GOACC_PARALLEL): New macro.
751         * omp-low.c (scan_oacc_parallel, expand_oacc_parallel)
752         (lower_oacc_parallel): New functions.
753         (use_pointer_for_field, build_outer_var_ref, scan_sharing_clauses)
754         (create_omp_child_function, check_omp_nesting_restrictions)
755         (scan_omp_1_stmt, lower_rec_simd_input_clauses)
756         (lower_lastprivate_clauses, lower_reduction_clauses)
757         (lower_copyprivate_clauses, lower_send_clauses)
758         (lower_send_shared_vars, expand_omp)
759         (maybe_add_implicit_barrier_cancel, create_task_copyfn)
760         (lower_omp_1, make_gimple_omp_edges): Handle GIMPLE_OACC_PARALLEL,
761         or catch it.
762         * tree-inline.c (remap_gimple_stmt): Likewise.
763         * tree-nested.c (convert_nonlocal_reference_stmt)
764         (convert_local_reference_stmt, convert_tramp_reference_stmt)
765         (convert_gimple_call): Likewise.
767         * tree.def (OACC_PARALLEL): New code.
768         * doc/generic.texi (OpenMP): Document it.
769         * tree.h (OMP_BODY, OMP_CLAUSES): Include it.
770         (OACC_PARALLEL_BODY, OACC_PARALLEL_CLAUSES): New macros.
771         * tree-pretty-print.c (dump_generic_node): Handle OACC_PARALLEL.
773         * doc/invoke.texi (-fopenacc): Update.
775         * gimplify.c (gimplify_body): Consider flag_openacc additionally
776         to flag_openmp.
777         * omp-low.c (execute_expand_omp, execute_lower_omp)
778         (gate_diagnose_omp_blocks): Likewise.
780         * oacc-builtins.def: New file.
781         * Makefile.in (BUILTINS_DEF): Add oacc-builtins.def.
782         * builtins.def (DEF_GOACC_BUILTIN): New macro.
783         Include "oacc-builtins.def".
785         * gcc.c (LINK_COMMAND_SPEC, GOMP_SELF_SPECS): For -fopenacc, link
786         to libgomp and its dependencies.
787         * config/arc/arc.h (LINK_COMMAND_SPEC): Likewise.
788         * config/darwin.h (LINK_COMMAND_SPEC_A): Likewise.
789         * config/i386/mingw32.h (GOMP_SELF_SPECS): Likewise.
790         * config/ia64/hpux.h (LIB_SPEC): Likewise.
791         * config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
792         * config/pa/pa64-hpux.h (LIB_SPEC): Likewise.
793         * doc/invoke.texi (-fopenacc): Update.
795         * doc/invoke.texi (-fopenacc): Document it.
796         * doc/sourcebuild.texi (fopenacc): Document it.
798         Backport from trunk, r204517:
800         * config/arc/arc.h (LINK_COMMAND_SPEC): For
801         -ftree-parallelize-loops=*, link to libgomp and its dependencies.
802         * config/ia64/hpux.h (LIB_SPEC): Likewise.
803         * config/pa/pa-hpux11.h (LIB_SPEC): Likewise.
804         * config/pa/pa64-hpux.h (LIB_SPEC): Likewise.
805         * gcc.c (GOMP_SELF_SPECS): Update comment about libgomp's
806         dependencies.
808 2013-11-07  Aldy Hernandez  <aldyh@redhat.com>
810         * omp-low.c (ipa_simd_modify_function_body): Avoid
811         regimplification of GIMPLE_RETURNs.
813 2013-11-06  Aldy Hernandez  <aldyh@redhat.com>
815         * ipa-prop.h (sra_ipa_get_adjustment_candidate): Protoize.
816         * omp-low.c (struct modify_stmt_info): New.
817         (ipa_simd_modify_function_body_ops_1): Remove.
818         (ipa_simd_modify_stmt_ops): New.
819         (ipa_simd_modify_function_body_ops): Remove.
820         (ipa_simd_modify_function_body): Set new callback info.
821         Remove special casing.  Handle all operators with walk_gimple_op.
822         * tree-sra.c (get_ssa_base_param): Add new argument.  Use it.
823         (disqualify_base_of_expr): Pass new argument to
824         get_ssa_base_param.
825         (sra_ipa_modify_expr): Abstract candidate search into...
826         (sra_ipa_get_adjustment_candidate): ...here.
828 2013-11-06  Aldy Hernandez  <aldyh@redhat.com>
830         * omp-low.c (simd_clone_mangle): Linear step of 1 is mangled as
831         'l'.
833 2013-11-04  Aldy Hernandez  <aldyh@redhat.com>
835         * omp-low.c (ipa_simd_modify_function_body): Adjust tree operands
836         on the LHS of an assign.
837         (ipa_simd_modify_function_body_ops_1): New.
838         (ipa_simd_modify_function_body_ops): New.
840 2013-11-02  Aldy Hernandez  <aldyh@redhat.com>
842         * omp-low.c (ipa_simd_modify_function_body): Handle empty returns.
844 2013-11-01  Jakub Jelinek  <jakub@redhat.com>
846         * cgraph.h (enum linear_stride_type): Remove.
847         (enum simd_clone_arg_type): New.
848         (struct simd_clone_arg): Remove linear_stride, linear_stride_num
849         and uniform fields.  Add arg_type and linear_step.
850         * omp-low.c (simd_clone_struct_copy): Formatting.
851         (simd_clone_struct_alloc): Likewise.  Use size_t.
852         (simd_clone_clauses_extract, simd_clone_compute_base_data_type,
853         simd_clone_adjust_argument_types): Adjust for struct simd_clone_arg
854         changes.
855         (simd_clone_mangle): Likewise.  Handle negative linear step.
857 2013-11-01  Aldy Hernandez  <aldyh@redhat.com>
859         * tree-vect-stmts.c: Include cgraph.h.
860         (vectorizable_call): Allow > 3 arguments when a SIMD clone may be
861         available.
862         (vectorizable_function): Use SIMD clone if available.
863         * ipa-cp.c (determine_versionability): Nodes with SIMD clones are
864         not versionable.
865         * ggc.h (ggc_alloc_cleared_simd_clone_stat): New.
866         * cgraph.h (enum linear_stride_type): New.
867         (struct simd_clone_arg): New.
868         (struct simd_clone): New.
869         (struct cgraph_node): Add simdclone and simdclone_of fields.
870         (get_simd_clone): Protoize.
871         * cgraph.c (get_simd_clone): New.
872         Add `has_simd_clones' field.
873         * ipa-cp.c (determine_versionability): Disallow functions with
874         simd clones.
875         * ipa-prop.h (ipa_sra_modify_function_body): Protoize.
876         (sra_ipa_modify_expr): Same.
877         (struct ipa_parm_adjustment): Add new_arg_prefix and new_param
878         fields.  Document their use.
879         * ipa-prop.c (ipa_modify_formal_parameters): Handle creating brand
880         new parameters and minor cleanups.
881         * omp-low.c: Add new pass_omp_simd_clone support code.
882         (make_pass_omp_simd_clone): New.
883         (pass_data_omp_simd_clone): Declare.
884         (class pass_omp_simd_clone): Declare.
885         (vecsize_mangle): New.
886         (ipa_omp_simd_clone): New.
887         (simd_clone_clauses_extract): New.
888         (simd_clone_compute_base_data_type): New.
889         (simd_clone_compute_vecsize_and_simdlen): New.
890         (simd_clone_create): New.
891         (simd_clone_adjust_return_type): New.
892         (simd_clone_adjust_return_types): New.
893         (simd_clone_adjust): New.
894         (simd_clone_init_simd_arrays): New.
895         (ipa_simd_modify_function_body): New.
896         (simd_clone_mangle): New.
897         (simd_clone_struct_alloc): New.
898         (simd_clone_struct_copy): New.
899         (class argno_map): New.
900         (argno_map::argno_map(tree)): New.
901         (argno_map::~argno_map): New.
902         (argno_map::operator []): New.
903         (argno_map::length): New.
904         (expand_simd_clones): New.
905         (create_tmp_simd_array): New.
906         * tree.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): New.
907         * tree-core.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): Document.
908         * tree-pass.h (make_pass_omp_simd_clone): New.
909         * passes.def (pass_omp_simd_clone): New.
910         * target.def: Define new hook prefix "TARGET_CILKPLUS_".
911         (default_vecsize_mangle): New.
912         (vecsize_for_mangle): New.
913         * doc/tm.texi.in: Add placeholder for
914         TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE and
915         TARGET_CILKPLUS_VECSIZE_FOR_MANGLE.
916         * tree-sra.c (sra_ipa_modify_expr): Remove static modifier.
917         (ipa_sra_modify_function_body): Same.
918         * tree.h (OMP_CLAUSE_LINEAR_VARIABLE_STRIDE): Define.
919         * doc/tm.texi: Regenerate.
920         * config/i386/i386.c (ix86_cilkplus_default_vecsize_mangle): New.
921         (ix86_cilkplus_vecsize_for_mangle): New.
922         (TARGET_CILKPLUS_DEFAULT_VECSIZE_MANGLE): New.
923         (TARGET_CILKPLUS_VECSIZE_FOR_MANGLE): New.
925 2013-10-10  Jakub Jelinek  <jakub@redhat.com>
927         * tree.c (omp_remove_redundant_declare_simd_attrs): Adjust
928         for the clauses being stored into TREE_VALUE of an extra TREE_LIST
929         pointed out by TREE_VALUE of the attribute.
931 2013-10-04  Jakub Jelinek  <jakub@redhat.com>
933         * omp-low.c (expand_omp_target): When handling IF clause on
934         #pragma omp target, split new_bb rather than entry_bb.  If
935         not GF_OMP_TARGET_KIND_REGION, split new_bb right before
936         the GOMP_TARGET stmt, rather than after labels.
938 2013-09-26  Jakub Jelinek  <jakub@redhat.com>
940         * omp-low.c (expand_task_call): If there are depend clauses,
941         pass bit 8 in 7th argument and pass pointer to depend array
942         as 8th argument.
943         (lower_depend_clauses): New function.
944         (lower_omp_taskreg): Handle depend clauses.
945         * omp-builtins.def (BUILT_IN_GOMP_TASK): Use
946         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR
947         instead of BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT.
948         * builtin-types.def
949         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
950         (BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
952 2013-09-25  Jakub Jelinek  <jakub@redhat.com>
954         * omp-low.c (lower_omp_sections, lower_omp_for, lower_omp_taskreg):
955         Emit ctx->cancel_label before destructors.
957         * gimple-pretty-print.c (dump_gimple_omp_block,
958         pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
959         * tree-nested.c (convert_nonlocal_reference_stmt,
960         convert_local_reference_stmt, convert_gimple_call): Likewise.
961         * tree-cfg.c (make_edges): Likewise.
962         * gimple.h (gimple_build_omp_taskgroup): New prototype.
963         (gimple_has_substatement): Handle GIMPLE_OMP_TASKGROUP.
964         (CASE_GIMPLE_OMP): Likewise.
965         * gimplify.c (is_gimple_stmt, gimplify_expr): Handle OMP_TASKGROUP.
966         * omp-low.c (check_omp_nesting_restrictions): Warn if #pragma omp
967         cancel is used in nowait loop or sections construct.
968         (scan_omp_1_stmt, expand_omp_synch, expand_omp, lower_omp_1): Handle
969         GIMPLE_OMP_TASKGROUP.
970         (diagnose_sb_1, diagnose_sb_2): Likewise.  Handle GIMPLE_OMP_TARGET
971         and GIMPLE_OMP_TEAMS.
972         (lower_omp_taskgroup): New function.
973         * tree-inline.c (remap_gimple_stmt, estimate_num_insns): Handle
974         GIMPLE_OMP_TASKGROUP.
975         * gimple-low.c (lower_stmt): Likewise.
976         * tree.h (OMP_TASKGROUP_BODY): Define.
977         * tree.def (OMP_TASKGROUP): New tree.
978         * tree-pretty-print.c (dump_generic_node): Handle OMP_TASKGROUP.
979         * gimple.c (gimple_build_omp_taskgroup): New function.
980         (walk_gimple_stmt, gimple_copy): Handle GIMPLE_OMP_TASKGROUP.
981         * gimple.def (GIMPLE_OMP_TASKGROUP): New GIMPLE code.
983 2013-09-19  Jakub Jelinek  <jakub@redhat.com>
985         * omp-builtins.def (BUILT_IN_GOMP_TARGET_DATA,
986         BUILT_IN_GOMP_TARGET_UPDATE): Use BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR
987         rather than BT_FN_VOID_INT_SIZE_PTR_PTR_PTR.
988         * builtin-types.def (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR): Remove.
989         (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR): New.
990         * omp-low.c (expand_omp_target): Remove fnname argument from
991         GOMP_target, add openmp_target argument to GOMP_target,
992         GOMP_target_data and GOMP_target_update calls.
994 2013-09-18  Jakub Jelinek  <jakub@redhat.com>
996         * tree.h (OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Define.
997         * tree-core.h (OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Document.
998         * omp-low.c (lower_rec_simd_input_clauses): Don't set DECL_VALUE_EXPR
999         on new_var if it is not a DECL_P.
1000         (lower_rec_input_clauses): Don't force max_vf = 1
1001         if OMP_CLAUSE_REDUCTION_PLACEHOLDER.  Add barrier also if any
1002         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF is seen.  For OMP_CLAUSE_PRIVATE
1003         in simd, fix last argument to omp_clause_default_ctor langhook.
1004         Handle OMP_CLAUSE_REDUCTION_PLACEHOLDER in simd loops, if
1005         OMP_CLAUSE_REDUCTION_GIMPLE_INIT is NULL, emit omp_clause_default_ctor
1006         if any and emit omp_clause_dtor if any.  Handle C++ references in
1007         OMP_CLAUSE_REDUCTION clauses.
1008         (lower_reduction_clauses): Adjust comment for UDRs.  Handle
1009         C++ references in OMP_CLAUSE_REDUCTION clauses.
1010         (lower_omp_taskreg): Emit reduction merges before destructors.
1011         * tree-pretty-print.c (dump_omp_clause): Don't emit any reduction
1012         operator name if OMP_CLAUSE_REDUCTION_CODE is ERROR_MARK.
1013         * gimplify.c (omp_add_variable): Ignore GOVD_LOCAL decls for which
1014         privatize_by_reference returns true.
1016         * tree-core.h (OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND,
1017         OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND):
1018         Move definitions...
1019         * tree.h (OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND,
1020         OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION, OMP_CLAUSE_PROC_BIND_KIND):
1021         ... here.
1023 2013-09-16  Jakub Jelinek  <jakub@redhat.com>
1025         * omp-low.c (install_var_field): Use (mask & 4) to request double
1026         indirection.
1027         (scan_sharing_clauses): For OMP_CLAUSE_MAP_POINTER arrays pass
1028         7 instead of 3 to install_var_field.
1029         (lower_omp_target): For OMP_CLAUSE_MAP_POINTER arrays add extra
1030         indirection.
1032 2013-09-06  Jakub Jelinek  <jakub@redhat.com>
1034         * omp-low.c (scan_sharing_clauses): Handle VLAs in
1035         OMP_CLAUSE_{MAP,TO,FROM}.  Set DECL_ALIGN (field) before
1036         calling insert_field_into_struct.
1037         (scan_omp_target): Reverse TYPE_FIELDS, verify that
1038         all field alignments are the same.
1039         (lower_omp_target): Use maybe_lookup_field instead of
1040         lookup_sfield to check if field is present.  Handle VLAs.
1041         * tree-pretty-print.c (dump_omp_clause): Only check
1042         OMP_CLAUSE_MAP_KIND on OMP_CLAUSE_MAP clauses.
1043         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_TO_ONLY.
1044         (omp_firstprivatize_variable, omp_add_variable,
1045         gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Handle
1046         VLAs in OMP_CLAUSE_{MAP,TO,FROM}.
1048 2013-09-05  Jakub Jelinek  <jakub@redhat.com>
1050         * gimplify.c (gimplify_call_expr): Don't call fold_stmt
1051         inside of #pragma omp target construct.
1052         (gimplify_modify_expr): Likewise.
1053         * omp-low.c (target_nesting_level): New variable.
1054         (lower_omp_target): Increase/restore target_nesting_level
1055         around lowering #pragma omp target body.  Use TYPE_SIZE_UNIT
1056         instead of TYPE_SIZE if OMP_CLAUSE_SIZE is missing.
1057         Or log2 of needed alignment into high 5 bits of kind.
1058         (lower_omp): Call fold_stmt on all stmts inside of
1059         #pragma omp target construct.
1061         * tree-cfg.c (make_edges): For GIMPLE_OMP_TARGET
1062         with GF_OMP_TARGET_KIND_UPDATE, don't look for
1063         GIMPLE_OMP_RETURN and immediately restore previous
1064         region.
1065         * langhooks.c (lhd_omp_mappable_type): New function.
1066         * omp-low.c (scan_sharing_clauses): Ignore OMP_CLAUSE_SHARED
1067         in GIMPLE_OMP_TEAMS constructs.  Handle OMP_CLAUSE_NUM_TEAMS,
1068         OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP,
1069         OMP_CLAUSE_TO and OMP_CLAUSE_FROM.
1070         (create_omp_child_function): If current function has
1071         "omp declare target" attribute or if current region
1072         is OMP_TARGET or lexically nested in it, add that
1073         attribute to the omp child function.
1074         (scan_omp_target, scan_omp_teams): New functions.
1075         (check_omp_nesting_restrictions): Fix a typo in TEAMS nesting
1076         check.
1077         (scan_omp_1_stmt): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
1078         (lower_rec_input_clauses): Ignore OMP_CLAUSE_SHARED
1079         in GIMPLE_OMP_TEAMS constructs.
1080         (expand_omp_synch): Handle GIMPLE_OMP_TEAMS.
1081         (expand_omp_target): New function.
1082         (expand_omp): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
1083         (build_omp_regions_1): For GIMPLE_OMP_TARGET with
1084         GF_OMP_TARGET_KIND_UPDATE, don't look for GIMPLE_OMP_RETURN and
1085         immediately restore previous region.
1086         (lower_omp_single): Emit a CLOBBER stmt after GIMPLE_OMP_RETURN.
1087         (lower_omp_taskreg): Likewise.
1088         (lower_omp_target, lower_omp_teams): New functions.
1089         (lower_omp_1): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
1090         * tree.h (enum omp_clause_map_kind): Improve description of
1091         OMP_CLAUSE_MAP_POINTER.
1092         (OMP_CLAUSE_MAP_ZERO_BIAS_ARRAY_SECTION): Define.
1093         * gimple.def (GIMPLE_OMP_TARGET): Use GSS_OMP_PARALLEL instead
1094         of GSS_OMP_SINGLE.
1095         * langhooks.h (struct lang_hooks_for_types): Add
1096         omp_mappable_type hook.
1097         * langhooks-def.h (lhd_omp_mappable_type): New prototype.
1098         (LANG_HOOKS_OMP_MAPPABLE_TYPE): Define.
1099         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
1100         * gimple.h (gimple_omp_target_clauses, gimple_omp_target_clauses_ptr,
1101         gimple_omp_target_set_clauses): Use gimple_omp_parallel
1102         instead of gimple_omp_single.
1103         (gimple_omp_target_child_fn, gimple_omp_target_child_fn_ptr,
1104         gimple_omp_target_set_child_fn, gimple_omp_target_data_arg,
1105         gimple_omp_target_data_arg_ptr, gimple_omp_target_set_data_arg): New
1106         inlines.
1107         * omp-builtins.def (BUILT_IN_GOMP_TARGET, BUILT_IN_GOMP_TARGET_DATA,
1108         BUILT_IN_GOMP_TARGET_END_DATA, BUILT_IN_GOMP_TARGET_UPDATE,
1109         BUILT_IN_GOMP_TEAMS): New builtins.
1110         * gimple-pretty-print.c (dump_gimple_omp_target): Print child_fn
1111         for #pragma omp target.
1112         * gimplify.c (omp_notice_variable): Diagnose if implicitly mapped
1113         decl doesn't have mappable type.
1114         (gimplify_scan_omp_clauses): For OMP_CLAUSE_MAP don't clear
1115         notice_outer.
1116         (gimplify_adjust_omp_clauses_1): Add OMP_CLAUSE_MAP even if the same
1117         decl is already referenced in target data construct surrounding it.
1118         (gimplify_adjust_omp_clauses): Likewise.  Handle
1119         OMP_CLAUSE_THREAD_LIMIT.
1120         (gimplify_omp_workshare): Fix up gimplification of target or target
1121         data construct body.  For target data add GOMP_target_end_data
1122         call in a try/finally cleanup.
1123         * builtin-types.def (BT_FN_VOID_UINT_UINT,
1124         BT_FN_VOID_INT_SIZE_PTR_PTR_PTR,
1125         BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR): New.
1127 2013-07-14  Jakub Jelinek  <jakub@redhat.com>
1129         * tree.h (omp_declare_simd_clauses_equal): Remove prototype.
1130         (omp_remove_redundant_declare_simd_attrs): New prototype.
1131         * tree.c (omp_declare_simd_clauses_equal): Make static.
1132         (omp_remove_redundant_declare_simd_attrs): New function.
1134 2013-07-09  Jakub Jelinek  <jakub@redhat.com>
1136         * gimple-pretty-print.c (dump_gimple_omp_return): Print
1137         gimple_omp_return_lhs if non-NULL.
1138         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
1139         call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_BARRIER_CANCEL,
1140         BUILT_IN_GOMP_LOOP_END_CANCEL, BUILT_IN_GOMP_SECTIONS_END_CANCEL.
1141         * gimple.h (gimple_omp_return_set_lhs, gimple_omp_return_lhs,
1142         gimple_omp_return_lhs_ptr): New inlines.
1143         * gimple.def (GIMPLE_OMP_RETURN): Use GSS_OMP_ATOMIC_STORE
1144         instead of GSS_BASE.
1145         * gimple.c (walk_gimple_op) <case GIMPLE_OMP_RETURN>: Walk lhs.
1146         * builtin-types.def (BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL): New.
1147         * omp-builtins.def (BUILT_IN_GOMP_CANCELLATION_POINT): Use
1148         ATTR_NOTHROW_LEAF_LIST instead of ATTR_NULL.  Return type is now
1149         bool.
1150         (BUILT_IN_GOMP_CANCEL): Likewise.  Add second argument with bool type.
1151         (BUILT_IN_BARRIER_CANCEL, BUILT_IN_GOMP_LOOP_END_CANCEL,
1152         BUILT_IN_GOMP_SECTIONS_END_CANCEL): New builtins.
1153         * omp-low.c (struct omp_context): Add cancel_label and cancellable
1154         fields.
1155         (extract_omp_for_data): Set have_nowait even for simd implicitly.
1156         (check_omp_nesting_restrictions): Verify nesting restrictions for
1157         #pragma omp cancel and #pragma omp cancellation point.
1158         Set ctx->cancellable for regions that can be cancelled or also
1159         for any task region that contains #pragma omp cancellation point.
1160         (scan_omp_1_stmt): Check nesting restrictions even if ctx == NULL.
1161         (build_omp_barrier): Return gimple instead of tree, add lhs argument,
1162         if non-NULL, build GOMP_barrier_cancel builtin instead and set its 
1163         call lhs to lhs.
1164         (lower_rec_input_clauses): Adjust build_omp_barrier caller.
1165         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk,
1166         expand_omp_single): Likewise.  If OMP_RETURN has lhs, pass it to
1167         build_omp_barrier.
1168         (expand_omp_for_generic): If OMP_RETURN has lhs, use
1169         GOMP_loop_end_cancel libcall instead of GOMP_loop_end and set its
1170         lhs from OMP_RETURN's lhs.
1171         (expand_omp_sections): If OMP_RETURN has lhs, use
1172         GOMP_sections_end_cancel libcall instead of GOMP_sections_end and set
1173         its lhs from OMP_RETURN's lhs.
1174         (maybe_add_implicit_barrier_cancel): New function.
1175         (lower_omp_sections): If ctx->cancellable, emit cancel_label before
1176         OMP_RETURN.  Call maybe_add_implicit_barrier_cancel.
1177         (lower_omp_for): Likewise.
1178         (lower_omp_single): Call maybe_add_implicit_barrier_cancel.
1179         (lower_omp_taskreg): If ctx->cancellable, emit cancel_label before
1180         OMP_RETURN.
1181         (lower_omp_1): If ctx->cancellable, create ctx->cancel_label.
1182         Adjust GOMP_barrier libcalls to GOMP_barrier_cancel plus conditional
1183         branch in cancellable regions, adjust GOMP_cancel and
1184         GOMP_cancellation_point in cancellable regions or remove
1185         GOMP_cancellation_point in non-cancellable regions.
1187 2013-07-03  Jakub Jelinek  <jakub@redhat.com>
1189         * omp-low.c (expand_omp_single): Don't force barrier for
1190         copyprivate.
1192 2013-06-28  Jakub Jelinek  <jakub@redhat.com>
1193             Aldy Hernandez  <aldyh@redhat.com>
1195         * internal-fn.def (GOMP_SIMD_LANE, GOMP_SIMD_VF,
1196         GOMP_SIMD_LAST_LANE): New internal functions.
1197         * omp-low.c (omp_max_vf, lower_rec_simd_input_clauses): New
1198         functions.
1199         (lower_rec_input_clauses): Add fd argument.  Enforce max_vf = 1
1200         if any data sharing clauses mention VLAs or for array reductions.
1201         Handle OMP_CLAUSE__LOOPTEMP_ clause.  For
1202         OMP_CLAUSE_{{FIRST,LAST,}PRIVATE,LINEAR,REDUCTION} on SIMD
1203         constructs use "omp simd array" temporaries.  For OMP_CLAUSE_LINEAR
1204         adjust initial value in combined constructs.  Don't emit any
1205         barriers for #pragma omp distribute.  If max_vf is lower than
1206         current safelen, prepend an OMP_CLAUSE_SAFELEN clause.
1207         (lower_lastprivate_clauses): Handle "omp simd array" temporaries.
1208         (lower_reduction_clauses): Exit early for #pragma omp simd.
1209         (expand_omp_simd): Set loop->simduid from OMP_CLAUSE__SIMDUID_
1210         and cfun->has_simduid_loops if set.
1211         If OMP_CLAUSE_SAFELEN (1) is present, don't set loop->safelen
1212         nor loop->force_vect.
1213         (lower_omp_sections, lower_omp_single, lower_omp_taskreg): Adjust
1214         lower_rec_input_clauses callers.
1215         (lower_omp_for_lastprivate): Unshare vinit.
1216         (lower_omp_for): Add OMP_CLAUSE__LOOPTEMP_ clauses before calling
1217         lower_rec_input_clauses.  Adjust lower_rec_input_clauses caller.
1218         Always call lower_omp_for_lastprivate at the same place, even for
1219         #pragma omp simd.
1220         * tree.h (enum clause_code): Add OMP_CLAUSE__SIMDUID_.
1221         (OMP_CLAUSE__SIMDUID__DECL): Define.
1222         * tree-vectorizer.c: Include hash-table.h and tree-ssa-propagate.h.
1223         (simduid_to_vf, decl_to_simduid): New classes.
1224         (simduid_to_vf::hash, simduid_to_vf::equal, decl_to_simduid::hash,
1225         decl_to_simduid::equal): New methods.
1226         (note_simd_array_uses_struct): New struct.
1227         (adjust_simduid_builtins, note_simd_array_uses_cb,
1228         note_simd_array_uses): New functions.
1229         (vectorize_loops): Adjust "omp simd array" temporary array sizes
1230         and fold GOMP_SIMD_{LANE,VF,LAST_LANE} builtins.
1231         * tree-vectorizer.h (struct _stmt_vec_info): Add simd_lane_access_p
1232         field.
1233         (STMT_VINFO_SIMD_LANE_ACCESS_P): Define.
1234         * tree-data-ref.c (get_references_in_stmt): Allow GOMP_SIMD_LANE
1235         builtins in their own loops.
1236         * tree-inline.c (copy_cfg_body): Propagate has_force_vect_loops
1237         and has_simduid_loops.
1238         * function.h (struct function): Add has_simduid_loops field.
1239         * tree-ssa-ccp.c (likely_value): For GOMP_SIMD_{LANE,LAST_LANE,VF}
1240         builtins ignore the undefined magic argument.
1241         * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__SIMDUID_
1242         clause.
1243         * cfgloop.h (struct loop): Add simduid field.
1244         * Makefile.in (tree-vectorizer.o): Depend on $(HASH_TABLE_H)
1245         and tree-ssa-propagate.h.
1246         * tree-vect-data-refs.c (vect_analyze_data_refs): Check for SIMD
1247         lane access.
1248         * gimplify.c (omp_add_variable): Handle combination of aligned
1249         clause and some data sharing clause for the same decl.
1250         (gimplify_omp_for): For collapse (2) and above simd loops
1251         predetermine loop iteration vars as lastprivate instead of
1252         linear.
1253         * tree.c (omp_clause_num_ops, omp_clause_code_name): Add
1254         entries for OMP_CLAUSE__SIMDUID_.
1255         (walk_tree_1): Handle OMP_CLAUSE__SIMDUID_.
1256         * tree-vect-loop.c (vectorizable_live_operation): Handle live
1257         GOMP_SIMD_LANE result.
1258         * tree-vect-stmts.c (vectorizable_call): Vectorize GOMP_SIMD_LANE
1259         builtin.
1260         (vectorizable_store, vectorizable_load): Handle
1261         STMT_VINFO_SIMD_LANE_ACCESS_P.
1262         * internal-fn.c (expand_GOMP_SIMD_LANE, expand_GOMP_SIMD_VF,
1263         expand_GOMP_SIMD_LAST_LANE): New functions.
1265 2013-06-21  Jakub Jelinek  <jakub@redhat.com>
1267         * gimple.h (enum gf_mask): Adjust GF_OMP_FOR_COMBINED
1268         value representation, add GF_OMP_FOR_COMBINED_INTO.
1269         (gimple_omp_for_combined_into_p,
1270         gimple_omp_for_set_combined_into_p): New inlines.
1271         * gimplify.c (enum omp_region_type): Remove outdated
1272         ORT_SIMD comment.
1273         (struct gimplify_omp_ctx): Add combined_loop field.
1274         (gimplify_omp_for): Call gimple_omp_for_set_combined_into_p
1275         for inner for/simd constructs combined with an outer
1276         loop construct (for or distribute).
1277         * tree.c (omp_clause_num_ops): Add OMP_CLAUSE__LOOPTEMP_
1278         entry.
1279         (omp_clause_code_name): Likewise.
1280         (walk_tree_1): Handle OMP_CLAUSE__LOOPTEMP_.
1281         * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE__LOOPTEMP_.
1282         * tree.h (enum omp_clause_code): Add OMP_CLAUSE__LOOPTEMP_.
1283         (OMP_CLAUSE_DECL): Allow also on OMP_CLAUSE__LOOPTEMP_.
1284         * omp-low.c (extract_omp_for_data): Rename non_ws to simd.  Don't set
1285         fd->chunk_size for non-chunk OMP_CLAUSE_SCHEDULE_STATIC, unless
1286         fd->have_ordered.  For OMP_CLAUSE_SCHEDULE_STATIC non-ordered loops
1287         compute fd->iter_type the same as for simd.
1288         (get_ws_args_for): Add par_stmt argument, if
1289         gimple_omp_for_combined_into_p, use first two _looptemp_ clauses
1290         temporaries instead of fd->loop.n{1,2}.
1291         (determine_parallel_type): Adjust caller.
1292         (scan_sharing_clauses): Handle OMP_CLAUSE__LOOPTEMP_.
1293         (find_combined_for): New function.
1294         (scan_omp_parallel): If gimple_omp_parallel_combined_p and
1295         it is combined with gimple_omp_for_combined_into_p OMP_FOR,
1296         add OMP_CLAUSE__LOOPTEMP_ clauses to the parallel.
1297         (check_omp_nesting_restrictions): Don't insist that the only construct
1298         nested in OMP_DISTRIBUTE must be OMP_PARALLEL.
1299         (lower_rec_input_clauses, lower_send_clauses): Handle
1300         OMP_CLAUSE__LOOPTEMP_.
1301         (expand_omp_for_init_counts, expand_omp_for_init_vars,
1302         extract_omp_for_update_vars): New functions.
1303         (expand_omp_for_generic): Add inner_stmt argument.  Use
1304         expand_omp_for_{init,update}* helper functions.  Handle combined loop
1305         constructs.
1306         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk):
1307         Likewise.  Handle fd->collapse > 1 and broken_loop cases.
1308         (expand_omp_simd): Use expand_omp_for_init* helper functions.  Handle
1309         combined loop constructs.
1310         (expand_omp_for): Add inner_stmt argument.  Pass it through to
1311         expand_omp_for_{generic,static_{,no}chunk}.  Use
1312         expand_omp_for_static* even for fd->collapse > 1 and/or broken_loop
1313         cases, just not when fd->have_ordered.
1314         (expand_omp): Adjust expand_omp_for caller.
1315         (lower_omp_for): If gimple_omp_parallel_combined_p, add
1316         OMP_CLAUSE__LOOPTEMP_ clauses to the GIMPLE_FOR stmt.
1318 2013-06-14  Jakub Jelinek  <jakub@redhat.com>
1320         * gimple-pretty-print.c (dump_gimple_omp_for): Don't handle
1321         GF_OMP_FOR_KIND_FOR_SIMD.
1322         * gimple.h (GF_OMP_FOR_KIND_FOR_SIMD): Remove.
1323         (GF_OMP_FOR_COMBINED): New.
1324         (gimple_omp_for_combined_p, gimple_omp_for_set_combined_p): New
1325         inline functions.
1326         * gimplify.c (is_gimple_stmt): Don't handle OMP_FOR_SIMD.
1327         (find_combined_omp_for): New function.
1328         (gimplify_omp_for): Handle combined OMP_DISTRIBUTE and OMP_FOR
1329         loops.
1330         * Makefile.in (c-family/c-omp.o): Depend on $(C_PRAGMA_H).
1331         * omp-low.c (build_outer_var_ref): Fix up simd handling.
1332         (check_omp_nesting_restrictions): Don't handle
1333         GF_OMP_FOR_KIND_FOR_SIMD.
1334         * tree.def (OMP_FOR_SIMD): Remove.
1335         * tree-pretty-print.c (dump_generic_node): Don't handle OMP_FOR_SIMD.
1336         Handle NULL OMP_FOR_INIT.
1338 2013-06-12  Jakub Jelinek  <jakub@redhat.com>
1340         * gimplify.c (gimplify_scan_omp_clauses): Handle
1341         OMP_CLAUSE_THREAD_LIMIT.
1342         * tree-pretty-print.c (dump_omp_clause): Likewise.
1343         * tree.c (omp_clause_num_ops, omp_clause_code_name): Add entries for
1344         OMP_CLAUSE_THREAD_LIMIT.
1345         * tree.h (enum omp_clause_code): Add OMP_CLAUSE_THREAD_LIMIT.
1346         (OMP_CLAUSE_THREAD_LIMIT_EXPR): Define.
1348 2013-06-04  Jakub Jelinek  <jakub@redhat.com>
1350         * gimplify.c (gimplify_scan_omp_clauses): Handle array
1351         sections on OMP_CLAUSE_{MAP,TO,FROM} clauses, handle
1352         OMP_CLAUSE_DEPEND clause.
1353         (gimplify_adjust_omp_clauses): Handle array sections on
1354         OMP_CLAUSE_MAP, handle OMP_CLAUSE_DEPEND clause.
1355         * tree.c (omp_clause_num_ops): OMP_CLAUSE_{MAP,TO,FROM}
1356         now have 2 arguments, move OMP_CLAUSE_UNIFORM before these
1357         3.
1358         (omp_clause_code_name): Adjust for OMP_CLAUSE_UNIFORM movement.
1359         (walk_tree_1): Adjust to handle 2 arguments of
1360         OMP_CLAUSE_{MAP,TO,FROM}.
1361         * tree-pretty-print.c (dump_omp_clause): For OMP_CLAUSE_{MAP,TO,FROM}
1362         print OMP_CLAUSE_SIZE, and for OMP_CLAUSE_MAP handle
1363         OMP_CLAUSE_MAP_POINTER.
1364         * tree.h (enum omp_clause_code): Move OMP_CLAUSE_UNIFORM before
1365         OMP_CLAUSE_{MAP,TO,FROM}.
1366         (OMP_CLAUSE_SIZE): Define.
1367         (enum omp_clause_map_kind): Add OMP_CLAUSE_MAP_POINTER.
1368         * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_DEPEND.
1370 2013-05-29  Jakub Jelinek  <jakub@redhat.com>
1372         * omp-builtins.def (BUILT_IN_OMP_GET_TEAM_NUM,
1373         BUILT_IN_OMP_GET_NUM_TEAMS): New built-ins.
1374         * omp-low.c (extract_omp_for_data, expand_omp_for_static_nochunk,
1375         expand_omp_for_static_chunk): Handle #pragma omp distribute.
1376         (expand_omp_for): Add assertion for non-finished distribute collapse
1377         > 1 support.
1378         (check_omp_nesting_restrictions): Allow orphaned distribute construct.
1380         * omp-low.c (check_omp_nesting_restrictions): Add some
1381         accelerator related nesting restrictions.
1382         (scan_omp_1_stmt): Call check_omp_nesting_restrictions
1383         even for GOMP_taskgroup_{start,end}.
1384         * gimplify.c (omp_notice_threadprivate_variable): Fix a typo.
1385         (gimplify_body): For functions with "omp declare target" attribute
1386         add ORT_TARGET region around the body.
1388 2013-05-27  Jakub Jelinek  <jakub@redhat.com>
1390         * tree.def (OMP_TEAMS, OMP_TARGET_DATA, OMP_TARGET,
1391         OMP_TARGET_UPDATE): New tree codes.
1392         * tree-cfg.c (make_edges): Handle GIMPLE_OMP_TARGET
1393         and GIMPLE_OMP_TEAMS.
1394         * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_DIST_SCHEDULE.
1395         * gimple-low.c (lower_stmt): Handle GIMPLE_OMP_TARGET
1396         and GIMPLE_OMP_TEAMS.
1397         * tree.h (OMP_TEAMS_BODY, OMP_TEAMS_CLAUSES, OMP_TARGET_DATA_BODY,
1398         OMP_TARGET_DATA_CLAUSES, OMP_TARGET_BODY, OMP_TARGET_CLAUSES,
1399         OMP_TARGET_UPDATE_CLAUSES): Define.
1400         * tree-nested.c (convert_nonlocal_reference_stmt,
1401         convert_local_reference_stmt, convert_gimple_call): Handle
1402         GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
1403         * tree-inline.c (estimate_num_insns): Likewise.
1404         (remap_gimple_stmt): Likewise.  Adjust gimple_build_omp_for
1405         caller.
1406         * gimple.def: Adjust comments describing OMP_CLAUSEs.
1407         (GIMPLE_OMP_TARGET, GIMPLE_OMP_TEAMS): New GIMPLE stmts.
1408         * tree-parloops.c (create_parallel_loop): Adjust gimple_build_omp_for
1409         caller.
1410         * tree-pretty-print.c (dump_generic_node): Handle OMP_TEAMS,
1411         OMP_TARGET, OMP_TARGET_DATA and OMP_TARGET_UPDATE.
1412         * gimple.h (GF_OMP_TARGET_KIND_MASK, GF_OMP_TARGET_KIND_REGION,
1413         GF_OMP_TARGET_KIND_DATA, GF_OMP_TARGET_KIND_UPDATE): New.
1414         (gimple_build_omp_for): Add kind argument to prototype.
1415         (gimple_build_omp_target, gimple_build_omp_teams): New prototypes.
1416         (gimple_has_substatements): Handle GIMPLE_OMP_TARGET and
1417         GIMPLE_OMP_TEAMS.
1418         (gimple_omp_subcode): Change GIMPLE_OMP_SINGLE to GIMPLE_OMP_TEAMS.
1419         (gimple_omp_target_clauses, gimple_omp_target_clauses_ptr,
1420         gimple_omp_target_set_clauses, gimple_omp_target_kind,
1421         gimple_omp_target_set_kind, gimple_omp_teams_clauses,
1422         gimple_omp_teams_clauses_ptr, gimple_omp_teams_set_clauses): New
1423         inline functions.
1424         (gimple_return_set_retval): Handle GIMPLE_OMP_TARGET and
1425         GIMPLE_OMP_TEAMS.
1426         * gimple.c (gimple_build_omp_for): Add kind argument, call
1427         gimple_omp_for_set_kind.
1428         (gimple_build_omp_target, gimple_build_omp_teams): New functions.
1429         (walk_gimple_op, walk_gimple_stmt, gimple_copy): Handle
1430         GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
1431         * gimple-pretty-print.c (dump_gimple_omp_target,
1432         dump_gimple_omp_teams): New functions.
1433         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TARGET and GIMPLE_OMP_TEAMS.
1434         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP.
1435         (enum omp_region_type): Add ORT_TEAMS, ORT_TARGET and ORT_TARGET_DATA.
1436         (omp_add_variable): Add temporary assertions.
1437         (omp_notice_threadprivate_variable): Complain if threadprivate vars
1438         appear in target region.
1439         (omp_notice_variable): ORT_TARGET, ORT_TARGET_DATA and ORT_TEAMS
1440         handling.
1441         (omp_check_private): Ignore ORT_TARGET and ORT_TARGET_DATA regions.
1442         (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_MAP, OMP_CLAUSE_TO,
1443         OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_DIST_SCHEDULE
1444         and OMP_CLAUSE_DEVICE.
1445         (gimplify_adjust_omp_clauses): Likewise.
1446         (gimplify_adjust_omp_clauses_1): Handle GOVD_MAP.  Fix up
1447         check for privatization by also testing for GOVD_LINEAR.
1448         (gimplify_omp_for): Adjust gimple_build_omp_for caller.
1449         Clear *expr_p.
1450         (gimplify_omp_workshare): Handle also OMP_TARGET, OMP_TARGET_DATA
1451         and OMP_TEAMS.  Clear *expr_p.
1452         (gimplify_omp_target_update): New function.
1453         (gimplify_expr): Handle OMP_TARGET, OMP_TARGET_DATA, OMP_TARGET_UPDATE
1454         and OMP_TEAMS.
1456 2013-05-20  Jakub Jelinek  <jakub@redhat.com>
1458         * omp-low.c (expand_omp_simd): For collapse > 1 loops,
1459         if some loop condition might be not true initially, add runtime
1460         test and skip the whole loop.
1462 2013-05-14  Jakub Jelinek  <jakub@redhat.com>
1464         * cfgloop.h (struct loop): Add safelen and force_vect fields.
1465         * function.h (struct function): Add has_force_vect_loops field.
1466         * omp-low.c (expand_omp_simd): If !broken_loop, create loop for
1467         the simd region and set safelen and force_vect fields in it.
1468         * tree-vectorizer.c (vectorize_loops): If loop has force_vect set,
1469         vectorize it even if flag_vectorize isn't set.  Clear loop->force_vect
1470         after vectorization.
1471         * tree-ssa-loop.c (gate_tree_vectorize): Return true even
1472         cfun->has_force_vect_loops.
1473         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Don't
1474         unroll loops with loop->force_vect.
1475         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): For
1476         unknown or bad data dependency, if loop->safelen is non-zero, just
1477         decrease *max_vf to loop->safelen if needed and return false.
1478         * tree-if-conv.c (main_tree_if_conversion): If-convert also loops with
1479         loop->force_vect.
1480         (gate_tree_if_conversion): Return true even if
1481         cfun->has_force_vect_loops.
1483 2013-05-09  Jakub Jelinek  <jakub@redhat.com>
1485         * tree.c (omp_declare_simd_clauses_equal): New function.
1486         (attribute_value_equal): Call it for -fopenmp if
1487         TREE_VALUE of the attributes are both OMP_CLAUSEs.
1488         * tree.h (omp_declare_simd_clauses_equal): Declare.
1490 2013-04-30  Jakub Jelinek  <jakub@redhat.com>
1492         * gimple-pretty-print.c (dump_gimple_omp_atomic_load,
1493         dump_gimple_omp_atomic_store): Handle gimple_omp_atomic_seq_cst_p.
1494         * gimple.h (enum gf_mask): Add GF_OMP_ATOMIC_SEQ_CST.
1495         (gimple_omp_atomic_set_seq_cst, gimple_omp_atomic_seq_cst_p): New
1496         inline functions.
1497         * omp-low.c (expand_omp_atomic_load, expand_omp_atomic_store,
1498         expand_omp_atomic_fetch_op): If gimple_omp_atomic_seq_cst_p,
1499         pass MEMMODEL_SEQ_CST instead of MEMMODEL_RELAXED to the builtin.
1500         * gimplify.c (gimplify_omp_atomic): Handle OMP_ATOMIC_SEQ_CST.
1501         * tree-pretty-print.c (dump_generic_node): Handle OMP_ATOMIC_SEQ_CST.
1502         * tree.def (OMP_ATOMIC): Add comment that OMP_ATOMIC* must stay
1503         consecutive.
1504         * tree.h (OMP_ATOMIC_SEQ_CST): Define.
1506         * omp-low.c (check_omp_nesting_restrictions): Diagnose
1507         OpenMP constructs nested inside simd region.  Don't treat
1508         #pragma omp simd as work-sharing region.  Disallow work-sharing
1509         constructs inside of critical region.  Complain if ordered
1510         region is nested inside of parallel region without loop
1511         region in between.
1512         (scan_omp_1_stmt): Call check_omp_nesting_restrictions even
1513         for GOMP_{cancel{,lation_point},taskyield,taskwait} calls.
1515 2013-04-23  Jakub Jelinek  <jakub@redhat.com>
1517         * Makefile.in (omp-low.o): Depend on $(TARGET_H).
1518         * gimplify.c (gimplify_adjust_omp_clauses): For linear clauses
1519         if outer_context is non-NULL, but not ORT_COMBINED_PARALLEL,
1520         call omp_notice_variable.  Remove aligned clauses that can't
1521         be handled yet.
1522         * omp-low.c: Include target.h.
1523         (scan_sharing_clauses): For aligned clauses with global arrays
1524         register local replacement.
1525         (omp_clause_aligned_alignment): New function.
1526         (lower_rec_input_clauses): For aligned clauses for global
1527         arrays or automatic pointers emit __builtin_assume_aligned
1528         before the loop if possible.
1529         (expand_omp_regimplify_p, expand_omp_build_assign): New functions.
1530         (expand_omp_simd): Use them.  Handle pointer iterators and broken
1531         loops.
1532         (lower_omp_for): Call lower_omp on gimple_omp_body_ptr after
1533         calling lower_rec_input_clauses, not before it.
1535 2013-04-19  Jakub Jelinek  <jakub@redhat.com>
1537         * tree.h (OMP_CLAUSE_LINEAR_NO_COPYIN,
1538         OMP_CLAUSE_LINEAR_NO_COPYOUT): Define.
1539         * omp-low.c (extract_omp_for_data): Handle #pragma omp simd.
1540         (build_outer_var_ref): For #pragma omp simd allow linear etc.
1541         clauses to bind even to private vars.
1542         (scan_sharing_clauses): Handle OMP_CLAUSE_LINEAR, OMP_CLAUSE_ALIGNED
1543         and OMP_CLAUSE_SAFELEN.
1544         (lower_rec_input_clauses): Handle OMP_CLAUSE_LINEAR.  Don't emit
1545         a GOMP_barrier call for firstprivate/lastprivate in #pragma omp simd.
1546         (lower_lastprivate_clauses): Handle also OMP_CLAUSE_LINEAR.
1547         (expand_omp_simd): New function.
1548         (expand_omp_for): Handle #pragma omp simd.
1549         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_LINEAR and
1550         GOVD_ALIGNED, add GOVD_LINEAR into GOVD_DATA_SHARE_CLASS.
1551         (enum omp_region_type): Add ORT_SIMD.
1552         (gimple_add_tmp_var, gimplify_var_or_parm_decl, omp_check_private,
1553         omp_firstprivatize_variable, omp_notice_variable): Handle ORT_SIMD
1554         like ORT_WORKSHARE.
1555         (omp_is_private): Likewise.  Add SIMD argument, tweak diagnostics
1556         and add extra errors in simd constructs.
1557         (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses): Handle
1558         OMP_CLAUSE_LINEAR, OMP_CLAUSE_ALIGNED and OMP_CLAUSE_SAFELEN.
1559         (gimplify_adjust_omp_clauses_1): Handle GOVD_LASTPRIVATE and
1560         GOVD_ALIGNED.
1561         (gimplify_omp_for): Handle #pragma omp simd.
1563 2013-04-10  Jakub Jelinek  <jakub@redhat.com>
1565         * builtin-types.def (DEF_FUNCTION_TYPE_8): Document.
1566         (BT_FN_VOID_OMPFN_PTR_UINT, BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
1567         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): Remove.
1568         (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
1569         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
1570         BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT): New.
1571         * gimplify.c (gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses):
1572         Handle OMP_CLAUSE_PROC_BIND.
1573         * omp-builtins.def (BUILT_IN_GOMP_TASKGROUP_START,
1574         BUILT_IN_GOMP_TASKGROUP_END, BUILT_IN_GOMP_PARALLEL_LOOP_STATIC,
1575         BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC,
1576         BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED,
1577         BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME, BUILT_IN_GOMP_PARALLEL,
1578         BUILT_IN_GOMP_PARALLEL_SECTIONS): New built-ins.
1579         (BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
1580         BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
1581         BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
1582         BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
1583         BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
1584         BUILT_IN_GOMP_PARALLEL_SECTIONS_START): Remove.
1585         * omp-low.c (scan_sharing_clauses): Handle OMP_CLAUSE_PROC_BIND.
1586         (expand_parallel_call): Expand #pragma omp parallel* as
1587         calls to the new GOMP_parallel_* APIs without _start at the end,
1588         instead of GOMP_parallel_*_start followed by fn.omp_fn.N call,
1589         followed by GOMP_parallel_end.  Handle OMP_CLAUSE_PROC_BIND.
1590         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
1591         call_may_clobber_ref_p_1): Handle BUILT_IN_GOMP_TASKGROUP_END
1592         instead of BUILT_IN_GOMP_PARALLEL_END.
1594 2013-03-27  Jakub Jelinek  <jakub@redhat.com>
1596         * gimple-pretty-print.c (dump_gimple_omp_for): Handle different
1597         GIMPLE_OMP_FOR kinds.
1598         * tree.def (OMP_SIMD, OMP_FOR_SIMD, OMP_DISTRIBUTE): New tree codes.
1599         * gimple.h (enum gf_mask): Add GF_OMP_FOR_KIND_MASK,
1600         GF_OMP_FOR_KIND_FOR, GF_OMP_FOR_KIND_SIMD, GF_OMP_FOR_KIND_FOR_SIMD
1601         and GF_OMP_FOR_KIND_DISTRIBUTE.
1602         (gimple_omp_for_kind, gimple_omp_for_set_kind): New inline functions.
1603         * gimplify.c (is_gimple_stmt, gimplify_omp_for, gimplify_expr): Handle
1604         OMP_SIMD, OMP_FOR_SIMD and OMP_DISTRIBUTE.
1605         * tree.c (omp_clause_num_ops, omp_clause_code_name, walk_tree_1):
1606         Handle new OpenMP 4.0 clauses.
1607         * tree-pretty-print.c (dump_omp_clause): Likewise.
1608         (dump_generic_node): Handle OMP_SIMD, OMP_FOR_SIMD and OMP_DISTRIBUTE.
1609         * tree.h (enum omp_clause_code): Add OMP_CLAUSE_LINEAR,
1610         OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_FROM, OMP_CLAUSE_TO,
1611         OMP_CLAUSE_UNIFORM, OMP_CLAUSE_MAP, OMP_CLAUSE_DEVICE,
1612         OMP_CLAUSE_DIST_SCHEDULE, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_NOTINBRANCH,
1613         OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN,
1614         OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_FOR, OMP_CLAUSE_PARALLEL,
1615         OMP_CLAUSE_SECTIONS and OMP_CLAUSE_TASKGROUP.
1616         (OMP_LOOP_CHECK): Define.
1617         (OMP_FOR_BODY, OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND,
1618         OMP_FOR_INCR, OMP_FOR_PRE_BODY): Use OMP_LOOP_CHECK instead of
1619         OMP_FOR_CHECK.
1620         (OMP_CLAUSE_DECL): Extend check range up to OMP_CLAUSE_MAP.
1621         (OMP_CLAUSE_LINEAR_STEP, OMP_CLAUSE_ALIGNED_ALIGNMENT,
1622         OMP_CLAUSE_NUM_TEAMS_EXPR, OMP_CLAUSE_DEVICE_ID,
1623         OMP_CLAUSE_DIST_SCHEDULE_CHUNK_EXPR, OMP_CLAUSE_SAFELEN_EXPR,
1624         OMP_CLAUSE_SIMDLEN_EXPR): Define.
1625         (enum omp_clause_depend_kind, enum omp_clause_map_kind,
1626         enum omp_clause_proc_bind_kind): New enums.
1627         (OMP_CLAUSE_DEPEND_KIND, OMP_CLAUSE_MAP_KIND,
1628         OMP_CLAUSE_PROC_BIND_KIND): Define.
1629         (struct tree_omp_clause): Add subcode.depend_kind, subcode.map_kind
1630         and subcode.proc_bind_kind.
1631         (find_omp_clause): New prototype.
1632         * omp-builtins.def (BUILT_IN_GOMP_CANCEL,
1633         BUILT_IN_GOMP_CANCELLATION_POINT): New built-ins.
1634         * tree-flow.h (find_omp_clause): Remove prototype.
1636 Copyright (C) 2013-2014 Free Software Foundation, Inc.
1638 Copying and distribution of this file, with or without modification,
1639 are permitted in any medium without royalty provided the copyright
1640 notice and this notice are preserved.