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