1 2006-02-16 Diego Novillo <dnovillo@redhat.com>
3 * Mainline merge as of 2006-02-16 (@111136).
5 2006-02-06 Diego Novillo <dnovillo@redhat.com>
7 * Mainline merge as of 2006-02-06 (@110655).
9 2006-02-02 Diego Novillo <dnovillo@redhat.com>
11 * Mainline merge as of 2006-02-02 (@110513).
13 2006-01-29 Diego Novillo <dnovillo@redhat.com>
16 * omp-low.c (execute_expand_omp): Move CFG cleanup code ...
17 (expand_omp): ... here.
18 (expand_omp_parallel): Only remove barriers for combined
19 parallel+workshare constructs.
21 2006-01-26 Diego Novillo <dnovillo@redhat.com>
23 * Mainline merge as of 2006-01-26 (@110255).
25 * tree-cfg.c (move_block_to_fn): Call
26 remove_stmt_from_eh_region for each moved statement.
28 2006-01-18 Diego Novillo <dnovillo@redhat.com>
30 * Mainline merge as of 2006-01-18 (@109919).
32 2006-01-17 Diego Novillo <dnovillo@redhat.com>
34 * Mainline merge as of 2006-01-17.
36 2006-01-16 Aldy Hernandez <aldyh@redhat.com>
38 * omp-low.c (build_outer_var_ref): Handle globals.
40 2006-01-11 Diego Novillo <dnovillo@redhat.com>
42 * tree-pass.h (TDF_CHAIN): Define.
43 * diagnostic.h (debug_tree_chain): Declare.
44 * tree-pretty-print.c (debug_tree_chain): New.
45 (print_generic_expr): Handle TDF_CHAIN.
46 (dump_generic_node): Handle BLOCK.
47 Do not abort with incomplete SWITCH_EXPRs.
48 Do not dump body of an OpenMP directive if TDF_SLIM is given.
50 2006-01-11 Diego Novillo <dnovillo@redhat.com>
52 * tree-dump.h (debug_function): Declare.
53 * tree-cfg.c (set_bb_for_stmt): Do not update the
54 block-to-labels map if we are currently expanding to RTL.
55 (tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P
57 Handle IDENTIFIER_NODE.
58 (tree_verify_flow_info): Do not ICE when emitting error
59 messages about invalid labels.
60 (dump_function_to_file): Reset CFUN before emitting the body
62 (debug_function): New.
64 2006-01-11 Diego Novillo <dnovillo@redhat.com>
66 * tree-ssa-dce.c (find_control_dependence): Do not assume that
67 ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR).
69 2005-01-03 Eric Christopher <echristo@apple.com>
71 * gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif.
72 * config/darwin.h (GOMP_SELF_SPECS): Define.
74 2005-12-08 Jakub Jelinek <jakub@redhat.com>
77 * c-parser.c (c_parser_struct_or_union_specifier,
78 c_parser_objc_class_instance_variables): Handle #pragma
79 at struct or class scope.
81 2005-12-07 Jakub Jelinek <jakub@redhat.com>
83 * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): Adjust
84 for 2005-11-27 compare_reg changes.
86 2005-12-04 Diego Novillo <dnovillo@redhat.com>
88 * omp-low.c: Rename build to buildN everywhere.
90 2005-12-01 Jakub Jelinek <jakub@redhat.com>
92 * tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for
95 2005-11-29 Jakub Jelinek <jakub@redhat.com>
97 * gimplify.c (gimplify_omp_atomic_pipeline): Don't compare return
98 value from __sync_val_compare_and_swap with NEWIVAL, but with saved
101 2005-11-21 Diego Novillo <dnovillo@redhat.com>
103 * Mainline merge as of 2005-11-21.
105 2005-11-19 Diego Novillo <dnovillo@redhat.com>
108 * omp-low.c (determine_parallel_type): Do not handle OMP_FOR.
110 2005-11-18 Richard Henderson <rth@redhat.com>
112 * gcc.c (include_spec_function): New.
113 (static_spec_functions): Add it.
114 (main): Move load of libgomp.spec ...
115 (LINK_COMMAND_SPEC): ... here.
117 2005-11-17 Richard Henderson <rth@redhat.com>
120 * gcc.c (link_gomp_spec): New.
121 (static_specs): Include it.
122 (LINK_COMMAND_SPEC): Add link_gomp.
123 (GOMP_SELF_SPECS): New.
124 (driver_self_specs): Include it.
125 (switch_matches): Don't mark inline.
126 (main): Load libgomp.spec.
128 2005-11-18 Jakub Jelinek <jakub@redhat.com>
130 * omp-low.c (expand_reduction_clauses): Use PLUS_EXPR operation
131 for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.
133 2005-11-15 Jakub Jelinek <jakub@redhat.com>
135 * gimplify.c (gimplify_expr_in_ctx): Add OMP_CTX_P argument.
136 Temporarily switch to OMP_CTX_P omp context.
137 (gimplify_scan_omp_clauses) <case OMP_CLAUSE_SCHEDULE>: In combined
138 parallel loop, gimplify schedule chunk expression in outer context.
139 (gimplify_omp_for): For combined parallel loop, gimplify INIT, COND
140 and INCR expressions in parent omp context.
142 * c-omp.c (check_omp_for_incr_expr): New function.
143 (c_finish_omp_for): Use it to check and canonicalize INCR.
144 Error if lhs of INCR MODIFY_EXPR isn't DECL or if RHS is DECL.
145 Only look at COND operands after checking its TREE_CODE.
147 2005-11-14 Diego Novillo <dnovillo@redhat.com>
149 Mainline merge as of 2005-11-13.
151 2005-11-13 Diego Novillo <dnovillo@redhat.com>
154 * omp-low.c (determine_parallel_type): Make extern.
155 Do not return IS_PARALLEL if OMP_FOR_PRE_BODY is set.
156 (enum omp_parallel_type): Move ...
157 * tree-gimple.h (enum omp_parallel): ... here.
158 (determine_parallel_type): Declare.
159 * gimplify.c (struct gimplify_ctx): Add fields combined_pre_p
161 (gimplify_expr_in_ctx): New.
162 (gimplify_omp_for): Call it if gimplify_ctxp->combined_pre_p
164 (gimplify_omp_parallel): Set gimplify_ctxp->combined_pre_p
165 and gimplify_ctxp->combined_ctxp if this is a combined
166 parallel+workshare directive.
168 2005-11-10 Diego Novillo <dnovillo@redhat.com>
170 * Makefile.in (c-parser.o): Add dependency on $(TARGET_H)
171 * c-parser.c: Include target.h.
172 (c_parser_omp_threadprivate): Emit diagnostic if target does
175 2005-11-09 Diego Novillo <dnovillo@redhat.com>
177 Mainline merge as of 2005-11-09.
179 2005-11-09 Jakub Jelinek <jakub@redhat.com>
181 * tree-pretty-print.c (dump_omp_clauses): Add pp_space call if
183 (dump_generic_node) <case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
184 print space after directive name.
186 2005-11-08 Richard Henderson <rth@redhat.com>
189 * omp-low.c (determine_parallel_type): Disable combined parallel
190 when OMP_FOR_PRE_BODY is not empty.
192 2005-11-08 Richard Henderson <rth@redhat.com>
193 Jakub Jelinek <jakub@redhat.com>
195 * tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_*
196 nodes. Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS
197 and TYPE_P nodes in its default clause.
199 2005-11-08 Richard Henderson <rth@redhat.com>
201 * tree.def (OMP_CLAUSE_SCHEDULE): Reorder next to the other
204 2005-11-07 Jakub Jelinek <jakub@redhat.com>
206 * omp-low.c (scan_omp_parallel): Only optimize empty
207 parallels if optimize > 0 and only when they don't contain
210 * gimplify.c (omp_notice_variable): Call omp_predetermined_sharing
211 langhook even for DECL_ARTIFICIAL.
212 * langhooks.c (lhd_omp_predetermined_sharing): Return
213 OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls.
215 * langhooks.h (struct lang_hooks_for_types): Add
216 omp_firstprivatize_type_sizes hook.
217 * langhooks.c (lhd_omp_firstprivatize_type_sizes): New function.
218 * langhooks-def.h (lhd_omp_firstprivatize_type_sizes): New prototype.
219 (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
220 (LANG_HOOKS_FOR_TYPES_INITIALIZER): Add
221 LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES.
222 * gimplify.c (omp_firstprivatize_variable): No longer static.
223 (omp_firstprivatize_type_sizes): Call omp_firstprivatize_type_sizes
225 * tree-gimple.h (omp_firstprivatize_variable): New prototype.
227 2005-11-07 Diego Novillo <dnovillo@redhat.com>
229 * invoke.texi: Document -fopenmp.
231 2005-11-05 Richard Henderson <rth@redhat.com>
234 * omp-low.c (expand_rec_input_clauses): Set TREE_NO_WARNING for
235 pass-by-value shared variables.
237 2005-11-06 Jakub Jelinek <jakub@redhat.com>
239 * gimplify.c (enum gimplify_omp_var_data): Add GOVD_DEBUG_PRIVATE.
240 (omp_add_variable): For shared VLAs set also GOVD_DEBUG_PRIVATE bit
241 and preserve GOVD_EXPLICIT bit.
242 (gimplify_adjust_omp_clauses_1): If GOVD_DEBUG_PRIVATE bit is set, also
243 create OMP_CLAUSE_PRIVATE with OMP_CLAUSE_PRIVATE_DEBUG flag.
244 (gimplify_adjust_omp_clauses): Likewise.
246 * omp-low.c (expand_lastprivate_clauses): If var is passed by
247 reference, dereference new_var.
249 * tree.h (OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE,
250 OMP_CLAUSE_REDUCTION_PLACEHOLDER): Define.
251 * tree.def (OMP_CLAUSE_REDUCTION): Add 3 extra operands, update
253 * gimplify.c (gimplify_scan_omp_clauses): Call omp_add_variable
254 on OMP_CLAUSE_REDUCTION_PLACEHOLDER, gimplify
255 OMP_CLAUSE_REDUCTION_{INIT,MERGE} to notice all used variables.
256 * tree-gimple.h (omp_reduction_init): New prototype.
257 * omp-low.c (scan_sharing_clauses): Call scan_omp at the end on
258 OMP_CLAUSE_REDUCTION_{INIT,MERGE}.
259 (build_reduction_init): Renamed to...
260 (omp_reduction_init): ... this. No longer static. Don't handle
262 (array_reduction_init, array_reduction_op): Removed.
263 (expand_rec_input_clauses): Don't call array_reduction_init,
264 instead gimplify OMP_CLAUSE_REDUCTION_INIT if non-NULL, in
266 (expand_reduction_clauses): Don't call array_reduction_op,
267 instead gimplify OMP_CLAUSE_REDUCTION_MERGE if non-NULL.
269 2005-11-05 Richard Henderson <rth@redhat.com>
271 * gimplify.c (omp_add_variable): Force the use of the size of a
272 privatize-by-reference variable.
274 2005-11-02 Jakub Jelinek <jakub@redhat.com>
276 * c-typeck.c (c_finish_omp_clauses): New function.
277 * c-tree.h (c_finish_omp_clauses): New prototype.
278 * c-parser.c (c_parser_omp_clause_copyin): Don't diagnose
279 non-threadprivate var here.
280 (c_parser_omp_all_clauses): If some clause type is not
281 allowed, don't remove just one of the clauses, but all clauses
282 added in that loop round. Call c_finish_omp_clauses.
285 * c-parser.c (c_parser_pragma): Diagnose PRAGMA_OMP_SECTION outside
286 of PRAGMA_OMP_SECTIONS construct.
288 * c-parser.c (c_parser_omp_threadprivate): Error if V is automatic
289 variable or has incomplete type.
291 2005-11-01 Diego Novillo <dnovillo@redhat.com>
293 * omp-low.c (scan_omp_for): Call scan_sharing_clauses after
294 building list of additional arguments to pass to combined
297 2005-11-01 Jakub Jelinek <jakub@redhat.com>
299 * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): Copy
300 MEM_VOLATILE_P flag from MEM to MEMSI.
302 * tree.h (OMP_CLAUSE_PRIVATE_DEBUG): Define.
303 * langhooks.h (struct lang_hooks_for_decls): Add
304 omp_disregard_value_expr and omp_private_debug_clause
306 * hooks.c (hook_bool_tree_bool_false): New function.
307 * hooks.h (hook_bool_tree_bool_false): New prototype.
308 * langhooks-def.h (LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
309 LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.
310 (LANG_HOOKS_DECLS): Add them.
311 * gimplify.c (omp_notice_variable): Change return type to bool.
312 Return true if DECL_VALUE_EXPR on the decl should be ignored.
313 (gimplify_var_or_parm_decl): If omp_notice_variable returned
314 true, disregard DECL_VALUE_EXPR on the decl if any.
315 (gimplify_adjust_omp_clauses_1): If omp_private_debug_clause
316 hook returns true, put the DECL into OMP_CLAUSE_PRIVATE
317 clause with OMP_CLAUSE_PRIVATE_DEBUG flag set.
318 (gimplify_adjust_omp_clauses): Likewise.
319 * omp-low.c (fixup_remapped_decl): Add PRIVATE_DEBUG argument.
320 If PRIVATE_DEBUG, copy/remap DECL_VALUE_EXPR even if it is not
322 (scan_sharing_clauses, scan_omp_nested): Adjust caller.
323 (expand_rec_input_clauses): Ignore OMP_CLAUSE_PRIVATE
324 with OMP_CLAUSE_PRIVATE_DEBUG flag set.
326 2005-11-01 Diego Novillo <dnovillo@redhat.com>
328 * omp-low.c (create_omp_child_function): Call expr_only to
329 determine if the loop contains a single statement.
330 * tree-iterator.c (expr_only): Clarify comment.
331 * c-parser.c (c_parser_omp_all_clauses): Use OMP_CLAUSE_CHAIN
332 instead of TREE_CHAIN.
334 2005-11-01 Diego Novillo <dnovillo@redhat.com>
336 * tree.c (empty_body_p): New.
337 * tree.h (empty_body_p): Declare.
338 * omp-low.c (scan_omp_parallel): Replace empty parallel
339 directives with an empty statement.
341 2005-11-01 Jakub Jelinek <jakub@redhat.com>
343 * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): If
344 the requested byte or half-word hasn't been changed, but the surrounding
345 bytes changed, try again.
347 * config/sparc/sync.md: New file.
348 * config/sparc/sparc.md (UNSPECV_MEMBAR, UNSPECV_CAS, UNSPECV_SWAP,
349 UNSPECV_LDSTUB): New constants.
350 * config/sparc/sparc.c (sparc_expand_compare_and_swap_12): New function.
351 * config/sparc/predicates.md (memory_reg_operand): New predicate.
352 * config/sparc/sparc-protos.h (sparc_expand_compare_and_swap_12): New
355 2005-11-01 Diego Novillo <dnovillo@redhat.com>
357 * c-omp.c (c_split_parallel_clauses): Do not handle
359 * c-parser.c (c_parser_omp_all_clauses): When emitting an
360 error message, remove the invalid clause from the list.
362 2005-11-01 Diego Novillo <dnovillo@redhat.com>
364 * omp-low.c (determine_parallel_type): Fix thinko in handling
365 of statically scheduled loops.
367 2005-11-01 Diego Novillo <dnovillo@redhat.com>
369 * omp-low.c (enum omp_parallel_type): Declare.
370 (struct omp_context): Remove field 'is_parallel'.
372 Add fields 'parallel_type', 'parallel_start_ix' and
373 'parallel_start_additional_args'.
374 (is_in_combined_parallel_ctx): New.
375 (determine_parallel_type): New.
376 (scan_omp_parallel): Call it.
377 Initialize new fields in struct omp_context.
378 (extract_omp_for_data): Extract from ...
379 (expand_omp_for_1): ... here.
380 Call extract_omp_for_data.
381 (scan_omp_for): If scanning a combined parallel loop, extract
382 bounds, step and chunk size.
383 Call extract_omp_for_data.
384 (scan_omp): Use ctx->parallel_start_ix to retrieve the
385 appropriate parallel start call.
386 (build_parallel_call): Document.
387 (expand_omp_for_generic): Re-arrange to support combined
389 (expand_omp_sections): Likewise.
391 2005-10-31 Diego Novillo <dnovillo@redhat.com>
393 Mainline merge (gomp-merge-20051031).
395 2005-10-31 Richard Henderson <rth@redhat.com>
397 * omp-low.c (build_receiver_ref): Lookup receiver field again.
398 (build_outer_var_ref): Don't remap types here.
399 (install_var_field): Assert no duplicate fields.
400 (install_var_local): Rename from install_var_new; do
401 omp_copy_decl_1 here.
402 (install_var_private, install_var_shared): Remove.
403 (fixup_remapped_decl): Rename from fixup_variable_sized. Remap
404 types of all decls seen.
405 (is_private_var): Remove.
406 (fixup_child_record_type): New.
407 (scan_sharing_clauses): Always run second pass for
408 fixup_remapped_decl; use install_var_local.
409 (create_omp_child_function): Make the passed-as argument type
411 (scan_omp_parallel): Call fixup_child_record_type.
412 (scan_omp_for): Don't privatize iterator variable here.
413 (expand_rec_input_clauses): Handle variable sized reference vars.
414 Set DECL_VALUE_EXPR for shared variables.
415 (expand_omp_parallel): Expand body after expand_rec_input_clauses.
416 (expand_omp_single): Likewise.
417 * tree-nested.c (struct nesting_info): Add field_map,
418 suppress_expansion, debug_var_chain.
419 (create_nesting_tree): Initialize them.
420 (lookup_field_for_decl): Use field_map.
421 (get_nonlocal_debug_decl, get_local_debug_decl): New.
422 (convert_nonlocal_reference, convert_local_reference): Use them.
423 Honor suppress_expansion; set it for OMP statements.
424 (convert_nonlocal_omp_clauses): Fill in suppress_expansion.
425 (convert_local_omp_clauses): Similarly.
426 (finalize_nesting_tree_1): Add debug_var_chain to toplevel block.
428 2005-10-31 Richard Henderson <rth@redhat.com>
430 * tree-pretty-print.c (print_declaration): Dump DECL_VALUE_EXPR.
431 * print-tree.c (print_node): Likewise.
433 2005-10-31 Diego Novillo <dnovillo@redhat.com>
435 * c-omp.c (c_split_parallel_clauses): Ignore OMP_CLAUSE_NOWAIT.
436 * c-parser.c (c_parser_omp_parallel): Do not allow 'nowait' in
437 combined parallel+workshare directives.
438 omp-builtins.def: Add comments warning about ordering of some
441 2005-10-31 Aldy Hernandez <aldyh@redhat.com>
444 * c-omp.c (c_finish_omp_for): Canonicalize condition.
446 2005-10-31 Richard Henderson <rth@redhat.com>
448 * langhooks.h (omp_clause_default_ctor): Add clause argument.
449 (omp_clause_copy_ctor, omp_clause_assign_op): Likewise.
450 (omp_clause_dtor): Likewise.
451 * langhooks-def.h: Update to match.
452 * langhooks.c (lhd_omp_assignment): Likewise.
453 * hooks.c (hook_tree_tree_null): Remove.
454 (hook_tree_tree_tree_null): New.
455 * hooks.h: Update to match.
456 * omp-low.c (expand_rec_input_clauses): Add new lang_hook arguments.
457 (expand_lastprivate_clauses, expand_copyprivate_clauses): Likewise.
458 * gimplify.c (GOVD_EXPLICIT, GOVD_DATA_SHARE_CLASS): New.
459 (omp_add_variable): Gracefully handle errors.
460 (omp_notice_variable): Likewise.
461 (gimplify_scan_omp_clauses): Rename from
462 gimplify_deconstruct_omp_clauses; don't remove nodes; use
464 (gimplify_adjust_omp_clauses_1): Rename from
465 gimplify_reconstruct_omp_clauses_1; don't do anything for
466 EXPLICIT or LOCAL variables; remove LASTPRIVATE special case.
467 (gimplify_adjust_omp_clauses): Rename from
468 gimplify_reconstruct_omp_clauses; prefer updates to creation.
470 2005-10-30 Jakub Jelinek <jakub@redhat.com>
472 * omp-low.c (tmp_ompfn_id_num): New variable.
473 (create_omp_child_function_name): New function.
474 (create_omp_child_function): Use it.
476 2005-10-28 Jakub Jelinek <jakub@redhat.com>
478 * omp-low.c (expand_rec_input_clauses): If any COPYIN copying is done
479 by reference, emit GOMP_barrier () call at the end of the COPYIN
482 * c-parser.c (c_parser_omp_threadprivate): If DECL_RTL_SET_P,
483 call make_decl_rtl again so that encode_section_info can update
486 2005-10-26 Jakub Jelinek <jakub@redhat.com>
489 * c-common.h (c_finish_omp_for): Add PRE_BODY argument.
490 * c-omp.c (c_finish_omp_for): Likewise. Set OMP_FOR_PRE_BODY
492 * c-parser.c (c_parser_omp_for_loop): Adjust c_finish_omp_for
495 2005-10-25 Diego Novillo <dnovillo@redhat.com>
497 Mainline merge (gomp-merge-20051025).
499 2005-10-24 Jakub Jelinek <jakub@redhat.com>
501 * tree-nested.c (convert_nonlocal_reference): Handle OMP_MASTER and
502 OMP_ORDERED. Merge several OMP_* cases together by using OMP_CLAUSES
504 (convert_local_reference): Likewise.
506 2005-10-24 Diego Novillo <dnovillo@redhat.com>
508 Mainline merge (gomp-merge-20051023).
510 2005-10-23 Richard Henderson <rth@redhat.com>
512 * gimplify.c (GOVD_SPECIALPRIVATE, GOVD_GLOBAL): Remove.
513 (GOVD_LASTPRIVATE, GOVD_REDUCTION): New.
514 (gimplify_deconstruct_omp_clauses): Use them.
515 (omp_add_variable): Don't elide decls with constructors.
516 (omp_notice_variable): Restrict SEEN propagation block to PRIVATE.
517 (gimplify_reconstruct_omp_clauses_1): Rebuild LASTPRIVATE clauses.
518 * hooks.h, hooks.c (hook_tree_tree_null): New.
519 * langhooks-def.h (lhd_omp_assignment): Declare.
520 (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): New.
521 (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR): New.
522 (LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): New.
523 (LANG_HOOKS_OMP_CLAUSE_DTOR): New.
524 (LANG_HOOKS_DECLS): Add them.
525 * langhooks.c (lhd_omp_assignment): New.
526 * langhooks.h (struct lang_hooks_for_decls): Add omp_clause_dtor,
527 omp_clause_default_ctor, omp_clause_assign_op, omp_clause_copy_ctor.
528 * omp-low.c (build_outer_var_ref): Remap the type to the inner context.
529 (scan_sharing_clauses): Use OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE.
530 (build_modify_expr): Remove.
531 (expand_rec_input_clauses): Use new langhooks; return a dtor sequence;
532 avoid copyin sequence for the master.
533 (expand_lastprivate_clauses): Use omp_clause_assign_op.
534 (expand_copyprivate_clauses): Likewise.
535 (expand_send_clauses): USe OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE.
536 (expand_omp_parallel): Emit dtor sequence.
537 (expand_omp_for_1, expand_omp_sections): Likewise.
538 (expand_omp_single_copy): Move expand_rec_input_clauses call ...
539 (expand_omp_single): ... here. Emit dtor sequence.
540 * tree.h (OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE): New.
542 2005-10-21 Richard Henderson <rth@redhat.com>
544 * gimplify.c (gimplify_case_label_expr): Don't crash if the
545 case_labels vector is in an outer context.
546 * omp-low.c (diagnose_sb_1): Fix paste-o.
548 2005-10-21 Richard Henderson <rth@redhat.com>
550 * tree.def (OMP_FOR): Increase size.
551 * tree.h (OMP_FOR_PRE_BODY): New.
552 * gimplify.c (gimplify_omp_for): Use OMP_FOR_PRE_BODY for pre-queue
553 for the INIT, COND, or INCR expressions.
554 * omp-low.c (scan_omp_for): Scan OMP_FOR_PRE_BODY.
555 (scan_omp_nested): Likewise.
556 (expand_omp_for_1): Expand OMP_FOR_PRE_BODY.
557 (diagnose_sb_1, diagnose_sb_2): Scan all OMP_FOR fields.
558 * tree-pretty-print.c (dump_generic_node) <OMP_FOR>: Handle
559 printing OMP_FOR_PRE_BODY.
561 2005-10-21 Richard Henderson <rth@redhat.com>
563 * omp-low.c (scan_omp_nested) <OMP_CLAUSE_PRIVATE>: Replace
564 OMP_CLAUSE_DECL with the new private decl. Use a tree list
565 for fixing up the variable sized decls.
567 2005-10-22 Jakub Jelinek <jakub@redhat.com>
569 * dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp
570 before the switch, but just in the 2 places that need it.
572 2005-10-21 Richard Henderson <rth@redhat.com>
574 * omp-low.c: Include except.h.
575 (create_omp_child_function): Call pushdecl on the new function.
576 (scan_omp_parallel): Make the TYPE_NAME a TYPE_DECL.
577 (scan_omp_single): Likewise.
578 (maybe_catch_exception): New.
579 (expand_omp_parallel, expand_omp_for, expand_omp_sections,
580 expand_omp_single, expand_omp_master, expand_omp_ordered,
581 expand_omp_critical): Call it.
583 2005-10-21 Diego Novillo <dnovillo@redhat.com>
586 * c-tree.h (C_DECL_THREADPRIVATE_P): Define.
587 * c-parser.c (c_parser_omp_threadprivate): Set.
588 Do not error out if C_DECL_THREADPRIVATE_P is set already.
589 * c-decl.c (diagnose_mismatched_decls): Do not check for
590 mismatched thread-local attributes when OLDDECL is marked
591 threadprivate and NEWDECL has no thread-local attributes.
592 (merge_decls): Merge C_DECL_THREADPRIVATE_P.
594 2005-10-21 Jakub Jelinek <jakub@redhat.com>
596 * omp-low.c (expand_omp_critical): Use splay_tree_new_ggc instead of
597 splay_tree_new to create critical_name_mutexes.
599 2005-10-20 Richard Henderson <rth@redhat.com>
601 * c-decl.c (c_gimple_diagnostics_recursively): Rename from
602 c_warn_unused_result_recursively. Invoke
603 diagnose_omp_structured_block_errors.
604 * omp-low.c (scan_omp_1): Don't handle LABEL_EXPR.
605 (expand_omp_1): Don't handle GOTO_EXPR or RETURN_EXPR.
606 (expand_omp): Don't request RETURN_EXPRs.
607 (execute_lower_omp): Don't alloc or destroy all_labels.
608 (diagnose_sb_0, diagnose_sb_1, diagnose_sb_2): New.
609 (diagnose_omp_structured_block_errors): New.
610 * tree-gimple.h (diagnose_omp_structured_block_errors): Declare.
612 2005-10-20 Richard Henderson <rth@redhat.com>
614 * c-parser.c (c_parser_omp_for_loop): Install the continue label,
615 if one was generated.
616 * c-typeck.c (c_finish_bc_stmt): Diagnose break within omp for.
618 2005-10-20 Jakub Jelinek <jakub@redhat.com>
620 * tree-pretty-print.c (dump_generic_node): Handle OMP_MASTER and
621 OMP_ORDERED. Handle printing of OMP_BODY just in one place,
622 goto dump_omp_body in the rest of OMP_* nodes that have OMP_BODY.
624 2005-10-20 Richard Henderson <rth@redhat.com>
626 * Makefile.in (omp-low.o): Update dependencies.
627 (GTFILES): Add omp-low.c.
628 (s-gtype): Add gt-omp-low.h.
629 * c-common.h (c_finish_omp_master, c_finish_omp_ordered): Update.
630 * c-omp.c (c_finish_omp_master): Use OMP_MASTER, return the stmt.
631 (c_finish_omp_ordered): Similarly with OMP_ORDERED.
632 * c-parser.c (c_parser_omp_critical): Return the stmt.
633 (c_parser_omp_master, c_parser_omp_ordered): Likewise.
634 (c_parser_omp_construct): Set the locus on them.
635 * gimplify.c (gimplify_omp_sections): Remove.
636 (gimplify_omp_workshare): Rename from gimplify_omp_single;
637 handle any clause+body workshare construct.
638 (critical_name_mutexes, gimplify_omp_critical): Move to omp-low.c.
639 (gimplify_expr): Use gimplify_omp_workshare. Handle OMP_MASTER
641 * omp-low.c: Don't include except.h; do include ggc.h.
642 (scan_omp_1): Handle OMP SECTION, MASTER, ORDERED, CRITICAL.
643 (expand_omp_sections): Lookup the context for the OMP_SECTION.
644 (expand_omp_master, expand_omp_ordered): New.
645 (critical_name_mutexes, expand_omp_critical): Move from gimplify.c.
646 (expand_omp_1): Call them. Handle RETURN_EXPR.
647 (expand_omp): Set want_return_expr.
648 * tree-gimple.c (is_gimple_stmt): True for OMP_MASTER,
649 OMP_ORDERED, OMP_CRITICAL.
650 * tree-gimple.h (struct walk_stmt_info): Add want_return_expr.
651 * tree-nested.c (walk_stmts): Honor it.
652 * tree.def (OMP_MASTER, OMP_ORDERED): New.
653 * tree.h (OMP_MASTER_BODY, OMP_ORDERED_BODY): New.
655 2005-10-19 Richard Henderson <rth@redhat.com>
657 * omp-low.c (struct omp_context): Add depth.
658 (new_omp_context): Set it.
660 (execute_lower_omp): Allocate and delete it.
661 (scan_omp_1): Fill it in.
662 (expand_omp_1): Check for goto that cross contexts.
663 (expand_omp): Set want_locations.
665 2005-10-19 Richard Henderson <rth@redhat.com>
667 * omp-low.c (expand_omp_1) <INDIRECT_REF>: Fix thinko in
668 expand_regimplify the operand.
670 2005-10-18 Diego Novillo <dnovillo@redhat.com>
672 * omp-low.c (use_pointer_for_field): Fix thinko in
673 handling of TREE_ADDRESSABLE decls.
675 2005-10-18 Diego Novillo <dnovillo@redhat.com>
677 * omp-low.c (use_pointer_for_field): Return true for
678 TREE_ADDRESSABLE decls.
680 2005-10-18 Jakub Jelinek <jakub@redhat.com>
682 * langhooks.h (struct lang_hooks_for_decls): Add
683 omp_predetermined_sharing hook.
684 * langhooks.c (lhd_omp_predetermined_sharing): New function.
685 * langhooks-def.h (lhd_omp_predetermined_sharing): New prototype.
686 (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Define.
687 (LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_PREDETERMINED_SHARING.
688 * gimplify.c (omp_notice_variable): Only return immediately
689 if a global var is DECL_THREAD_LOCAL_P. Use
690 omp_predetermined_sharing langhook.
691 (gimplify_reconstruct_omp_clauses_1): Do not add global vars
692 into OMP_CLAUSE_SHARED clause.
693 * c-common.h (c_omp_predetermined_sharing): New prototype.
694 * c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.
695 * c-omp.c (c_omp_predetermined_sharing): New function.
696 * omp-low.c (scan_sharing_clauses): Handle const shared scalar
697 vars as if they were firstprivate.
699 * langhooks.c (lhd_omp_privatize_by_reference): Remove.
700 * langhooks-def.h (lhd_omp_privatize_by_reference): Remove prototype.
701 (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Use hook_bool_tree_false
704 2005-10-18 Richard Henderson <rth@redhat.com>
706 * c-omp.c (c_finish_omp_critical): Use make_node and accessors
708 * c-parser.c (c_parser_omp_single): Likewise.
709 * tree.c (tree_range_check_failed): New.
710 * tree.def: Update comments around omp codes.
711 * tree.h (TREE_RANGE_CHECK): New.
712 (OMP_BODY, OMP_CLAUSES): New.
713 (OMP_PARALLEL_BODY, OMP_PARALLEL_CLAUSES, OMP_FOR_BODY,
714 OMP_FOR_CLAUSES, OMP_FOR_INIT, OMP_FOR_COND, OMP_FOR_INCR,
715 OMP_SECTIONS_BODY, OMP_SECTIONS_CLAUSES, OMP_SINGLE_BODY,
716 OMP_SINGLE_CLAUSES, OMP_CRITICAL_BODY, OMP_CRITICAL_NAME): Renumber
717 arguments to canonical form.
718 (OMP_CLAUSE_CHAIN, OMP_CLAUSE_DECL): Add checking.
720 * omp-low.c (struct omp_context): Add is_nested.
721 (fixup_variable_sized): Split out of...
722 (scan_sharing_clauses): ... here. Avoid unnecessary indirection.
723 (omp_copy_decl): Don't remap global variables.
724 (scan_omp_nested): New.
725 (scan_omp_1): Use it.
726 (expand_omp_1): Avoid walking nested contexts. Regimplify
727 INDIRECT_REF properly.
729 2005-10-18 Jakub Jelinek <jakub@redhat.com>
731 * langhooks.h (struct lang_hooks_for_decls): Add
732 omp_privatize_by_reference hook.
733 * langhooks-def.h (lhd_omp_privatize_by_reference): New prototype.
734 (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Define.
735 (LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE.
736 * langhooks.c (lhd_omp_privatize_by_reference): New function.
737 * omp-low.c (is_reference): Call omp_privatize_by_reference
740 2005-10-17 Richard Henderson <rth@redhat.com>
742 * gimplify.c (gimplify_omp_for): Canonicalize the operand order
745 2005-10-16 Diego Novillo <dnovillo@redhat.com>
747 Mainline merge (gomp-merge-20051016).
749 2005-10-15 Jakub Jelinek <jakub@redhat.com>
751 * omp-low.c (build_reduction_init): Use array member type for arrays.
752 Handle NE_EXPR and EQ_EXPR. Handle floating point MAX_EXPR/MIN_EXPR
754 (array_reduction_init): New function.
755 (expand_rec_input_clauses): Use it.
756 (array_reduction_op): New function.
757 (expand_reduction_clauses): Use it.
759 2005-10-14 Richard Henderson <rth@redhat.com>
761 * gimplify.c (enum gimplify_omp_var_data): New.
762 (struct gimplify_omp_ctx, gimplify_omp_ctxp): New.
763 (splay_tree_compare_decl_uid): New.
764 (new_omp_context, delete_omp_context): New.
765 (gimple_add_tmp_var): Call omp_add_variable.
766 (gimplify_bind_expr): Likewise.
767 (omp_firstprivatize_variable, omp_firstprivatize_type_sizes): New.
768 (omp_add_variable, omp_notice_variable, omp_is_private): New.
769 (gimplify_deconstruct_omp_clauses): New.
770 (gimplify_reconstruct_omp_clauses_1): New.
771 (gimplify_reconstruct_omp_clauses): New.
772 (gimplify_omp_parallel): Use them.
773 (gimplify_omp_for): Likewise.
774 (gimplify_omp_sections, gimplify_omp_single): New.
775 (gimplify_expr): Call omp_notice_variable.
776 * omp-low.c (is_variable_sized, is_reference): New.
777 (omp_copy_decl_2): Don't set DECL_ABSTRACT_ORIGIN.
778 (build_outer_var_ref): Handle variable sized and reference types here.
779 (install_var_private): Use is_reference.
780 (omp_copy_decl): Don't handle defaults. Return error_mark_node for
781 any decl not remapped.
782 (scan_sharing_clauses): Handle variable sized types.
783 (create_omp_child_function): Set DECL_ARTIFICIAL on the argument.
784 (build_modify_expr): New.
785 (expand_rec_input_clauses): Handle variable sized types.
786 (expand_lastprivate_clauses): Use build_modify_expr.
787 (expand_reduction_clauses): Don't explicitly handle references.
788 (expand_copyprivate_clauses): Use is_reference.
789 (expand_send_clauses): Handle variable sized types.
790 (build_parallel_call): Use EQ_EXPR instead of invert_truthvalue.
791 (expand_omp_1): Do nothing for omp forms if no context.
792 * tree-inline.c (remap_decl): Early exit if copy produces a
794 * tree-nested.c (walk_body): Split out of walk_function.
795 (convert_nonlocal_omp_clauses, convert_local_omp_clauses): New.
796 (convert_nonlocal_reference): Handle omp statements.
797 (convert_local_reference): Likewise.
798 (unnest_nesting_tree_1): Split out of finalize_nesting_tree_1.
799 (unnest_nesting_tree): New.
800 (lower_nested_functions): Call it.
801 * tree-pretty-print.c (dump_omp_clauses): Don't use dump_decl_name
804 2005-10-12 Richard Henderson <rth@redhat.com>
806 * c-omp.c (c_finish_omp_critical): Return statement.
807 (c_finish_omp_for): Accept explicit incoming locus. Be careful
808 with expressions with no locus.
809 * c-common.h: Update.
810 * c-parser.c (c_parser_omp_for_loop): Pass for locus to
811 c_finish_omp_for. Don't build a compound statement here.
812 * c-omp (fopenmp): Accept for C++ and ObjC/++.
814 2005-10-12 Jakub Jelinek <jakub@redhat.com>
816 * omp-low.c (expand_omp_for_1): Default to chunk size 1 unless
817 static or runtime schedule.
819 * omp-low.c (omp_copy_decl_2): New function.
820 (omp_copy_decl_1): Use it.
821 (install_var_private): Handle REFERENCE_TYPE private variables.
822 (build_reduction_init): Add type argument.
823 (expand_rec_input_clauses): Expand initializers of context block
824 variables. Handle REFERENCE_TYPE variables. Adjust
825 build_reduction_init caller.
826 (expand_reduction_clauses, expand_copyprivate_clauses,
827 expand_send_clauses): Handle REFERENCE_TYPE variables.
829 2005-10-11 Jakub Jelinek <jakub@redhat.com>
831 * omp-low.c (expand_rec_input_clauses): Fix a typo.
833 * omp-low.c (expand_reduction_clauses): If there is just
834 one reduction clause, expand it as OMP_ATOMIC instead of
835 using a lock. Use GOMP_atomic_{start,end} instead of
836 GOMP_critical_{start,end}.
838 * tree-pretty-print.c (dump_omp_clauses): Handle OMP_CLAUSE_DEFAULT.
839 (op_symbol_1): Handle MAX_EXPR and MIN_EXPR.
841 2005-10-11 Richard Henderson <rth@redhat.com>
843 * c-pragma.h (enum pragma_kind): Add PRAGMA_GCC_PCH_PREPROCESS.
844 * c-pragma.c (c_register_pragma_1): Assert id in range of the
845 field used by the c++ front end.
846 (init_pragma): Register GCC pch_preprocess as an internal pragma.
847 * c-pch.c (c_common_pch_pragma): Take name argument. Don't do the
848 actual lexing of this pragma here.
849 * c-common.h (c_common_pch_pragma): Update.
850 * c-parser.c (c_parser_pragma): Handle PRAGMA_GCC_PCH_PREPROCESS.
851 (c_parser_pragma_pch_preprocess): New.
852 (c_parse_file): Call it.
854 2005-10-11 Richard Henderson <rth@redhat.com>
856 * c-common.c (enum c_builtin_type): Move to top-level from
857 c_common_nodes_and_builtins enum builtin_type.
858 (builtin_types): Move from c_common_nodes_and_builtins.
860 (c_common_nodes_and_builtins): Use it.
861 (def_builtin_1): Check for error_mark_node.
863 2005-10-10 Richard Henderson <rth@redhat.com>
865 * omp-low.c (install_var_field): Set DECL_ABSTRACT_ORIGIN.
866 (delete_omp_context): Clear it again.
867 (expand_send_shared_vars_1): Merge into ...
868 (expand_send_shared_vars): ... here. Iterate over the record
869 fields, instead of over the splay tree.
871 2005-10-10 Jakub Jelinek <jakub@redhat.com>
873 * config/i386/i386.h (x86_cmpxchg8b, x86_cmpxchg16b): New decls.
874 (TARGET_CMPXCHG8B, TARGET_CMPXCHG16B): Define.
875 * config/i386/i386.c (x86_cmpxchg8b, x86_cmpxchg16b): New variables.
876 * config/i386/sync.md (CASMODE, DCASMODE): New mode macros.
877 (doublemodesuffix, DCASHMODE): New mode attrs.
878 (sync_compare_and_swap<mode>): Change into expand, use CASMODE
879 instead of IMODE, if mode is wider than a word, expand into
880 sync_double_compare_and_swap*.
881 (*sync_compare_and_swap<mode>): New insn.
882 (sync_double_compare_and_swap<mode>): Likewise.
883 (*sync_double_compare_and_swapdi_pic): Likewise.
884 (sync_compare_and_swap_cc<mode>): Use CASMODE instead of IMODE, if
885 mode is wider than a word, expand into
886 sync_double_compare_and_swap_cc*.
887 (sync_double_compare_and_swap_cc<mode>): New insn.
888 (*sync_double_compare_and_swap_ccdi_pic): Likewise.
889 * sync-builtins.def (BUILT_IN_FETCH_AND_ADD_16,
890 BUILT_IN_FETCH_AND_SUB_16, BUILT_IN_FETCH_AND_OR_16,
891 BUILT_IN_FETCH_AND_AND_16, BUILT_IN_FETCH_AND_XOR_16,
892 BUILT_IN_FETCH_AND_NAND_16, BUILT_IN_ADD_AND_FETCH_16,
893 BUILT_IN_SUB_AND_FETCH_16, BUILT_IN_OR_AND_FETCH_16,
894 BUILT_IN_AND_AND_FETCH_16, BUILT_IN_XOR_AND_FETCH_16,
895 BUILT_IN_NAND_AND_FETCH_16, BUILT_IN_BOOL_COMPARE_AND_SWAP_16,
896 BUILT_IN_VAL_COMPARE_AND_SWAP_16, BUILT_IN_LOCK_TEST_AND_SET_16,
897 BUILT_IN_LOCK_RELEASE_16): New builtins.
898 * builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
899 BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
900 * builtins.c (get_builtin_sync_mode): Use 0 as last argument to
902 (expand_builtin): Handle sync BUILT_IN_*_16 builtins.
903 * c-common.c (sync_resolve_size): Handle also 128 bit sync builtins.
904 * gimplify.c (gimplify_omp_atomic): Also support 128 bit atomic.
905 Only use __sync_* builtins if memory is sufficiently aligned.
907 2005-10-10 Richard Henderson <rth@redhat.com>
909 * Makefile.in (GTFILES): Add c-pragma.h.
910 * c-lex.c (pragma_lex): Remove.
911 * c-parser.c (enum pragma_omp_kind): Move to c-pragma.h.
912 (c_parse_init): Move omp pragma registration to init_pragma.
913 (struct c_token): Rename omp_kind to pragma_kind.
914 (the_parser): Move earlier in the file.
915 (c_token_starts_declspecs): False for all pragmas.
916 (c_parser_declaration_or_fndef): Don't allow PRAGMA_OMP_THREADPRIVATE.
917 (enum pragma_context, c_parser_pragma): New.
918 (c_parser_external_declaration): Use it.
919 (c_parser_compound_statement_nostart): Likewise.
920 (c_parser_statement_after_labels): Likewise.
922 (c_parser_omp_construct): Don't handle BARRIER or FLUSH here.
923 (c_parser_new): Merge into ...
924 (c_parse_file): ... here. Use c_parser_pragma.
925 * c-pragma.c (registered_pragmas, c_register_pragma_1): New.
926 (c_register_pragma, c_register_pragma_with_expansion): Use it.
927 (c_invoke_pragma_handler): New.
928 (init_pragma): Do omp pragma registration here.
929 * c-pragma.h (enum pragma_kind): Move from c-parser.c.
930 (pragma_handler): New.
931 (c_invoke_pragma_handler): Declare.
933 2005-10-10 Richard Henderson <rth@redhat.com>
935 * gimplify.c (gimplify_omp_for): Don't pass the entire OMP_FOR_INCR
936 through gimplify_expr, but do normalize autoinc.
938 2005-10-10 Richard Henderson <rth@redhat.com>
940 * omp-low.c (scan_sharing_clauses): Scan the outer context for
941 copyprivate, if, num_threads, and schedule.
943 2005-10-09 Richard Henderson <rth@redhat.com>
945 * c-lex.c (pragma_lex): Rename from c_lex.
946 * c-pch.c, c-pragma.c, c-pragma.h, config/darwin-c.c, config/sol2-c.c,
947 config/c4x/c4x-c.c, config/ia64/ia64-c.c, config/m32c/m32c-pragma.c,
948 config/rs6000/rs6000-c.c, config/v850/v850-c.c: Update to match.
950 2005-10-09 Richard Henderson <rth@redhat.com>
952 * omp-low.c (omp_copy_decl): Use %qs instead of %qE.
954 2005-10-09 Richard Henderson <rth@redhat.com>
956 * c-parser.c (c_parser_omp_clause_copyin): Verify that the
957 variables are in fact threadprivate.
959 2005-10-09 Richard Henderson <rth@redhat.com>
961 * Makefile.in (gimplify.o): Add OPTABS_H.
962 * gimplify.c: Include optabs.h.
963 (gimplify_omp_atomic_fetch_op): Fail if the atomic operation
964 isn't supported on the target.
965 (gimplify_omp_atomic_pipeline): Likewise.
966 (gimplify_omp_atomic_mutex): New.
967 (gimplify_omp_atomic): Use it when all else fails.
968 * omp-builtins.def (BUILT_IN_GOMP_ATOMIC_START): New.
969 (BUILT_IN_GOMP_ATOMIC_END): New.
971 2005-10-09 Richard Henderson <rth@redhat.com>
973 * omp-low.c (scan_sharing_clauses): Force a remapping to ocurr in
974 the context outer to a non-parallel firstprivate, lastprivate or
976 (build_outer_var_ref): New.
977 (expand_rec_input_clauses): Use it.
978 (expand_lastprivate_clauses): Likewise.
979 (expand_reduction_clauses): Likewise.
981 2005-10-08 Richard Henderson <rth@redhat.com>
983 * omp-low.c: Rewrite from scratch.
984 * c-common.h (c_finish_omp_bindings): Remove.
985 * c-decl.c (struct c_scope, push_scope, pop_scope,
986 define_label, lookup_name): Revert all changes.
987 (current_omp_parallel_scope, omp_remap_private): Remove.
988 (c_omp_sharing_implicitly_determined): Remove.
989 (c_omp_sharing_predetermined): Remove.
990 (c_omp_remap_decl_1, c_omp_remap_decl): Remove.
991 (maybe_remap_for_omp_parallel): Remove.
992 (lookup_name_no_remap, c_omp_remap_private): Remove.
993 (c_begin_omp_parallel, c_finish_omp_parallel): Remove.
994 * c-omp.c (relookup_decls): Remove.
995 (c_split_parallel_clauses): Don't call it. Handle DEFAULT.
996 (c_finish_omp_bindings): Remove.
997 * c-parser.c (c_lex_one_token): Revert use of lookup_name_no_remap.
998 (c_parser_declspecs): Likewise.
999 (c_parser_skip_to_pragma_eol): Consume CPP_PRAGMA_EOL properly.
1000 (c_parser_omp_clause_default): Emit OMP_CLAUSE_DEFAULT.
1001 (c_parser_omp_all_clauses): Don't pass default by enum.
1002 (c_parser_omp_for_loop): Don't call c_omp_remap_private.
1003 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK): New.
1004 (OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): New.
1005 (c_parser_omp_for): Don't use c_finish_omp_bindings.
1006 (c_parser_omp_sections): Likewise.
1007 (c_parser_omp_parallel): Likewise.
1008 * c-tree.h (lookup_name_no_remap, c_omp_remap_private): Remove
1009 (c_begin_omp_parallel, c_finish_omp_parallel): Update.
1010 * c-typeck.c (c_begin_omp_parallel, c_finish_omp_parallel): New.
1011 * cgraphunit.c (cgraph_finalize_pending_functions): Don't
1012 gimplify the function.
1013 * gimplify.c (struct gimplify_ctx): Add prev_context. Remove
1014 omp_for_istart, omp_for_iend.
1015 (push_gimplify_context, pop_gimplify_context): Allow nesting.
1016 (gimplify_omp_reduction, gimplify_omp_for_lastprivate,
1017 gimplify_omp_for_generic, gimplify_omp_for_static_nochunk,
1018 gimplify_omp_for_static_chunk, gimplify_omp_sections,
1019 gimplify_omp_section, gimplify_omp_single_simple,
1020 gimplify_omp_single_copy, gimplify_omp_single): Remove.
1021 (gimplify_omp_parallel): New.
1022 (gimplify_omp_for): Only gimplify the body and verify the form.
1023 (gimplify_expr): Use gimplify_omp_parallel. Pass the bodies of
1024 OMP_SECTIONS, OMP_SECTION, OMP_SINGLE, through gimplify_to_stmt_list.
1025 (gimplify_body): Verify gimplify_ctxp is empty after gimplification.
1026 * tree-gimple.c (is_gimple_stmt): Add OMP_SECTIONS, OMP_SECTION,
1028 * tree-gimple.h (use_pointer_for_field): Remove.
1029 (struct walk_stmt_info): Add want_bind_expr, want_locations.
1030 * tree-nested.c (walk_stmts): Honor them.
1031 * tree-inline.c (remap_decl, remap_type): Export.
1032 * tree-inline.h (remap_decl, remap_type): Declare.
1033 * tree-pretty-print.c (dump_omp_clauses): Don't dump
1034 OMP_CLAUSE_INNER_DECL.
1035 * tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS): Remove INIT, LAST,
1037 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
1038 OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_COPYIN,
1039 OMP_CLAUSE_COPYPRIVATE): Remove INNER operand.
1040 (OMP_CLAUSE_DEFAULT): New.
1041 * tree.h (OMP_PARALLEL_VAR_INIT, OMP_PARALLEL_VAR_REDUC,
1042 OMP_FOR_VAR_INIT, OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
1043 OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST,
1044 OMP_SECTIONS_VAR_REDUC): Remove.
1045 (OMP_CLAUSE_DECL): Rename from OMP_CLAUSE_OUTER_DECL.
1046 (OMP_CLAUSE_INNER_DECL): Remove.
1047 (OMP_CLAUSE_DEFAULT_KIND): New.
1049 2005-10-08 Diego Novillo <dnovillo@redhat.com>
1051 Mainline merge (gomp-merge-20051008).
1053 2005-10-07 Diego Novillo <dnovillo@redhat.com>
1055 Mainline merge (gomp-merge-20051006).
1057 2005-10-06 Richard Henderson <rth@redhat.com>
1059 * Makefile.in (TREE_INLINE_H): New. Use it throughout.
1060 * tree-inline.c (struct copy_body_data): Move to tree-inline.h.
1061 (insert_decl_map): Export.
1062 (remap_decl): Use copy_body_data.copy_decl method. Remove if 0 code.
1063 Remove duplicate insert_decl_map.
1064 (copy_body_r): Export.
1065 (setup_one_parameter): Use copy_decl_to_var.
1066 (declare_return_variable): Likewise.
1067 (expand_call_inline): Fix some src/dst confusion. Set src_node
1068 before initialize_inlined_parameters. Don't bother saving and
1069 restoring src_node around copy_body.
1070 (mark_local_for_remap_r): Use copy_body_data.copy_decl method.
1071 (optimize_inline_calls): Set id.copy_decl.
1072 (clone_body, save_body, unsave_expr_now): Likewise.
1073 (tree_function_versioning): Likewise.
1074 (copy_decl_for_dup_finish): Split out of copy_decl_for_dup.
1075 (copy_decl_to_var, copy_decl_no_change): Likewise.
1076 (copy_decl_maybe_to_var): Likewise.
1077 * tree-inline.h: Include splay-tree.h.
1078 (struct copy_body_data): Move from tree-inline.c. Add copy_decl.
1079 (copy_body_r, insert_decl_map): Declare.
1080 (copy_decl_for_dup): Remove.
1082 2005-10-06 Richard Henderson <rth@redhat.com>
1084 * c-parser.c (c_lex_one_token): Fix CPP_AT_NAME translation
1087 2005-10-01 Richard Henderson <rth@redhat.com>
1089 * tree-inline.c (struct copy_body_data): Rename from inline_data.
1090 Rename callee->src, caller->dst. Remove ipa_info. Replace
1091 cloning_p, saving_p, versioning_p with transform_parm_to_var,
1092 transform_call_graph_edges, transform_new_cfg,
1093 transform_return_to_modify, transform_lang_insert_block. Update
1095 (replace_ref_tree, inlining_p): Remove.
1097 2005-09-29 Richard Henderson <rth@redhat.com>
1099 * omp-low.c (use_pointer_for_field): True for shared variables
1100 with DECL_HAS_VALUE_EXPR_P set.
1102 2005-09-29 Richard Henderson <rth@redhat.com>
1104 * c-decl.c (struct c_scope): Add location.
1105 (define_label): Use lookup_name_no_remap.
1106 (c_omp_remap_decl_1): Add pscope argument. Use it instead of
1107 current_omp_parallel_scope.
1108 (c_omp_remap_decl): Pass it current_omp_parallel_scope.
1109 (maybe_remap_for_omp_parallel): New.
1110 (lookup_name): Use it.
1111 (c_begin_omp_parallel): Initialize location field.
1113 2005-09-29 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
1114 Richard Henderson <rth@redhat.com>
1116 * c-common.c (c_parse_error): Handle CPP_PRAGMA and CPP_PRAGMA_EOL.
1117 * c-common.h (c_begin_omp_parallel, c_finish_omp_parallel): Move ...
1118 * c-tree.h: ... here.
1119 * c-decl.c (c_finish_omp_parallel): Return the statement created.
1120 * c-lex.c (c_lex_with_flags): Smuggle pragma identifier in a tree.
1121 * c-parser.c (c_parse_init): Use cpp_register_deferred_pragma.
1122 (struct c_token): Remove one bit from omp_kind.
1123 (struct c_parser): Add in_pragma.
1124 (c_handle_deferred_pragma): Remove.
1125 (c_lex_omp_pragma): Remove.
1126 (c_lex_one_token): Remove pragma restart hack. Tidy initialization.
1127 Undo pragma identifier smuggling.
1128 (c_parser_peek_2nd_token): Don't look past CPP_PRAGMA_EOL.
1129 (c_parser_consume_token): Don't allow CPP_PRAGMA unless in error
1130 recovery; don't allow CPP_PRAGMA_EOL unless we've escaped in_pragma.
1131 (c_parser_consume_pragma): New.
1132 (c_parser_skip_until_found): Don't skip CPP_PRAGMA_EOL when in_pragma.
1133 (c_parser_skip_to_end_of_parameter): Likewise.
1134 (c_parser_skip_to_end_of_block_or_statement): Likewise.
1135 (c_parser_skip_to_pragma_eol): New.
1136 (curr_clause_set, curr_clause_default): Remove.
1137 (c_parser_pragma): Remove.
1138 (c_parser_declaration_or_fndef): Update threadprivate test.
1139 (c_parser_compound_statement_nostart): Test for EOF last.
1140 Update omp parsing calls.
1141 (c_parser_omp_clause_name): Rename from c_parser_pragma_omp_clause.
1142 (add_new_clause): Remove.
1143 (check_no_duplicate_clause): Pass in clause list.
1144 (c_parser_omp_variable_list): Rename from
1145 c_parser_pragma_omp_variable_list. Pass in list tail, always
1146 return the list head.
1147 (c_parser_omp_var_list_parens, c_parser_omp_clause_copyin,
1148 c_parser_omp_clause_copyprivate, c_parser_omp_clause_default,
1149 c_parser_omp_clause_firstprivate, c_parser_omp_clause_if,
1150 c_parser_omp_clause_lastprivate, c_parser_omp_clause_nowait,
1151 c_parser_omp_clause_num_threads, c_parser_omp_clause_ordered,
1152 c_parser_omp_clause_private, c_parser_omp_clause_reduction,
1153 c_parser_omp_clause_schedule, c_parser_omp_clause_shared): Similarly.
1154 (c_parser_pragma_omp_no_args): Remove.
1155 (c_parser_omp_all_clauses): New.
1156 (c_parser_omp_structured_block): New.
1157 (c_parser_omp_atomic): Rename from c_parser_omp_atomic_expression;
1158 use c_parser_skip_to_pragma_eol.
1159 (c_parser_omp_barrier): New.
1160 (c_parser_omp_critical): New.
1161 (c_parser_omp_flush): Rename from c_parser_pragma_omp_flush;
1162 call c_finish_omp_flush here.
1163 (c_parser_omp_for_loop): Rename from c_parser_omp_for_statement.
1164 (c_parser_omp_for): New.
1165 (c_parser_omp_master): New.
1166 (c_parser_omp_ordered): New.
1167 (c_parser_omp_sections_scope): Rename from c_parser_omp_sections_body.
1168 (c_parser_omp_sections): New.
1169 (c_parser_omp_parallel): New.
1170 (c_parser_omp_single): New.
1171 (c_parser_omp_construct): Rename from c_parser_omp_directive; split
1172 out all the code into new functions; don't use c_parser_pragma.
1173 (c_parser_omp_threadprivate): Rename from
1174 c_parser_pragma_omp_threadprivate; update for pragma parsing changes.
1175 * c-pragma.c (handle_pragma_weak): Add quotes to warning message.
1176 (handle_pragma_redefine_extname): Likewise.
1177 (handle_pragma_extern_prefix): Likewise.
1179 2005-09-28 Jakub Jelinek <jakub@redhat.com>
1181 * tree.def (OMP_SINGLE): Fix a comment typo.
1182 * gimplify.c (gimplify_omp_atomic_pipeline): Fix type of
1183 pointer argument to BUILT_IN_VAL_COMPARE_AND_SWAP_x.
1184 * omp-low.c (setup_data_fields): Remove unused variable.
1186 2005-09-28 Richard Henderson <rth@redhat.com>
1188 * c-decl.c (c_omp_remap_decl_1): Create OMP_CLAUSE_SHARED node here.
1189 (c_finish_omp_parallel): And not here. Chain them in.
1190 * c-omp.c (c_split_parallel_clauses): Rewrite to chain directly
1191 through the clause nodes.
1192 (c_finish_omp_bindings): Similarly.
1193 * c-common.h (c_finish_omp_bindings): Update.
1194 * c-parser.c (add_new_clause): Chain directly through the clauses.
1195 (check_no_duplicate_clause): New.
1196 (c_parser_pragma_omp_variable_list): Take a tree_code and create
1197 clause nodes directly.
1198 (c_parser_pragma_omp_variable_list_parens): New.
1199 (c_parser_pragma_omp_clause_copyin): Use it.
1200 (c_parser_pragma_omp_clause_copyprivate): Likewise.
1201 (c_parser_pragma_omp_clause_firstprivate): Likewise.
1202 (c_parser_pragma_omp_clause_lastprivate): Likewise.
1203 (c_parser_pragma_omp_clause_private): Likewise.
1204 (c_parser_pragma_omp_clause_shared): Likewise.
1205 (c_parser_pragma_omp_clause_if): Use check_no_duplicate_clause.
1206 (c_parser_pragma_omp_clause_nowait): Likewise.
1207 (c_parser_pragma_omp_clause_num_threads): Likewise.
1208 (c_parser_pragma_omp_clause_ordered): Likewise.
1209 (c_parser_pragma_omp_clause_schedule): Likewise.
1210 (c_parser_pragma_omp_clause_reduction): Update for chaining directly
1211 through clauses; tidy error message.
1212 * gimplify.c (gimplify_omp_for): Update for chaining directly
1213 through clauses. Use find_omp_clause.
1214 (gimplify_omp_single_simple): Split out of gimplify_omp_single.
1215 (gimplify_omp_single_copy): Likewise. Update for chaining
1216 directly through clauses. Create BLOCK for stack variable.
1217 * omp-low.c (find_omp_clause): New.
1218 (compute_num_threads): Use it.
1219 (setup_data_fields): Update for chaining directly through clauses.
1220 (setup_decl_value_expr_child): Likewise.
1221 * tree-gimple.h (find_omp_clause): Declare.
1222 * tree-pretty-print.c (op_symbol_1): Split out of op_symbol.
1223 (dump_omp_clauses): New.
1224 (dump_generic_node): Don't handle clause nodes here. Update
1225 omp statements to use dump_omp_clauses.
1226 * tree.def (OMP_CLAUSE_PRIVATE): Use 2 operands.
1227 (OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE): Likewise.
1228 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION): Likewise.
1229 (OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE): Likewise.
1230 * tree.h (OMP_PRIVATE_VARS, OMP_SHARED_VARS, OMP_FIRSTPRIVATE_VARS,
1231 OMP_LASTPRIVATE_VARS, OMP_COPYIN_VARS, OMP_COPYPRIVATE_VARS): Remove.
1232 (OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL, OMP_CLAUSE_INNER_DECL): New.
1233 (OMP_CLAUSE_NUM_THREADS_EXPR): Rename from OMP_NUM_THREADS_EXPR.
1234 (OMP_CLAUSE_IF_EXPR): Rename from OMP_IF_EXPR.
1235 (OMP_CLAUSE_SCHEDULE_CHUNK_EXPR): Rename from
1236 OMP_CLAUSE_SCHEDULE_CHUNK_SIZE.
1238 2005-09-28 Diego Novillo <dnovillo@redhat.com>
1240 * gimplify.c (gimplify_omp_single): Handle by emitting calls
1241 to GOMP_single_* and GOMP_barrier.
1242 * omp-low.c (use_pointer_for_field): Make extern.
1243 * tree-gimple.h (use_pointer_for_field): Declare.
1245 2005-09-27 Richard Henderson <rth@redhat.com>
1247 * c-parser.c: Include rtl.h.
1248 (c_parser_pragma_omp_threadprivate): Update for TREE_PURPOSE change.
1249 Diagnose threadprivate after first use.
1250 * Makefile.in (c-parser.o): Add RTL_H.
1252 2005-09-27 Richard Henderson <rth@redhat.com>
1254 * c-decl.c (lookup_name): Honor omp_remap_private.
1256 2005-09-27 Richard Henderson <rth@redhat.com>
1258 * c-omp.c (c_split_parallel_clauses): Add lastprivate to parallel.
1259 (c_finish_omp_bindings): Check for firstprivate+lastprivate and
1260 do not create two decls.
1261 * gimplify.c (gimplify_omp_reduction): New.
1262 (gimplify_omp_for_lastprivate): New.
1263 (gimplify_omp_for_generic): Use it.
1264 (gimplify_omp_for_static_nochunk): Likewise.
1265 (gimplify_omp_for_static_chunk): Likewise.
1266 (gimplify_omp_for): Emit VAR_INIT and VAR_REDUC.
1267 (gimplify_omp_sections): Likewise.
1268 * omp-low.c (add_omp_data_field): Don't create duplicate fields.
1269 (get_lastprivate_sequence): New.
1270 (lower_omp_parallel): Use it.
1272 2005-09-27 Richard Henderson <rth@redhat.com>
1274 * c-tree.h (check_for_loop_decls): Update decl.
1275 (lookup_name_no_remap, c_omp_remap_private): Declare.
1276 (lookup_name): Move decl ...
1277 * c-common.h (lookup_name): ... here.
1278 (c_begin_omp_parallel, c_finish_omp_parallel): Declare.
1279 (c_omp_sharing_predetermined, c_omp_remap_decl): Declare.
1280 * c-decl.c (struct c_scope): Add outer_omp_parallel, omp_shared,
1281 omp_parallel_body, omp_default_none.
1282 (current_omp_parallel_scope, omp_remap_private): New.
1283 (push_scope): Clear current_omp_parallel_scope on nested function.
1284 (pop_scope): Restore current_omp_parallel_scope.
1285 (c_omp_sharing_implicitly_determined): New.
1286 (c_omp_sharing_predetermined): New.
1287 (c_omp_remap_decl_1, c_omp_remap_decl): New.
1288 (lookup_name_no_remap): Rename from lookup_name.
1290 (check_for_loop_decls): Return a singular decl found.
1291 (c_begin_omp_parallel, c_finish_omp_parallel): New.
1292 (c_omp_remap_private): New.
1293 * c-omp.c (relookup_decls): New.
1294 (c_split_parallel_clauses): Use it.
1295 (c_finish_omp_for): Take decl as argument. Simplify the rest
1296 of the checks based on that. Don't take clauses or process them.
1297 (c_finish_omp_bindings): New.
1298 * c-parser.c (c_lex_one_token): Use lookup_name_no_remap.
1299 (c_parser_declspecs): Likewise.
1300 (curr_clause_default): New.
1301 (c_parser_for_statement): Revert all changes since mainline.
1302 (c_parser_omp_for_statement): New.
1303 (c_parser_omp_sections_body): Return the stmt created.
1304 (c_parser_omp_directive): Use c_begin_omp_parallel,
1305 c_finish_omp_bindings, c_finish_omp_parallel as necessary.
1306 (c_parser_pragma_omp_variable_list): Put parsed expression in
1307 the TREE_PURPOSE of the list.
1308 (c_parser_pragma_omp_clause_default): Implement.
1309 (c_parser_pragma_omp_clause_if): Standardize error text.
1310 (c_parser_pragma_omp_clause_nowait): Likewise.
1311 (c_parser_pragma_omp_clause_num_threads): Likewise.
1312 (c_parser_pragma_omp_clause_ordered): Likewise.
1313 (c_parser_pragma_omp_clause_shared): Likewise. Don't mark
1314 variables addressable here.
1315 (c_parser_pragma_omp_clause_reduction): Implement.
1316 * cgraphunit.c (cgraph_finalize_pending_functions): Gimplify here.
1317 * gimple-low.c (lower_stmt_again): New.
1318 (lower_stmt): Allow OMP_PARALLEL.
1319 * omp-low.c (struct remap_info_d): Remove local_map, omp_fn_list,
1320 omp_data_map, ptr_to_omp_data; add copyin, copyout, omp_data_receive;
1321 rename omp_data to omp_data_send, remove indirection on tsi.
1322 (new_remap_info, delete_remap_info): Update to match.
1323 (create_tmp_var_in): Remove.
1324 (get_omp_data_field_for, get_omp_private_repl,
1325 get_omp_shared_repl, emit_firstprivate_sending_code
1326 emit_firstprivate_receiving_code, get_omp_firstprivate_repl,
1327 emit_lastprivate_receiving_code, emit_lastprivate_sending_code,
1328 get_omp_lastprivate_repl, get_omp_copyin_repl,
1329 get_omp_sharing_replacements, remap_locals_in_child_r,
1330 create_gomp_parallel_start, create_gomp_parallel_end,
1331 convert_to_gimple_val, remap_locals_in_parent_r,
1332 lower_omp_parallel_r): Remove.
1333 (use_pointer_for_field, create_data_decl, recontext_vars_in_block,
1334 split_out_parallel_function, emit_sender_copyin_1, emit_sender_copyin,
1335 emit_sender_copyout_1, emit_sender_copyout, emit_parallel_start_end,
1336 emit_omp_parallel_parent, setup_decl_value_expr_child,
1337 remap_variables_receiver, remap_labels_child_1,
1338 remap_labels_child): New.
1339 (setup_data_fields): Rename from process_omp_clauses.
1340 (create_child_function): Rename from create_omp_fn.
1341 (compute_num_threads): Rename from emit_num_threads_setup_code.
1342 Don't gimplify here.
1343 (lower_omp_parallel): Rewrite.
1345 (lower_omp): Use it.
1346 * tree.def (OMP_PARALLEL): Add var_init and var_reduc operands.
1347 (OMP_FOR): Add var_init, var_last, var_reduc operands.
1348 (OMP_SECTIONS): Likewise.
1349 (OMP_CLAUSE_REDUCTION): Remove second operand.
1350 * tree.h (OMP_PARALLEL_VAR_INIT, OMP_PARALLEL_VAR_REDUC,
1351 OMP_FOR_VAR_INIT, OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
1352 OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST, OMP_SECTIONS_VAR_REDUC,
1353 OMP_CLAUSE_REDUCTION_CODE): New.
1354 (enum omp_clause_default_kind): New.
1356 2005-09-27 Diego Novillo <dnovillo@redhat.com>
1358 * omp-low.c (lower_omp_parallel): Initialize wi.tsi.
1360 2005-09-27 Diego Novillo <dnovillo@redhat.com>
1362 * omp-low.c (emit_firstprivate_receiving_code): Handle cases
1363 where RI_P->OMP_FN consists of a single statement.
1365 2005-09-27 Diego Novillo <dnovillo@redhat.com>
1367 * c-parser.c (c_parser_omp_directive): Handle OMP_SINGLE
1368 * gcc/gimplify.c (gimplify_omp_single): New.
1369 (gimplify_expr): Call it.
1370 * tree-pretty-print.c (dump_generic_node): Handle OMP_SINGLE.
1371 * tree.def (OMP_SINGLE): Add second operand.
1372 * tree.h (OMP_SINGLE_CLAUSES): Define.
1373 (OMP_SINGLE_BODY): Define.
1375 2005-09-27 Diego Novillo <dnovillo@redhat.com>
1377 * omp-low.c (struct remap_info_d): Rename field 'map' to
1378 'local_map'. Update all users.
1379 Remove field 'clauses'.
1380 Add fields 'omp_data_map' and 'omp_fn_list'.
1382 (add_omp_data_field): If VAR was already associated with a
1384 (get_omp_private_repl): Do not set DECL_VALUE_EXPR. Add a
1385 mapping between VAR and its replacement in RI_P->LOCAL_MAP.
1386 (get_omp_shared_repl): Likewise.
1387 (build_remap_info): Remove all arguments. Update users.
1388 Initialize RI_P->OMP_DATA_MAP and RI_P->LOCAL_MAP.
1389 (remap_locals_in_child_r): Do private and shared replacements.
1390 (remap_locals_in_child): Remove. Update all users.
1391 (emit_num_threads_setup_code): Remove argument 'clauses'.
1393 (lower_omp_parallel): Add argument RI_P.
1394 Call process_omp_clauses.
1395 Do not call gimplify_function_tree. Add the function to
1397 Delete RI_P->LOCAL_MAP after the remapping all the locals in
1399 Do not call delete_remap_info.
1400 (lower_omp_in_body): Remove.
1401 (lower_omp_parallel_r): New.
1402 (lower_omp_parallel): Re-organize to support multiple omp
1403 parallel directives. First lower all directives separately,
1404 then remap shared locals in the parent, then layout the
1405 structure used for shared data and then gimplify all the
1406 functions created by the lowering.
1408 2005-09-26 Diego Novillo <dnovillo@redhat.com>
1410 * omp-low.c (pass_lower_omp): Don't claim to destroy
1413 2005-09-26 Diego Novillo <dnovillo@redhat.com>
1415 * Makefile.in (omp-low.o): New.
1416 (OBJS-common): Add it.
1417 * omp-low.c: New file.
1418 Move all the OpenMP lowering code from gimple-low.c.
1420 (gate_lower_omp): New.
1421 (pass_lower_omp): New.
1422 * passes.c (init_optimization_passes): Schedule
1424 * tree-pass.h (PROP_gimple_lomp): Define.
1425 (pass_lower_omp): Declare.
1427 2005-09-26 Jakub Jelinek <jakub@redhat.com>
1429 * varasm.c (assemble_variable): Handle thread-local COMMON data.
1430 * defaults.h (ASM_OUTPUT_TLS_COMMON): Define.
1432 2005-09-26 Diego Novillo <dnovillo@redhat.com>
1434 * Makefile.in (gimple-low.o): Depend on vec.h
1435 * builtins.c (build_string_literal): Make extern.
1436 (expand_builtin_copysign):
1437 * c-parser.c (c_parser_pragma_omp_threadprivate): Mark
1438 threadprivate variables with decl_default_tls_model.
1439 * gimple-low.c: Include vec.h.
1440 (struct remap_info_d): Remove fields data_arg_dest, private,
1441 firstprivate, lastprivate, copyin and copyprivate.
1442 Rename field data_arg_orig to omp_data.
1443 Add fields tsi, ptr_to_omp_data and syms_with_value_expr.
1445 (add_decls_to_set): Remove.
1446 (get_omp_private_ref): Remove.
1447 (get_omp_shared_ref): Remove.
1448 (create_tmp_var_in): New.
1449 (add_omp_data_field): New.
1450 (get_omp_data_field_for): New.
1451 (emit_firstprivate_sending_code): New.
1452 (emit_firstprivate_receiving_code): New.
1453 (get_omp_private_repl): New.
1454 (get_omp_firstprivate_repl): New.
1455 (get_omp_shared_repl): New.
1456 (emit_lastprivate_receiving_code): New.
1457 (emit_lastprivate_sending_code): New.
1458 (get_omp_lastprivate_repl): New.
1459 (get_omp_copyin_repl): New.
1460 (get_omp_sharing_replacements): New.
1461 (process_omp_clauses): Call it.
1462 (remap_locals_in_child_r): Only replace private locals and call
1463 process_omp_clauses for every worksharing construct found.
1464 (remap_locals_in_child): Use walk_stmts to call
1465 remap_locals_in_child_r.
1466 (convert_to_gimple_val): New.
1467 (remap_locals_in_parent_r): New.
1468 (emit_num_threads_setup_code): Remove argument TSI.
1469 (lower_omp_parallel): After remapping locals in child
1470 function, clear out DECL_VALUE_EXPR from every processed
1472 Call walk_stmts with remap_locals_in_parent_r.
1473 * tree-gimple.h (insert_field_into_struct): Declare.
1474 (struct walk_stmt_info): Move from tree-nested.c
1475 (walk_stmts): Declare.
1476 * tree-nested.c (insert_field_into_struct): Make extern.
1477 (struct walk_stmt_info): Move to tree-gimple.h.
1478 (walk_stmts): Make extern.
1479 * tree.h (build_string_literal): Declare.
1481 2005-09-25 Richard Henderson <rth@redhat.com>
1483 * gimplify.c (gimplify_omp_for_generic): Tidy commentary.
1484 (gimplify_omp_for_static_nochunk, gimplify_omp_for_static_chunk): New.
1485 (gimplify_omp_for): Use them.
1487 2005-09-25 Richard Henderson <rth@redhat.com>
1489 * c-common.h (c_split_parallel_clauses): Declare.
1490 * c-omp.c (c_split_parallel_clauses): New.
1491 * c-parser.c (c_parser_omp_directive): Split PRAGMA_OMP_PARALLEL_FOR
1492 and PRAGMA_OMP_PARALLEL_SECTIONS into separate OMP_PARALLEL and
1493 work-sharing constructs.
1495 * tree.h (OMP_SECTION_BODY): New.
1496 * gimplify.c (gimplify_omp_section): Use it.
1497 * tree-pretty-print.c (dump_generic_node): Handle OMP_SECTIONS
1500 2005-09-25 Richard Henderson <rth@redhat.com>
1502 * builtin-types.def (BT_FN_UINT_UINT): New.
1503 (BT_FN_VOID_UINT_UINT): Remove.
1504 * omp-builtins.def (BUILT_IN_GOMP_SECTIONS_START): Use BT_FN_UINT_UINT.
1506 * c-parser.c (c_parser_pragma_omp_section): Remove.
1507 (c_parse_init): Use c_parser_pragma_omp_no_args instead.
1508 (c_parser_section_scope): Remove.
1509 (c_parser_omp_sections_body): New.
1510 (c_parser_omp_directive): Use it.
1511 (c_parser_pragma_omp_parallel_for): Remove inline marker.
1512 (c_parser_pragma_omp_parallel_sections): Likewise.
1513 * gimplify.c (gimplify_omp_sections, gimplify_omp_section): New.
1514 (gimplify_expr): Use them.
1516 2005-09-25 Richard Henderson <rth@redhat.com>
1518 * c-parser.c (c_parser_pragma_omp_clause_nowait): Check for
1520 (c_parser_pragma_omp_clause_ordered): Implement.
1521 (c_parser_pragma_omp_clause_schedule): Implement.
1522 * tree.def (OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE): New.
1523 * gimplify.c (gimplify_omp_for): Handle them.
1524 * tree-pretty-print.c (dump_generic_node): Likewise.
1525 * tree.h (OMP_CLAUSE_SCHEDULE_CHUNK_SIZE): New.
1526 (enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New.
1528 2005-09-24 Richard Henderson <rth@redhat.com>
1530 * c-parser.c (c_parser_for_statement): Don't emit the init expr
1532 * gimple-low.c (lower_function_body): Clear data.
1533 (emit_num_threads_setup_code): Fix num_threads logic when
1534 if clause present and num_threads clause absent.
1535 (emit_omp_for_static, lower_omp_for): Remove.
1536 (lower_stmt): Don't call it.
1537 * gimplify.c (struct gimplify_ctx): Add omp_for_istart, omp_for_iend.
1538 (gimplify_omp_for_generic): New.
1539 (gimplify_omp_for): Extract all parameters, and expand the loop.
1540 * omp-builtins.def (BUILT_IN_OMP_GET_NUM_THREADS): New.
1542 2005-09-24 Richard Henderson <rth@redhat.com>
1544 * Makefile.in (c-omp.o): Remove C_TREE_H.
1545 * c-tree.h (build_indirect_ref, build_modify_expr): Move ...
1546 * c-common.h: ... here.
1547 * c-omp.c: Don't include c-tree.h.
1548 (c_finish_omp_atomic): Create an OMP_ATOMIC node.
1549 * gimplify.c (goa_lhs_expr_p, gimplify_omp_atomic_fetch_op,
1550 goa_stabilize_expr, gimplify_omp_atomic_pipeline): New.
1551 (gimplify_omp_atomic): New.
1552 (gimplify_expr): Call it.
1553 * tree-pretty-print.c (dump_generic_node): Handle OMP_ATOMIC.
1554 * tree.def (OMP_ATOMIC): New.
1556 2005-09-24 Richard Henderson <rth@redhat.com>
1558 * c-parser.c (c_parser_pragma_omp_clause): Tidy.
1559 (c_parser_pragma_omp_clause_num_threads): Warn for not positive.
1560 * gimple-low.c (emit_num_threads_setup_code): Fix type problems
1561 with num_threads computation.
1563 2005-09-24 Jakub Jelinek <jakub@redhat.com>
1565 * builtins.def: Update DEF_BUILTIN comment to include COND argument.
1566 Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins
1567 into separate files.
1568 * sync-builtins.def: New file, moved from builtins.def.
1569 * omp-builtins.def: New file, moved from builtins.def.
1570 * builtin-types.def (DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7,
1571 DEF_FUNCTION_TYPE_VAR_4): Document.
1572 * Makefile.in (BUILTINS_DEF): New variable.
1573 (TREE_H, c-common.o, builtins.o): Use it instead of builtins.def.
1575 2005-09-23 Richard Henderson <rth@redhat.com>
1577 * c-omp.c (c_finish_omp_critical): Move implementation ...
1578 * gimplify.c (gimplify_omp_critical): ... here.
1579 (gimplify_expr): Call it.
1580 (critical_name_mutexes): New.
1581 * tree-pretty-print.c (dump_generic_node): Handle OMP_CRITICAL.
1582 * tree.def (OMP_MASTER, OMP_BARRIER, OMP_ORDERED): Remove.
1583 (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS, OMP_SECTION,
1584 OMP_SINGLE, OMP_CRITICAL): Change to tcc_statement; update operand
1586 * tree.h (OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New.
1588 2005-09-23 Diego Novillo <dnovillo@redhat.com>
1590 * tree.def (OMP_CLAUSE_NOWAIT): Define.
1591 * tree-pretty-print.c (dump_generic_node): Handle.
1592 * c-parser.c (c_parser_pragma_omp_clause_nowait): Generate.
1593 * gimple-low.c (lower_omp_for): If nowait has not been
1594 specified, emit a barrier at the end of the parallel loop.
1596 2005-09-23 Diego Novillo <dnovillo@redhat.com>
1598 * c-common.h (c_finish_omp_for): Declare
1599 * c-omp.c (c_finish_omp_for): Rename from c_finish_gomp_for
1601 * c-typeck.c (c_finish_gomp_for): ... here.
1602 * c-tree.h (c_finish_gomp_for): Remove.
1603 * gimple-low.c: Rename gomp_* symbols into omp_*.
1605 * gimplify.c: Likewise.
1606 * tree.def: Rename GOMP_* tree codes to OMP_*.
1610 2005-09-23 Diego Novillo <dnovillo@redhat.com>
1612 Mainline merge (gomp-merge-20050923)
1614 2005-09-23 Diego Novillo <dnovillo@redhat.com>
1616 * c-parser.c (c_parser_pragma_omp_clause): Fix dangling if().
1617 (c_parser_pragma_omp_clause_if): Remove printf.
1618 Check that only one clause 'if' is specified.
1619 Call add_new_clause.
1620 (c_parser_pragma_omp_clause_num_threads): Remove printf.
1621 Check that only one clause 'num_threads' is specified.
1622 Call add_new_clause.
1623 * gimple-low.c (emit_num_threads_setup_code): New.
1624 (lower_gomp_parallel): Call it.
1625 Add new argument DATA. Modify all callers.
1626 * tree-pretty-print.c (dump_generic_node): Handle
1627 GOMP_CLAUSE_IF and GOMP_CLAUSE_NUM_THREADS.
1628 * tree.def (GOMP_CLAUSE_IF, GOMP_CLAUSE_NUM_THREADS): Define.
1629 * tree.h (GOMP_IF_EXPR, GOMP_NUM_THREADS_EXPR): Define.
1631 2005-09-22 Richard Henderson <rth@redhat.com>
1633 * c-parser.c (c_parse_init): Tableize the omp pragmas; register
1634 them with expansion.
1635 (c_handle_deferred_pragma): Split out of ...
1636 (c_parser_pragma): ... here.
1637 (c_lex_omp_pragma): Split out of ...
1638 (c_lex_one_token): ... here. Consume non-omp pragmas immediately.
1640 2005-09-22 Richard Henderson <rth@redhat.com>
1642 * Makefile.in (c-omp.o): Depend on C_TREE_H.
1643 * c-parser.c (c_parser_omp_atomic_expression): Handle error_mark
1644 from initial unary expression. Move conversion code ...
1645 * c-omp.c (c_finish_omp_atomic): ... here. Handle pointers and
1647 * c-typeck.c (build_unary_op): Return error_mark after reporting
1649 (build_modify_expr): Likewise.
1651 2005-09-22 Richard Henderson <rth@redhat.com>
1653 * c-parser.c (omp_clauses_stack): Remove.
1654 (push_omp_clauses, pop_omp_clauses): Remove.
1655 (c_parser_for_statement): New parameter omp_clauses; pass it on to
1656 the GOMP_FOR instead of pop_omp_clauses.
1657 (c_parser_omp_directive): Save curr_clause_set after parsing the
1658 pragma. Pass it on as appropriate.
1659 (c_parser_pragma_omp_critical): Don't clear curr_clause_set.
1660 (c_parser_pragma_omp_for): Don't call push_omp_clauses.
1661 (c_parser_pragma_omp_parallel, c_parser_pragma_omp_sections,
1662 c_parser_pragma_omp_single): Likewise.
1664 2005-09-22 Richard Henderson <rth@redhat.com>
1666 * c-common.c (sync_resolve_return): Convert to the main variant.
1667 * c-tree.h (pushdecl): Move decl ...
1668 * c-common.h (pushdecl): ... here.
1669 (c_finish_omp_atomic): Update decl.
1670 * c-omp.c (c_finish_omp_atomic): Take code, lhs, rhs separately;
1671 delete code to extract them. Use TYPE_MAIN_VARIANT. Return early
1672 if lhs is not addressable. Push new decls into current binding.
1673 Use build_binary_op.
1674 * c-parser.c (c_parser_pragma): Reset parser->error.
1675 (c_parser_compound_statement_nostart): Reinstate special case for
1676 barrier and flush. Move parsing of these directives here.
1677 (c_parser_section_scope): Fix quoting in error message.
1678 (c_parser_omp_atomic_expression): New.
1679 (c_parser_omp_directive): Use it. Error on barrier or flush.
1680 (c_parser_pragma_omp_critical): Tighten error corner cases.
1681 (c_parser_pragma_omp_flush): Likewise.
1683 2005-09-22 Diego Novillo <dnovillo@redhat.com>
1685 * c-typeck.c (c_finish_gomp_for): Update OpenMP spec version.
1687 2005-09-22 Diego Novillo <dnovillo@redhat.com>
1689 * gimple-low.c (process_gomp_clauses): Extract from ...
1690 (build_remap_info): ... here.
1691 (get_gomp_private_ref): Do not call copy_decl_for_dup.
1692 Set DECL_NAME of replacement to that of the original.
1693 (remap_locals_r): Temporarily treat local variables as private
1694 if they are not in any other clause.
1695 Prevent walking into the expression that replaces a mapped
1697 Call process_gomp_clauses on GOMP_PARALLEL, GOMP_FOR and
1699 (remap_locals): Remove arguments GOMP_FN and CLAUSEs.
1700 Add arguments BODY_P and RI_P.
1701 Call process_gomp_clauses.
1702 Call walk_tree on BODY_P.
1703 Do not return anything.
1705 (lower_gomp_parallel): Call build_remap_info.
1706 (lower_gomp_for): Do not call remap_locals.
1707 Do not call emit_gomp_data_setup_code.
1709 * tree.h (GOMP_SECTIONS_CLAUSES): Define.
1710 (GOMP_SECTIONS_BODY): Define.
1712 2005-09-22 Diego Novillo <dnovillo@redhat.com>
1714 * c-tree.h (c_finish_gomp_for): Declare
1715 * c-typeck.c (c_finish_gomp_for): New.
1716 * c-parser.c (c_parser_for_statement): Call it. If the
1717 parallel loop was malformed, call c_finish_loop to emit a
1720 2005-09-22 Diego Novillo <dnovillo@redhat.com>
1722 * version.c: Update last merge date.
1724 2005-09-21 Richard Henderson <rth@redhat.com>
1726 * c-lex.c (c_lex_with_flags) <CPP_PRAGMA>: Set input_location.
1728 2005-09-21 Richard Henderson <rth@redhat.com>
1730 * c-omp.c: New file.
1731 * Makefile.in (c-omp.o): New.
1732 * builtin-types.def (BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT,
1733 BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR, BT_FN_VOID_UINT_UINT,
1734 BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT,
1735 BT_FN_VOID_OMPFN_PTR_UINT_UINT,
1736 BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
1737 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
1738 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
1739 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New.
1740 * builtins.def (DEF_GOMP_BUILTIN): New.
1741 (BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER,
1742 BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END,
1743 BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END,
1744 BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START,
1745 BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START,
1746 BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
1747 BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
1748 BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
1749 BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
1750 BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT,
1751 BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT,
1752 BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
1753 BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
1754 BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
1755 BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
1756 BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
1757 BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
1758 BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
1759 BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
1760 BUILT_IN_GOMP_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT,
1761 BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END,
1762 BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
1763 BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT,
1764 BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END,
1765 BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START,
1766 BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New.
1767 * c-common.c (DEF_FUNCTION_TYPE_7): New.
1768 * c-tree.h (pushdecl_top_level): Move declaration ...
1769 * c-common.h (pushdecl_top_level): ... here.
1770 (c_finish_omp_master, c_finish_omp_critical, c_finish_omp_ordered,
1771 c_finish_omp_barrier, c_finish_omp_atomic, c_finish_omp_flush): Declare.
1772 * c-parser.c (c_parser_compound_statement_nostart): Don't special
1773 case omp barrier or omp flush.
1774 (c_parser_omp_directive): Implement master, critical, orered,
1775 barrier, atomic, flush.
1776 (c_parser_pragma_omp_no_args): New.
1777 (c_parser_pragma_omp_critical): Remove printf debugging.
1778 (c_parser_pragma_omp_flush): Likewise.
1779 (c_parser_pragma_omp_atomic, c_parser_pragma_omp_barrier,
1780 c_parser_pragma_omp_master, c_parser_pragma_omp_ordered): Remove.
1782 2005-09-21 Jakub Jelinek <jakub@redhat.com>
1784 * c-parser.c (c_parse_init): Don't register OpenMP pragmas
1785 if flag_preprocess_only.
1787 2005-09-21 Richard Henderson <rth@redhat.com>
1789 * cgraph.c (cgraph_analyze_queue): New.
1790 (cgraph_add_new_function): Do nothing but add the decl to this list.
1791 * cgraph.h (cgraph_analyze_queue): Declare.
1792 (cgraph_lower_function): Remove.
1793 * cgraphunit.c (cgraph_lower_function): Make static.
1794 (cgraph_finalize_pending_functions): New.
1795 (cgraph_finalize_function): Call it.
1796 (cgraph_finalize_compilation_unit): Likewise.
1797 * gimple-low.c (lower_gomp_parallel): Call gimplify_function_tree.
1799 2005-09-20 Diego Novillo <dnovillo@redhat.com>
1801 * gimple-low.c (lower_gomp_parallel): Use a NULL argument if
1802 there is no shared data to send to the child thread.
1804 2005-09-20 Diego Novillo <dnovillo@redhat.com>
1806 * Makefile.in (c-parser.o): Depend on vec.h.
1807 (gimple-low.o): Depend on $(SPLAY_TREE_H)
1808 * c-parser.c: Include vec.h.
1809 (curr_clause_set, omp_clauses_stack): New locals.
1810 (omp_clauses): Remove. Adjust all callers.
1811 (push_omp_clauses, pop_omp_clauses, add_new_clause): New.
1812 (c_parser_for_statement): Add new argument IS_OMP_FOR.
1813 If true, emit a GOMP_FOR tree.
1815 (c_parser_omp_directive): Call pop_omp_clauses.
1816 (c_parser_pragma_omp_clause_copyin): Call add_new_clause.
1817 Don't return anything. Adjust callers.
1818 (c_parser_pragma_omp_clause_firstprivate): Call add_new_clause.
1819 (c_parser_pragma_omp_clause_lastprivate): Likewise.
1820 (c_parser_pragma_omp_clause_private): Likewise.
1821 (c_parser_pragma_omp_clause_shared): Likewise.
1822 Mark all shared variables addressable.
1823 (c_parser_pragma_omp_for): Call push_omp_clauses.
1824 (c_parser_pragma_omp_parallel_for): Remove printf.
1825 (c_parser_pragma_omp_for): Call push_omp_clauses
1826 (c_parser_pragma_omp_parallel_sections): Remove printf.
1827 (c_parser_pragma_omp_parallel): Call push_omp_clauses.
1828 (c_parser_pragma_omp_sections): Remove printf.
1829 Call push_omp_clauses.
1830 (c_parser_pragma_omp_single): Remove printf.
1831 Call push_omp_clauses.
1832 * cgraph.c (cgraph_add_new_function): Assume that FNDECL
1833 already has a struct function associated.
1834 * gimple-low.c: Include splay-tree.h
1835 (struct remap_info_d, add_decls_to_set, build_remap_info,
1836 remap_locals_r): Move from tree-inline.c.
1837 (delete_remap_info, get_gomp_private_ref, get_gomp_shared_ref,
1839 (create_gomp_fn): Set DECL_ARG_TYPE and TREE_USED on
1841 (emit_gomp_data_setup_code): New.
1842 (lower_gomp_parallel): Rename from lower_gomp_expr.
1843 Allocate the function structure before calling remap_locals.
1844 Call emit_gomp_data_setup_code.
1845 Call delete_remap_info.
1846 (emit_gomp_for_static): New.
1847 (lower_gomp_for): New.
1848 (lower_stmt): Handle GOMP_FOR.
1849 * gimplify.c (gimplify_gomp_for): New.
1850 (gimplify_expr): Handle GOMP_FOR with a call to
1852 * tree-gimple.c (is_gimple_stmt): Handle GOMP_FOR.
1853 * tree-inline.c (remap_locals_d, add_decls_to_set,
1854 build_remap_info, remap_locals_r): Move to gimple-low.c.
1855 (remap_locals_in_gomp_body, move_decl_to): Remove.
1856 * tree-inline.h (remap_locals_in_gomp_body): Remove.
1857 * tree-pretty-print.c (dump_generic_node): Handle GOMP_FOR,
1858 GOMP_CLAUSE_SHARED, GOMP_CLAUSE_FIRSTPRIVATE,
1859 GOMP_CLAUSE_LASTPRIVATE, GOMP_CLAUSE_COPYIN,
1860 GOMP_CLAUSE_COPYPRIVATE.
1861 Adjust output for GOMP_PARALLEL.
1862 * tree.c (build5_stat): New.
1863 * tree.def (GOMP_FOR): Add operand GOMP_FOR_COND.
1864 * tree.h (GOMP_FOR_CLAUSES, GOMP_FOR_INIT, GOMP_FOR_CODN,
1865 GOMP_FOR_INCR, GOMP_FOR_BODY, GOMP_SHARED_VARS,
1866 GOMP_FIRSTPRIVATE_VARS, GOMP_LASTPRIVATE_VARS,
1867 GOMP_COPYIN_VARS, GOMP_COPYPRIVATE_VARS): Define.
1868 (build5_stat, build5): Declare.
1870 2005-09-20 Jakub Jelinek <jakub@redhat.com>
1872 * c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP
1875 2005-09-14 Diego Novillo <dnovillo@redhat.com>
1877 Mainline merge (gomp-merge-20050914)
1879 2005-09-01 Diego Novillo <dnovillo@redhat.com>
1881 Mainline merge (gomp-merge-20050901)
1883 2005-08-03 Diego Novillo <dnovillo@redhat.com>
1885 * cgraph.c (cgraph_add_new_function): When unit at a time is
1886 disabled, just add the new function to the graph and mark it
1888 * gimple-low.c (struct remap_locals_d, add_decls_to_set,
1889 build_remap_info, remap_locals_r, remap_locals_in_gomp_body):
1891 * tree-inline.c: ... here.
1892 (move_decl_to): New local function.
1893 (remap_locals_r): Call it.
1894 * tree-inline.h (remap_locals_in_gomp_body): Declare.
1896 2005-08-01 Diego Novillo <dnovillo@redhat.com>
1898 * gimple-low.c (create_gomp_fn): Call create_tmp_var_name to
1899 create a new function name.
1900 (create_gomp_parallel_start): Fix contexts for block vars and
1902 (lower_gomp_expr): Fix type of first argument in call to
1903 GOMP_parallel_start.
1905 2005-07-28 Diego Novillo <dnovillo@redhat.com>
1909 2005-07-13 Diego Novillo <dnovillo@redhat.com>
1911 * gimplify.c (gimplify_gomp_parallel): Really remove.
1913 2005-07-13 Diego Novillo <dnovillo@redhat.com>
1915 * cgraph.c (cgraph_add_new_function): New.
1916 * cgraph.h (cgraph_add_new_function): Declare.
1917 * gimple-low.c (struct remap_locals_d): Declare.
1918 (add_decls_to_set): New.
1919 (build_remap_info): New.
1920 (remap_locals_r): New.
1921 (remap_locals_in_gomp_body): New.
1922 (create_gomp_fn): New.
1923 (create_gomp_parallel_start): New.
1924 (create_gomp_parallel_end): New.
1925 (lower_gomp_expr): New.
1926 (lower_stmt): Call it.
1927 * gimplify.c (gimplify_gomp_parallel): Remove.
1928 (gimplify_expr): Don't gimplify GOMP_PARALLEL.
1929 * tree-gimple.c (is_gimple_stmt): Consider GOMP_PARALLEL
1931 * tree.def (GOMP_CLAUSE_SHARED, GOMP_CLAUSE_FIRSTPRIVATE,
1932 GOMP_CLAUSE_LASTPRIVATE, GOMP_CLAUSE_REDUCTION,
1933 GOMP_CLAUSE_COPYPRIVATE,): Define.
1935 2005-06-13 Diego Novillo <dnovillo@redhat.com>
1937 * c-parser.c: Re-order and re-format OpenMP parsing helpers.
1938 (c_lex_one_token): Fix typo in comment.
1939 (c_parser_omp_directive): Emit GOMP_PARALLEL.
1940 (c_parser_pragma_omp_variable_list): Return TREE_LIST of VAR_DECLs.
1941 (c_parser_pragma_omp_clause_copyin): Return list of copyin variables.
1942 (c_parser_pragma_omp_clause_private): Likewise.
1943 * gimplify.c (gimplify_gomp_parallel): New.
1944 (gimplify_expr): Handle GOMP_PARALLEL.
1945 * tree-pretty-print.c (dumping_stmts): Remove.
1947 (dump_generic_node): Handle GOMP_PARALLEL and GOMP_CLAUSE_PRIVATE.
1948 * tree.def (GOMP_CLAUSE_COPYIN, GOMP_CLAUSE_PRIVATE): Define.
1949 * tree.h (GOMP_PARALLEL_CLAUSES, GOMP_PARALLEL_BODY,
1950 GOMP_PRIVATE_VARS): Define.
1952 2005-06-13 Diego Novillo <dnovillo@redhat.com>
1954 * tree.def (GOMP_PARALLEL, GOMP_FOR, GOMP_SECTIONS,
1955 GOMP_SECTION, GOMP_SINGLE, GOMP_MASTER, GOMP_CRITICAL,
1956 GOMP_BARRIER, GOMP_ORDERED): Define.
1958 2005-06-13 Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
1960 * c.opt (fopenmp): New flag.
1961 * c-parser.c (c_parse_init): Initialize OpenMP pragmas.
1962 (pragma_omp_kind, pragma_omp_clause): Declare.
1963 (c_token): Add omp_kind field.
1964 (c_lex_one_token): Handle CPP_PRAGMA.
1965 (c_token_starts_declspecs): Handle PRAGMA_OMP_THREADPRIVATE.
1966 (c_parser_declaration_or_fndef): Update comment, handle
1967 PRAGMA_OMP_THREADPRIVATE.
1968 (c_parser_compound_statement, c_parser_statement): Update comment.
1969 (c_parser_compound_statement_nostart): Handler PRAGMA_OMP_BARRIER
1970 and PRAGMA_OMP_FLUSH.
1971 (c_parser_statement_after_labels): Handle OpenMP pragmas.
1972 (c_parser_section_scope, c_parser_pragma,
1973 c_parser_pragma_omp_atomic, c_parser_pragma_omp_barrier,
1974 c_parser_pragma_omp_critical, c_parser_pragma_omp_flush,
1975 c_parser_pragma_omp_for, c_parser_pragma_omp_master,
1976 c_parser_pragma_omp_master, c_parser_pragma_omp_ordered,
1977 c_parser_pragma_omp_parallel,
1978 c_parser_pragma_omp_parallel_for,
1979 c_parser_pragma_omp_parallel_sections,
1980 c_parser_pragma_omp_section,
1981 c_parser_pragma_omp_sections, c_parser_pragma_omp_single,
1982 c_parser_pragma_omp_threadprivate,
1983 c_parser_pragma_omp_clause,
1984 c_parser_pragma_omp_variable_list,
1985 c_parser_pragma_omp_clause_copyin,
1986 c_parser_pragma_omp_clause_copyprivate,
1987 c_parser_pragma_omp_clause_default,
1988 c_parser_pragma_omp_clause_firstprivate,
1989 c_parser_pragma_omp_clause_if,
1990 c_parser_pragma_omp_clause_lastprivate,
1991 c_parser_pragma_omp_clause_nowait,
1992 c_parser_pragma_omp_clause_num_threads,
1993 c_parser_pragma_omp_clause_ordered,
1994 c_parser_pragma_omp_clause_private,
1995 c_parser_pragma_omp_clause_reduction,
1996 c_parser_pragma_omp_clause_schedule,
1997 c_parser_pragma_omp_clause_shared): New.