Commit Graph

57 Commits

Author SHA1 Message Date
Jan Hubicka f40751dd34 fwprop.c (should_replace_address): Add speed attribute.
* fwprop.c (should_replace_address): Add speed attribute.
	(PR_OPTIMIZE_FOR_SPEED): New flag.
	(propagate_rtx_1): Use it.
	(propagate_rtx): Set it.
	(try_fwprop_subst): Update call of rtx_costs.
	(forward_propagate_and_simplify): LIkewise.
	* hooks.c (hook_int_rtx_bool_0): New
	(hook_bool_rtx_int_int_intp_false): Replace by ...
	(hook_bool_rtx_int_int_intp_bool_false): .. thisone.
	* hooks.h (hook_int_rtx_bool_0): New
	(hook_bool_rtx_int_int_intp_false): Replace by ...
	(hook_bool_rtx_int_int_intp_bool_false): .. thisone.
	* optabs.c (avoid_expensive_constant): UPdate call of rtx_cost.
	(prepare_cmp_insn): UPdate call of rtx_cost.
	* postreload.c (reload_cse_simplify_set): Update call of rtx_cost.
	(reload_cse_simplify_operands): Update call of rtx_cost.
	(reload_cse_move2add): call of rtx_cost.
	* target.h (struct gcc_target): Update rtx_costs and address_costs.
	* rtlanal.c (rtx_cost): Add speed argument.
	(address_cost): Add speed argument
	(default_address_cost): Likewise.
	(insn_rtx_cost): Likewise.
	* cfgloopanal.c (seq_cost): Add speed argument.
	(target_reg_cost, target_spill_cost): Turn to array.
	(init_set_costs): Update for speed.
	(estimate_reg_pressure_cost): Add speed argument.
	* auto-inc-dec.c (attempt_change): Update call of rtx_cost.
	* dojump.c (prefer_and_bit_test): UPdate call of rtx_cost.
	* tree-ssa-loop-ivopts.c (struct ivopts_data): New field speed.
	(seq_cost): Add speed argument.
	(computation_cost): Add speed arugment.
	(add_cost, multiply_by_const, get_address_cost): add speed argument.
	(force_expr_to_var_cost): Update for profile info.
	(force_var_cost): Likewise.
	(split_address_cost): Likewise.
	(ptr_difference_cost): Likewise.
	(difference_cost): Likewise.
	(get_computation_cost_at): Likewise.
	(determine_iv_cost): Likewise.
	(ivopts_global_cost_for_size): Likewise.
	(rewrite_use_address): Likewise.
	(tree_ssa_iv_optimize_loop): Initialize speed field.
	* cse.c (optimize_this_for_speed_p): New static var.
	(notreg_cost): Update call of rtx_cost.
	(cse_extended_basic_block): set optimize_this_for_speed_p.
	* ifcvt.c (cheap_bb_rtx_cost_p): Update call of rtx_cost.
	(noce_try_cmove_arith): Likewise.
	(noce_try_sign_mask): LIkewise.
	* expr.c (compress_float_constant): Update rtx_cost calls.
	* tree-ssa-address.c (most_expensive_mult_to_index): Add speed argument.
	(addr_to_parts): Likewise.
	(create_mem_ref): Likewise.
	* dse.c (find_shift_sequence): Add speed argument.
	(replace_read): Update call.
	* calls.c (precompute_register_parameters): Update call of rtx_cost.
	* expmed.c (sdiv_pow2_cheap, smod_pow2_cheap, zero_cost, add_cost,
	* neg_cost, shift_cost, shiftadd_cost,
	shiftsub_cost, mul_cost, sdiv_cost, udiv_cost ,mul_widen_cost,
	mul_highpart_cost): Increase dimension.
	(init_expmed): Initialize for both size and speed.
	(expand_shift): Use profile.
	(synth_mult): Use profile.
	(choose_mult_variant): Use profile.
	(expand_mult): Use profile.
	(expand_mult_highpart_optab): Use profile.
	(expand_mult_highpart): Use profile.
	(expand_smod_pow2): Use profile.
	(expand_divmod): Use profile.
	* simplify-rtx.c (simplify_binary_operation_1): Update call of rtx_cost.
	* loop-invariant.c (create_new_invariant): Use profile.
	(gain_for_invariant): Add speed parameter.
	(best_gain_for_invariant): Likewise.
	(find_invariants_to_move): Likewise.
	(move_single_loop_invariants): Set it.
	* target-def.h (TARGET_RTX_COSTS): Use hook.
	* rtl.h (rtx_cost, address_cost, insn_rtx_cost): Update prototpe.
	(optimize_insn_for_size_p, optimize_insn_for_speed_p): Declare.
	* output.h (default_address_cost): Update prototype.
	* combine.c (optimize_this_for_speed_p): New static var.
	(combine_validate_cost): Update call of rtx_cost.
	(combine_instructions): Set optimize_this_for_speed_p.
	(expand_compound_operation): Update call of rtx_cost.
	(make_extraction):Update call of rtx_cost.
	(force_to_mode):Update call of rtx_cost.
	(distribute_and_simplify_rtx):Update call of rtx_cost.
	* cfgloop.h (target_reg_cost, target_spill_cost): Turn to array.
	(estimate_reg_pressure_cost): Update prototype.
	* tree-flow.h (multiply_by_cost, create_mem_ref): Update prototype.
	* basic-block.h (optimize_insn_for_size_p, optimize_insn_for_speed_p):
	Remove.
	* config/alpha/alpha.c (alpha_rtx_costs): Update.
	(alpha_rtx_costs): Update.
	* config/frv/frv.c (frv_rtx_costs): Update.
	* config/s390/s390.c (s390_rtx_costs): Update.
	* config/m32c/m32c.c (m32c_memory_move_cost): Update.
	(m32c_rtx_costs): Update.
	* config/spu/spu.c (TARGET_ADDRESS_COST): Upate.
	(spu_rtx_costs): Update.
	* config/sparc/sparc.c (sparc_rtx_costs): Update.
	* config/m32r/m32r.c (m32r_rtx_costs): Update.
	* config/i386/i386.c (:ix86_address_cost): Update.
	(ix86_rtx_costs): Update.
	* config/sh/sh.c (sh_rtx_costs, sh_address_cost): Update.
	* config/pdp11/pdp11.c (pdp11_rtx_costs): Update.
	* config/avr/avr.c (avr_rtx_costs, avr_address_cost): Update.
	* config/crx/crx.c (crx_address_cost): Update.
	* config/xtensa/xtensa.c (xtensa_rtx_costs): Update.
	* config/stormy16/stormy16.c
	(xstormy16_address_cost, xstormy16_rtx_costs): Update.
	* config/m68hc11/m68hc11.c
	(m68hc11_address_cost, m68hc11_rtx_costs): Update.
	* config/cris/cris.c (cris_rtx_costs, cris_address_cost): Update.
	* config/iq2000/iq2000.c (iq2000_rtx_costs, iq2000_address_cost): Update.
	* config/mn10300/mn10300.c (mn10300_address_cost, mn10300_rtx_costs): Update
	* config/ia64/ia64.c (ia64_rtx_costs): Update.
	* config/m68k/m68k.c (m68k_rtx_costs): Update.
	* config/rs6000/rs6000.c (rs6000_rtx_costs): Update.
	* config/arc/arc.c (arc_rtx_costs, arc_address_cost): Update.
	* config/mcore/mcore.c (TARGET_ADDRESS_COST): Update.
	(mcore_rtx_costs): update.
	* config/score/score3.c (score3_rtx_costs): Update.
	* config/score/score7.c (score7_rtx_costs): Update.
	* config/score/score3.h (score3_rtx_costs):Update.
	* config/score/score7.h (score7_rtx_costs): Update.
	* config/score/score.c (score_rtx_costs): Update.
	* config/arm/arm.c (arm_address_cost): Update.
	(arm_rtx_costs_1): Update.
	(arm_rtx_costs_1): Update.
	(arm_size_rtx_costs): Update.
	(arm_size_rtx_costs): Update.
	(arm_size_rtx_costs): Update.
	(arm_xscale_rtx_costs): Update.
	(arm_thumb_address_cost): Update.
	* config/pa/pa.c (hppa_address_cost): Update.
	* config/mips/mips.c (mips_rtx_costs): Update.
	* config/vax/vax.c (vax_address_cost): Update.
	* config/h8300/h8300.c (h8300_shift_costs): Update.
	(h8300_rtx_costs): Update.
	* config/v850/v850.c (TARGET_ADDRESS_COST): Update.
	(v850_rtx_costs): Update.
	* config/mmix/mmix.c (mmix_rtx_costs, mmix_rtx_costs): Update.
	* config/bfin/bfin.c
	(bfin_address_cost): Update.
	(bfin_rtx_costs): Update.
	* stmt.c (lshift_cheap_p): Update.

From-SVN: r139821
2008-08-31 09:44:25 +00:00
Jakub Jelinek a68ab35173 c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to 200805.
* c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP value to
	200805.
	* langhooks.h (struct lang_hooks_for_decls): Add omp_finish_clause.
	Add omp_private_outer_ref hook, add another argument to
	omp_clause_default_ctor hook.
	* langhooks-def.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
	(LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
	(LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Change to
	hook_tree_tree_tree_tree_null.
	(LANG_HOOKS_DECLS): Add LANG_HOOKS_OMP_FINISH_CLAUSE and
	LANG_HOOKS_OMP_PRIVATE_OUTER_REF.
	* hooks.c (hook_tree_tree_tree_tree_null): New function.
	* hooks.h (hook_tree_tree_tree_tree_null): New prototype.
	* tree.def (OMP_TASK): New tree code.
	* tree.h (OMP_TASK_COPYFN, OMP_TASK_ARG_SIZE, OMP_TASK_ARG_ALIGN,
	OMP_CLAUSE_PRIVATE_OUTER_REF, OMP_CLAUSE_LASTPRIVATE_STMT,
	OMP_CLAUSE_COLLAPSE_ITERVAR, OMP_CLAUSE_COLLAPSE_COUNT,
	OMP_TASKREG_CHECK, OMP_TASKREG_BODY, OMP_TASKREG_CLAUSES,
	OMP_TASKREG_FN, OMP_TASKREG_DATA_ARG, OMP_TASK_BODY,
	OMP_TASK_CLAUSES, OMP_TASK_FN, OMP_TASK_DATA_ARG,
	OMP_CLAUSE_COLLAPSE_EXPR): Define.
	(enum omp_clause_default_kind): Add OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
	(OMP_DIRECTIVE_P): Add OMP_TASK.
	(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): New clause codes.
	(OMP_CLAUSE_SCHEDULE_AUTO): New schedule kind.
	* tree.c (omp_clause_code_name): Add OMP_CLAUSE_COLLAPSE
	and OMP_CLAUSE_UNTIED entries.
	(omp_clause_num_ops): Likewise.  Increase OMP_CLAUSE_LASTPRIVATE
	num_ops to 2.
	(walk_tree_1): Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
	Walk OMP_CLAUSE_LASTPRIVATE_STMT.
	* tree-pretty-print.c (dump_omp_clause): Handle
	OMP_CLAUSE_SCHEDULE_AUTO, OMP_CLAUSE_UNTIED, OMP_CLAUSE_COLLAPSE,
	OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.
	(dump_generic_node): Handle OMP_TASK and collapsed OMP_FOR loops.
	* c-omp.c (c_finish_omp_for): Allow pointer iterators.  Remove
	warning about unsigned iterators.  Change decl/init/cond/incr
	arguments to TREE_VECs, check arguments for all collapsed loops.
	(c_finish_omp_taskwait): New function.
	(c_split_parallel_clauses): Put OMP_CLAUSE_COLLAPSE clause to
	ws_clauses.
	* c-parser.c (c_parser_omp_for_loop): Parse collapsed loops.  Call
	default_function_array_conversion on init.  Add par_clauses argument.
	If decl is present in parallel's lastprivate clause, change it to
	shared and add lastprivate clause for decl to OMP_FOR_CLAUSES.
	Add clauses argument, on success set OMP_FOR_CLAUSES to it.  Look up
	collapse count in clauses.
	(c_parser_omp_for, c_parser_omp_parallel): Adjust
	c_parser_omp_for_loop callers.
	(OMP_FOR_CLAUSE_MASK): Add 1 << PRAGMA_OMP_CLAUSE_COLLAPSE.
	(c_parser_pragma): Handle PRAGMA_OMP_TASKWAIT.
	(c_parser_omp_clause_name): Handle collapse and untied clauses.
	(c_parser_omp_clause_collapse, c_parser_omp_clause_untied): New
	functions.
	(c_parser_omp_clause_schedule): Handle schedule(auto).
	Include correct location in the error message.
	(c_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
	and PRAGMA_OMP_CLAUSE_UNTIED.
	(OMP_TASK_CLAUSE_MASK): Define.
	(c_parser_omp_task, c_parser_omp_taskwait): New functions.
	(c_parser_omp_construct): Handle PRAGMA_OMP_TASK.
	* tree-nested.c (convert_nonlocal_omp_clauses,
	convert_local_omp_clauses): Handle OMP_CLAUSE_LASTPRIVATE_STMT,
	OMP_CLAUSE_REDUCTION_INIT, OMP_CLAUSE_REDUCTION_MERGE,
	OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
	Don't handle TREE_STATIC or DECL_EXTERNAL VAR_DECLs in
	OMP_CLAUSE_DECL.
	(conver_nonlocal_reference, convert_local_reference,
	convert_call_expr): Handle OMP_TASK the same as OMP_PARALLEL.  Use
	OMP_TASKREG_* macros rather than OMP_PARALLEL_*.
	(walk_omp_for): Adjust for OMP_FOR_{INIT,COND,INCR} changes.
	* tree-gimple.c (is_gimple_stmt): Handle OMP_TASK.
	* c-tree.h (c_begin_omp_task, c_finish_omp_task): New prototypes.
	* c-pragma.h (PRAGMA_OMP_TASK, PRAGMA_OMP_TASKWAIT): New.
	(PRAGMA_OMP_CLAUSE_COLLAPSE, PRAGMA_OMP_CLAUSE_UNTIED): New.
	* c-typeck.c (c_begin_omp_task, c_finish_omp_task): New functions.
	(c_finish_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
	OMP_CLAUSE_UNTIED.
	* c-pragma.c (init_pragma): Init omp task and omp taskwait pragmas.
	* c-common.h (c_finish_omp_taskwait): New prototype.
	* gimple-low.c (lower_stmt): Handle OMP_TASK.
	* tree-parloops.c (create_parallel_loop): Create 1 entry
	vectors for OMP_FOR_{INIT,COND,INCR}.
	* tree-cfg.c (remove_useless_stmts_1): Handle OMP_* containers.
	(make_edges): Handle OMP_TASK.
	* tree-ssa-operands.c (get_expr_operands): Handle collapsed OMP_FOR
	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
	* tree-inline.c (estimate_num_insns_1): Handle OMP_TASK.
	* builtin-types.def (BT_PTR_ULONGLONG, BT_PTR_FN_VOID_PTR_PTR,
	BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
	* omp-builtins.def (BUILT_IN_GOMP_TASK, BUILT_IN_GOMP_TASKWAIT,
	BUILT_IN_GOMP_LOOP_ULL_STATIC_START,
	BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ULL_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ULL_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_START,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_ULL_STATIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_RUNTIME_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT): New builtins.
	* gimplify.c (gimplify_omp_for): Allow pointer type for decl,
	handle POINTER_PLUS_EXPR.  If loop counter has been replaced and
	original iterator is present in lastprivate clause or if
	collapse > 1, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle collapsed
	OMP_FOR loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
	(gimplify_expr): Handle OMP_SECTIONS_SWITCH and OMP_TASK.
	(enum gimplify_omp_var_data): Add GOVD_PRIVATE_OUTER_REF.
	(omp_notice_variable): Set GOVD_PRIVATE_OUTER_REF if needed,
	if it is set, lookup var in outer contexts too.  Handle
	OMP_CLAUSE_DEFAULT_FIRSTPRIVATE.  Handle vars that are supposed
	to be implicitly determined firstprivate for task regions.
	(gimplify_scan_omp_clauses): Set GOVD_PRIVATE_OUTER_REF if needed,
	if it is set, lookup var in outer contexts too.  Set
	OMP_CLAUSE_PRIVATE_OUTER_REF if GOVD_PRIVATE_OUTER_REF is set.
	Handle OMP_CLAUSE_LASTPRIVATE_STMT, OMP_CLAUSE_COLLAPSE and
	OMP_CLAUSE_UNTIED.  Take region_type as last argument
	instead of in_parallel and in_combined_parallel.
	(gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare):
	Adjust callers.
	(gimplify_adjust_omp_clauses_1): Set OMP_CLAUSE_PRIVATE_OUTER_REF if
	GOVD_PRIVATE_OUTER_REF is set.  Call omp_finish_clause
	langhook.
	(new_omp_context): Set default_kind to
	OMP_CLAUSE_DEFAULT_UNSPECIFIED for OMP_TASK regions.
	(omp_region_type): New enum.
	(struct gimplify_omp_ctx): Remove is_parallel and is_combined_parallel
	fields, add region_type.
	(new_omp_context): Take region_type as argument instead of is_parallel
	and is_combined_parallel.
	(gimple_add_tmp_var, omp_firstprivatize_variable, omp_notice_variable,
	omp_is_private, omp_check_private): Adjust ctx->is_parallel and
	ctx->is_combined_parallel checks.
	(gimplify_omp_task): New function.
	(gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
	OMP_CLAUSE_UNTIED.
	* omp-low.c (extract_omp_for_data): Use schedule(static)
	for schedule(auto).  Handle pointer and unsigned iterators.
	Compute fd->iter_type.  Handle POINTER_PLUS_EXPR increments.
	Add loops argument.  Extract data for collapsed OMP_FOR loops.
	(expand_parallel_call): Assert sched_kind isn't auto,
	map runtime schedule to index 3.
	(struct omp_for_data_loop): New type.
	(struct omp_for_data): Remove v, n1, n2, step, cond_code fields.
	Add loop, loops, collapse and iter_type fields.
	(workshare_safe_to_combine_p): Disallow combined for if
	iter_type is unsigned long long.  Don't combine collapse > 1 loops
	unless all bounds and steps are constant.  Adjust extract_omp_for_data
	caller.
	(expand_omp_for_generic): Handle pointer, unsigned and long long
	iterators.  Handle collapsed OMP_FOR loops.  Adjust
	for struct omp_for_data changes.  If libgomp function doesn't return
	boolean_type_node, add comparison of the return value with 0.
	(expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
	pointer, unsigned and long long iterators.  Adjust for struct
	omp_for_data changes.
	(expand_omp_for): Assert sched_kind isn't auto, map runtime schedule
	to index 3.  Use GOMP_loop_ull*{start,next} if iter_type is
	unsigned long long.  Allocate loops array, pass it to
	extract_omp_for_data.  For collapse > 1 loops use always
	expand_omp_for_generic.
	(omp_context): Add sfield_map and srecord_type fields.
	(is_task_ctx, lookup_sfield): New functions.
	(use_pointer_for_field): Use is_task_ctx helper.  Change first
	argument's type from const_tree to tree.  Clarify comment.
	In OMP_TASK disallow copy-in/out sharing.
	(build_sender_ref): Call lookup_sfield instead of lookup_field.
	(install_var_field): Add mask argument.  Populate both record_type
	and srecord_type if needed.
	(delete_omp_context): Destroy sfield_map, clear DECL_ABSTRACT_ORIGIN
	in srecord_type.
	(fixup_child_record_type): Also remap FIELD_DECL's DECL_SIZE{,_UNIT}
	and DECL_FIELD_OFFSET.
	(scan_sharing_clauses): Adjust install_var_field callers.  For
	firstprivate clauses on explicit tasks allocate the var by value in
	record_type unconditionally, rather than by reference.
	Handle OMP_CLAUSE_PRIVATE_OUTER_REF.  Scan OMP_CLAUSE_LASTPRIVATE_STMT.
	Use is_taskreg_ctx instead of is_parallel_ctx.
	Handle OMP_CLAUSE_COLLAPSE and OMP_CLAUSE_UNTIED.
	(create_omp_child_function_name): Add task_copy argument, use
	*_omp_cpyfn* names if it is true.
	(create_omp_child_function): Add task_copy argument, if true create
	*_omp_cpyfn* helper function.
	(scan_omp_parallel): Adjust create_omp_child_function callers.
	Rename parallel_nesting_level to taskreg_nesting_level.
	(scan_omp_task): New function.
	(lower_rec_input_clauses): Don't run constructors for firstprivate
	explicit task vars which are initialized by *_omp_cpyfn*.  
	Pass outer var ref to omp_clause_default_ctor hook if
	OMP_CLAUSE_PRIVATE_OUTER_REF or OMP_CLAUSE_LASTPRIVATE.
	Replace OMP_CLAUSE_REDUCTION_PLACEHOLDER decls in
	OMP_CLAUSE_REDUCTION_INIT.
	(lower_send_clauses): Clear DECL_ABSTRACT_ORIGIN if in task to
	avoid duplicate setting of fields.  Handle
	OMP_CLAUSE_PRIVATE_OUTER_REF.
	(lower_send_shared_vars): Use srecord_type if non-NULL.  Don't
	copy-out if TREE_READONLY, only copy-in.
	(expand_task_copyfn): New function.
	(expand_task_call): New function.
	(struct omp_taskcopy_context): New type.
	(task_copyfn_copy_decl, task_copyfn_remap_type, create_task_copyfn):
	New functions.
	(lower_omp_parallel): Rename to...
	(lower_omp_taskreg): ... this.  Use OMP_TASKREG_* macros where needed.
	Call create_task_copyfn if srecord_type is needed.  Adjust
	sender_decl type.
	(task_shared_vars): New variable.
	(check_omp_nesting_restrictions): Warn if work-sharing,
	barrier, master or ordered region is closely nested inside OMP_TASK.
	Add warnings for barrier if closely nested inside of work-sharing,
	ordered, or master region.
	(scan_omp_1): Call check_omp_nesting_restrictions even for
	GOMP_barrier calls.  Rename parallel_nesting_level to
	taskreg_nesting_level.  Handle OMP_TASK.
	(lower_lastprivate_clauses): Even if some lastprivate is found on a
	work-sharing construct, continue looking for them on parent parallel
	construct.
	(lower_omp_for_lastprivate): Add lastprivate clauses
	to the beginning of dlist rather than end.  Adjust for struct
	omp_for_data changes.
	(lower_omp_for): Add rec input clauses before OMP_FOR_PRE_BODY,
	not after it.  Handle collapsed OMP_FOR loops, adjust for
	OMP_FOR_{INIT,COND,INCR} changes, adjust extract_omp_for_data
	caller.
	(get_ws_args_for): Adjust extract_omp_for_data caller.
	(scan_omp_for): Handle collapsed OMP_FOR
	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.
	(lower_omp_single_simple): If libgomp function doesn't return
	boolean_type_node, add comparison of the return value with 0.
	(diagnose_sb_1, diagnose_sb_2): Handle collapsed OMP_FOR
	loops, adjust for OMP_FOR_{INIT,COND,INCR} changes.  Handle OMP_TASK.
	(parallel_nesting_level): Rename to...
	(taskreg_nesting_level): ... this.
	(is_taskreg_ctx): New function.
	(build_outer_var_ref, omp_copy_decl): Use is_taskreg_ctx instead
	of is_parallel_ctx.
	(execute_lower_omp): Rename parallel_nesting_level to
	taskreg_nesting_level.
	(expand_omp_parallel): Rename to...
	(expand_omp_taskreg): ... this.  Use OMP_TASKREG_* macros where needed.
	Call omp_task_call for OMP_TASK regions.
	(expand_omp): Adjust caller, handle OMP_TASK.
	(lower_omp_1): Adjust lower_omp_taskreg caller, handle OMP_TASK.

	* bitmap.c (bitmap_default_obstack_depth): New variable.
	(bitmap_obstack_initialize, bitmap_obstack_release): Do nothing
	if argument is NULL and bitmap_default_obstack is already initialized.
	* ipa-struct-reorg.c (do_reorg_1): Call bitmap_obstack_release
	at the end.
	* matrix-reorg.c (matrix_reorg): Likewise.
cp/
	* cp-tree.h (cxx_omp_finish_clause, cxx_omp_create_clause_info,
	dependent_omp_for_p, begin_omp_task, finish_omp_task,
	finish_omp_taskwait): New prototypes.
	(cxx_omp_clause_default_ctor): Add outer argument.
	(finish_omp_for): Add new clauses argument.
	* cp-gimplify.c (cxx_omp_finish_clause): New function.
	(cxx_omp_predetermined_sharing): Moved from semantics.c, rewritten.
	(cxx_omp_clause_default_ctor): Add outer argument.
	(cp_genericize_r): Walk OMP_CLAUSE_LASTPRIVATE_STMT.
	* cp-objcp-common.h (LANG_HOOKS_OMP_FINISH_CLAUSE): Define.
	* parser.c (cp_parser_omp_for_loop): Parse collapsed for loops.
	Add par_clauses argument.  If decl is present in parallel's
	lastprivate clause, change that clause to shared and add
	a lastprivate clause for decl to OMP_FOR_CLAUSES.
	Fix wording of error messages.  Adjust finish_omp_for caller.
	Add clauses argument.  Parse loops with random access iterators.
	(cp_parser_omp_clause_collapse, cp_parser_omp_clause_untied): New
	functions.
	(cp_parser_omp_for, cp_parser_omp_parallel): Adjust
	cp_parser_omp_for_loop callers.
	(cp_parser_omp_for_cond, cp_parser_omp_for_incr): New helper
	functions.
	(cp_parser_omp_clause_name): Handle collapse and untied
	clauses.
	(cp_parser_omp_clause_schedule): Handle auto schedule.
	(cp_parser_omp_all_clauses): Handle PRAGMA_OMP_CLAUSE_COLLAPSE
	and PRAGMA_OMP_CLAUSE_UNTIED.
	(OMP_FOR_CLAUSE_MASK): Add PRAGMA_OMP_CLAUSE_COLLAPSE.
	(OMP_TASK_CLAUSE_MASK): Define.
	(cp_parser_omp_task, cp_parser_omp_taskwait): New functions.
	(cp_parser_omp_construct): Handle PRAGMA_OMP_TASK.
	(cp_parser_pragma): Handle PRAGMA_OMP_TASK and
	PRAGMA_OMP_TASKWAIT.
	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_COLLAPSE and
	OMP_CLAUSE_UNTIED.  Handle OMP_CLAUSE_LASTPRIVATE_STMT.
	(tsubst_omp_for_iterator): New function.
	(dependent_omp_for_p): New function.
	(tsubst_expr) <case OMP_FOR>: Use it.  Handle collapsed OMP_FOR
	loops.  Adjust finish_omp_for caller.  Handle loops with random
	access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR} changes.
	(tsubst_expr): Handle OMP_TASK.
	* semantics.c (cxx_omp_create_clause_info): New function.
	(finish_omp_clauses): Call it.  Handle OMP_CLAUSE_UNTIED and
	OMP_CLAUSE_COLLAPSE.
	(cxx_omp_predetermined_sharing): Removed.
	* semantics.c (finish_omp_for): Allow pointer iterators.  Use
	handle_omp_for_class_iterator and dependent_omp_for_p.  Handle
	collapsed for loops.  Adjust c_finish_omp_for caller.  Add new
	clauses argument.  Fix check for type dependent cond or incr.
	Set OMP_FOR_CLAUSES to clauses.  Use cp_convert instead of
	fold_convert to convert incr amount to difference_type.  Only
	fold if not in template.  If decl is mentioned in lastprivate
	clause, set OMP_CLAUSE_LASTPRIVATE_STMT.  Handle loops with random
	access iterators.  Adjust for OMP_FOR_{INIT,COND,INCR}
	changes.
	(finish_omp_threadprivate): Allow static class members of the
	current class.
	(handle_omp_for_class_iterator, begin_omp_task, finish_omp_task,
	finish_omp_taskwait): New functions.

	* parser.c (cp_parser_binary_expression): Add prec argument.
	(cp_parser_assignment_expression): Adjust caller.
	* cp-tree.h (outer_curly_brace_block): New prototype.
	* decl.c (outer_curly_brace_block): No longer static.
fortran/
	* scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
	* parse.c (next_free): Allow tab after !$omp.
	(decode_omp_directive): Handle !$omp task, !$omp taskwait
	and !$omp end task.
	(case_executable): Add ST_OMP_TASKWAIT.
	(case_exec_markers): Add ST_OMP_TASK.
	(gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
	ST_OMP_TASKWAIT.
	(parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
	* gfortran.h (gfc_find_sym_in_expr): New prototype.
	(gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
	(gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
	OMP_DEFAULT_FIRSTPRIVATE to default_sharing.  Add collapse and
	untied fields.
	(gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
	* f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
	LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
	LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
	* trans.h (gfc_omp_clause_default_ctor): Add another argument.
	(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
	gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
	* types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
	BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
	BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
	BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
	BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
	(BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
	than boolean_type_node.
	* dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
	EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
	untied and collapse clauses.
	(gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
	* trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
	EXEC_OMP_TASKWAIT.
	* st.c (gfc_free_statement): Likewise.
	* resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
	(find_sym_in_expr): Rename to...
	(gfc_find_sym_in_expr): ... this.  No longer static.
	(resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
	* match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
	prototypes.
	* openmp.c (resolve_omp_clauses): Allow allocatable arrays in
	firstprivate, lastprivate, reduction, copyprivate and copyin
	clauses.
	(omp_current_do_code): Made static.
	(omp_current_do_collapse): New variable.
	(gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
	clear omp_current_do_code and omp_current_do_collapse on return.
	(gfc_resolve_do_iterator): Handle collapsed do loops.
	(resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
	(OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
	(gfc_match_omp_clauses): Handle default (firstprivate),
	schedule (auto), untied and collapse (n) clauses.
	(OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
	(OMP_TASK_CLAUSES): Define.
	(gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
	* trans-openmp.c (gfc_omp_private_outer_ref): New function.
	(gfc_omp_clause_default_ctor): Add outer argument.  For allocatable
	arrays allocate them with the bounds of the outer var if outer
	var is allocated.
	(gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
	gfc_omp_clause_dtor): New functions.
	(gfc_trans_omp_array_reduction): If decl is allocatable array,
	allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
	and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
	(gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
	for assumed-size arrays.
	(gfc_trans_omp_do): Add par_clauses argument.  If dovar is
	present in lastprivate clause and do loop isn't simple,
	set OMP_CLAUSE_LASTPRIVATE_STMT.  If dovar is present in
	parallel's lastprivate clause, change it to shared and add
	lastprivate clause to OMP_FOR_CLAUSES.  Handle collapsed do loops.
	(gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
	(gfc_trans_omp_parallel_do): Likewise.  Move collapse clause to
	OMP_FOR from OMP_PARALLEL.
	(gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
	OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
	(gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
	(gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
	EXEC_OMP_TASKWAIT.
gcc/testsuite/
	* gcc.dg/gomp/collapse-1.c: New test.
	* gcc.dg/gomp/nesting-1.c: New test.
	* g++.dg/gomp/task-1.C: New test.
	* g++.dg/gomp/predetermined-1.C: New test.
	* g++.dg/gomp/tls-4.C: New test.
	* gfortran.dg/gomp/collapse1.f90: New test.
	* gfortran.dg/gomp/sharing-3.f90: New test.
	* gcc.dg/gomp/pr27499.c (foo): Remove is unsigned dg-warning.
	* g++.dg/gomp/pr27499.C (foo): Likewise.
	* g++.dg/gomp/for-16.C (foo): Likewise.
	* g++.dg/gomp/tls-3.C: Remove dg-error, add S::s definition.
	* g++.dg/gomp/pr34607.C: Adjust dg-error location.
	* g++.dg/gomp/for-16.C (foo): Add a new dg-error.
	* gcc.dg/gomp/appendix-a/a.35.4.c: Add dg-warning.
	* gcc.dg/gomp/appendix-a/a.35.6.c: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
	* gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
	* gfortran.dg/gomp/omp_parse1.f90: Remove !$omp tab test.
	* gfortran.dg/gomp/appendix-a/a.33.4.f90: Remove dg-error
	about allocatable array.
	* gfortran.dg/gomp/reduction1.f90: Likewise.
libgomp/
	* configure.ac (LIBGOMP_GNU_SYMBOL_VERSIONING): New AC_DEFINE.
	Substitute also OMP_*LOCK_25*.
	* configure: Regenerated.
	* config.h.in: Regenerated.
	* Makefile.am (libgomp_la_SOURCES): Add loop_ull.c, iter_ull.c,
	ptrlock.c and task.c.
	* Makefile.in: Regenerated.
	* testsuite/Makefile.in: Regenerated.
	* task.c: New file.
	* loop_ull.c: New file.
	* iter_ull.c: New file.
	* libgomp.h: Include ptrlock.h.
	(enum gomp_task_kind): New type.
	(struct gomp_team): Add task_lock, task_queue, task_count,
	task_running_count, single_count fields.  Add
	work_share_list_free_lock ifndef HAVE_SYNC_BUILTINS.
	Remove work_share_lock, generation_mask,
	oldest_live_gen, num_live_gen and init_work_shares fields, add
	work work_share_list_alloc, work_share_list_free and work_share_chunk
	fields.  Change work_shares from pointer to pointers into an array.
	Change ordered_release field into gomp_sem_t ** from flexible array
	member.  Add implicit_task and initial_work_shares fields.
	Move close to the end of the struct.
	(struct gomp_team_state): Add single_count, last_work_share,
	active_level and level fields, remove work_share_generation.
	(gomp_barrier_handle_tasks): New prototype.
	(gomp_finish_task): New inline function.
	(struct gomp_work_share): Move chunk_size, end, incr into
	transparent union/struct, add chunk_size_ull, end_ll, incr_ll and
	next_ll fields.  Reshuffle fields.  Add next_alloc,
	next_ws, next_free and inline_ordered_team_ids fields, change
	ordered_team_ids into pointer from flexible array member.
	Add mode field.  Put lock and next into a different cache line
	from most of the write-once fields.
	(gomp_iter_ull_static_next, gomp_iter_ull_dynamic_next_locked,
	gomp_iter_ull_guided_next_locked, gomp_iter_ull_dynamic_next,
	gomp_iter_ull_guided_next): New prototypes.
	(gomp_new_icv): New prototype.
	(struct gomp_thread): Add thread_pool and task fields.
	(struct gomp_thread_pool): New type.
	(gomp_new_team): New prototype.
	(gomp_team_start): Change type of last argument.
	(gomp_new_work_share): Removed.
	(gomp_init_work_share, gomp_fini_work_share): New prototypes.
	(gomp_work_share_init_done): New static inline.
	(gomp_throttled_spin_count_var, gomp_available_cpus,
	gomp_managed_threads): New extern decls.
	(gomp_init_task): New prototype.
	(gomp_spin_count_var): New extern var decl.
	(LIBGOMP_GNU_SYMBOL_VERSIONING): Undef if no visibility
	or no alias support, or if not PIC.
	(gomp_init_lock_30, gomp_destroy_lock_30, gomp_set_lock_30,
	gomp_unset_lock_30, gomp_test_lock_30, gomp_init_nest_lock_30,
	gomp_destroy_nest_lock_30, gomp_set_nest_lock_30,
	gomp_unset_nest_lock_30, gomp_test_nest_lock_30, gomp_init_lock_25,
	gomp_destroy_lock_25, gomp_set_lock_25, gomp_unset_lock_25,
	gomp_test_lock_25, gomp_init_nest_lock_25, gomp_destroy_nest_lock_25,
	gomp_set_nest_lock_25, gomp_unset_nest_lock_25,
	gomp_test_nest_lock_25): New prototypes.
	(omp_lock_symver, strong_alias): Define.
	(gomp_remaining_threads_count, gomp_remaining_threads_lock): New
	decls.
	(gomp_end_task): New.
	(struct gomp_task_icv, gomp_global_icv): New.
	(gomp_thread_limit_var, gomp_max_active_levels_var): New.
	(struct gomp_task): New.
	(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
	gomp_run_sched_var, gomp_run_sched_chunk): Remove.
	(gomp_icv): New.
	(gomp_schedule_type): Reorder enum to match
	omp_sched_t.
	* team.c (struct gomp_thread_start_data): Add thread_pool and task
	fields.
	(gomp_thread_start): Add gomp_team_barrier_wait call.
	For non-nested case remove clearing of docked thread thr fields.
	Use pool fields instead of global gomp_* variables.  Use
	gomp_barrier_wait_last when needed.  Initialize ts.active_level.
	Create tasks for each member thread.
	(free_team): Only destroy team barrier, task_lock here and free it.
	(gomp_free_thread): Free last_team if non-NULL.
	(gomp_team_end): Call gomp_team_barrier_wait instead of
	gomp_barrier_wait.  For nested case call one extra
	gomp_barrier_wait.  Move here some destruction from free_team.
	Call free_team on pool->last_team if any, rather than freeing
	current team.  Destroy work_share_list_free_lock ifndef
	HAVE_SYNC_BUILTINS.
	(gomp_new_icv): New function.
	(gomp_threads, gomp_threads_size, gomp_threads_used,
	gomp_threads_dock): Removed.
	(gomp_thread_destructor): New variable.
	(gomp_new_thread_pool, gomp_free_pool_helper, gomp_free_thread): New
	functions.
	(gomp_team_start): Create new pool if current thread doesn't have
	one.  Use pool fields instead of global gomp_* variables. 
	Initialize thread_pool field for new threads.  Clear single_count.
	Change last argument from ws to team, don't create
	new team, set ts.work_share to &team->work_shares[0] and clear
	ts.last_work_share.  Don't clear ts.work_share_generation.
	If number of threads changed, adjust atomically gomp_managed_threads.
	Use gomp_init_task instead of gomp_new_task,
	set thr->task to the corresponding implicit_task array entry.
	Create tasks for each member thread.  Initialize ts.level.
	(initialize_team): Call pthread_key_create on
	gomp_thread_destructor.
	(team_destructor): New function.
	(new_team): Removed.
	(gomp_new_team): New function.
	(free_team): Free gomp_work_share blocks chained through next_alloc,
	instead of freeing work_shares and destroying work_share_lock.
	(gomp_team_end): Call gomp_fini_work_share.  If number of threads
	changed, adjust atomically gomp_managed_threads.  Use gomp_end_task.
	* barrier.c (GOMP_barrier): Call gomp_team_barrier_wait instead
	of gomp_barrier_wait.
	* single.c (GOMP_single_copy_start): Call gomp_team_barrier_wait
	instead of gomp_barrier_wait.  Call gomp_work_share_init_done
	if gomp_work_share_start returned true.  Don't unlock ws->lock.
	(GOMP_single_copy_end): Call gomp_team_barrier_wait instead
	of gomp_barrier_wait.
	(GOMP_single_start): Rewritten if HAVE_SYNC_BUILTINS.  Call
	gomp_work_share_init_done if gomp_work_share_start returned true.
	Don't unlock ws->lock.
	* work.c: Include stddef.h.
	(free_work_share): Use work_share_list_free_lock instead
	of atomic chaining ifndef HAVE_SYNC_BUILTINS.  Add team argument.
	Call gomp_fini_work_share and then either free ws if orphaned, or
	put it into work_share_list_free list of the current team.
	(alloc_work_share, gomp_init_work_share, gomp_fini_work_share): New
	functions.
	(gomp_work_share_start, gomp_work_share_end,
	gomp_work_share_end_nowait): Rewritten.
	* omp_lib.f90.in Change some tabs to spaces to prevent warnings.
	(openmp_version): Set to 200805.
	(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
	omp_sched_guided, omp_sched_auto): New parameters.
	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
	omp_set_max_active_levels, omp_get_max_active_levels,
	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
	omp_get_active_level): New interfaces.
	* omp_lib.h.in (openmp_version): Set to 200805.
	(omp_sched_kind, omp_sched_static, omp_sched_dynamic,
	omp_sched_guided, omp_sched_auto): New parameters.
	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
	omp_set_max_active_levels, omp_get_max_active_levels,
	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
	omp_get_active_level): New externals.
	* loop.c: Include limits.h.
	(GOMP_loop_runtime_next, GOMP_loop_ordered_runtime_next): Handle
	GFS_AUTO.
	(GOMP_loop_runtime_start, GOMP_loop_ordered_runtime_start):
	Likewise.  Use gomp_icv.
	(gomp_loop_static_start, gomp_loop_dynamic_start): Clear
	ts.static_trip here.
	(gomp_loop_static_start, gomp_loop_ordered_static_start): Call
	gomp_work_share_init_done after gomp_loop_init.  Don't unlock ws->lock.
	(gomp_loop_dynamic_start, gomp_loop_guided_start): Call
	gomp_work_share_init_done after gomp_loop_init.  If HAVE_SYNC_BUILTINS,
	don't unlock ws->lock, otherwise lock it.
	(gomp_loop_ordered_dynamic_start, gomp_loop_ordered_guided_start): Call
	gomp_work_share_init_done after gomp_loop_init.  Lock ws->lock.
	(gomp_parallel_loop_start): Call gomp_new_team instead of
	gomp_new_work_share.  Call gomp_loop_init on &team->work_shares[0].
	Adjust gomp_team_start caller.  Pass 0 as second argument to
	gomp_resolve_num_threads.
	(gomp_loop_init): For GFS_DYNAMIC, multiply ws->chunk_size by incr.
	If adding ws->chunk_size nthreads + 1 times after end won't
	overflow, set ws->mode to 1.
	* libgomp_g.h (GOMP_loop_ull_static_start, GOMP_loop_ull_dynamic_start,
	GOMP_loop_ull_guided_start, GOMP_loop_ull_runtime_start,
	GOMP_loop_ull_ordered_static_start,
	GOMP_loop_ull_ordered_dynamic_start,
	GOMP_loop_ull_ordered_guided_start,
	GOMP_loop_ull_ordered_runtime_start, GOMP_loop_ull_static_next,
	GOMP_loop_ull_dynamic_next, GOMP_loop_ull_guided_next,
	GOMP_loop_ull_runtime_next, GOMP_loop_ull_ordered_static_next,
	GOMP_loop_ull_ordered_dynamic_next, GOMP_loop_ull_ordered_guided_next,
	GOMP_loop_ull_ordered_runtime_next, GOMP_task, GOMP_taskwait): New
	prototypes.
	* libgomp.map: Export lock routines also @@OMP_2.0.
	(GOMP_loop_ordered_dynamic_first,
	GOMP_loop_ordered_guided_first, GOMP_loop_ordered_runtime_first,
	GOMP_loop_ordered_static_first): Remove.
	(GOMP_loop_ull_dynamic_next, GOMP_loop_ull_dynamic_start,
	GOMP_loop_ull_guided_next, GOMP_loop_ull_guided_start,
	GOMP_loop_ull_ordered_dynamic_next,
	GOMP_loop_ull_ordered_dynamic_start,
	GOMP_loop_ull_ordered_guided_next,
	GOMP_loop_ull_ordered_guided_start,
	GOMP_loop_ull_ordered_runtime_next,
	GOMP_loop_ull_ordered_runtime_start,
	GOMP_loop_ull_ordered_static_next,
	GOMP_loop_ull_ordered_static_start,
	GOMP_loop_ull_runtime_next, GOMP_loop_ull_runtime_start,
	GOMP_loop_ull_static_next, GOMP_loop_ull_static_start,
	GOMP_task, GOMP_taskwait): Export @@GOMP_2.0.
	(omp_set_schedule, omp_get_schedule,
	omp_get_thread_limit, omp_set_max_active_levels,
	omp_get_max_active_levels, omp_get_level,
	omp_get_ancestor_thread_num, omp_get_team_size, omp_get_active_level,
	omp_set_schedule_, omp_set_schedule_8_,
	omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
	omp_set_max_active_levels_, omp_set_max_active_levels_8_,
	omp_get_max_active_levels_, omp_get_level_,
	omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
	omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
	New exports @@OMP_3.0.
	* omp.h.in (omp_sched_t): New type.
	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
	omp_set_max_active_levels, omp_get_max_active_levels,
	omp_get_level, omp_get_ancestor_thread_num, omp_get_team_size,
	omp_get_active_level): New prototypes.
	* env.c (gomp_spin_count_var, gomp_throttled_spin_count_var,
	gomp_available_cpus, gomp_managed_threads, gomp_max_active_levels_var,
	gomp_thread_limit_var, gomp_remaining_threads_count,
	gomp_remaining_threads_lock): New variables.
	(parse_spincount): New function.
	(initialize_env): Call gomp_init_num_threads unconditionally.
	Initialize gomp_available_cpus.  Call parse_spincount,
	initialize gomp_{,throttled_}spin_count_var
	depending on presence and value of OMP_WAIT_POLICY and
	GOMP_SPINCOUNT env vars.  Handle GOMP_BLOCKTIME env var.
	Handle OMP_WAIT_POLICY, OMP_MAX_ACTIVE_LEVELS,
	OMP_THREAD_LIMIT, OMP_STACKSIZE env vars.  Handle unit specification
	for GOMP_STACKSIZE.  Initialize gomp_remaining_threads_count and
	gomp_remaining_threads_lock if needed.  Use gomp_global_icv.
	(gomp_nthreads_var, gomp_dyn_var, gomp_nest_var,
	gomp_run_sched_var, gomp_run_sched_chunk): Remove.
	(gomp_global_icv): New.
	(parse_schedule): Use it.  Parse "auto".
	(omp_set_num_threads): Use gomp_icv.
	(omp_set_dynamic, omp_get_dynamic, omp_set_nested, omp_get_nested):
	Likewise.
	(omp_get_max_threads): Move from parallel.c.
	(omp_set_schedule, omp_get_schedule, omp_get_thread_limit,
	omp_set_max_active_levels, omp_get_max_active_levels): New functions,
	add ialias.
	(parse_stacksize, parse_wait_policy): New functions.
	* fortran.c: Rewrite lock wrappers, if symbol versioning provide
	both wrappers for compatibility and new locks.
	(omp_set_schedule, omp_get_schedule,
	omp_get_thread_limit, omp_set_max_active_levels,
	omp_get_max_active_levels, omp_get_level,
	omp_get_ancestor_thread_num, omp_get_team_size,
	omp_get_active_level): New ialias_redirect.
	(omp_set_schedule_, omp_set_schedule_8_,
	omp_get_schedule_, omp_get_schedule_8_, omp_get_thread_limit_,
	omp_set_max_active_levels_, omp_set_max_active_levels_8_,
	omp_get_max_active_levels_, omp_get_level_,
	omp_get_ancestor_thread_num_, omp_get_ancestor_thread_num_8_,
	omp_get_team_size_, omp_get_team_size_8_, omp_get_active_level_):
	New functions.
	* parallel.c: Include limits.h.
	(gomp_resolve_num_threads): Add count argument.  Rewritten.
	(GOMP_parallel_start): Call gomp_new_team and pass that as last
	argument to gomp_team_start.  Pass 0 as second argument to
	gomp_resolve_num_threads.
	(GOMP_parallel_end): Decrease gomp_remaining_threads_count
	if gomp_thread_limit_var != ULONG_MAX.
	(omp_in_parallel): Implement using ts.active_level.
	(omp_get_max_threads): Move to env.c.
	(omp_get_level, omp_get_ancestor_thread_num,
	omp_get_team_size, omp_get_active_level): New functions,
	add ialias.
	* sections.c (GOMP_sections_start): Call gomp_work_share_init_done
	after gomp_sections_init.  If HAVE_SYNC_BUILTINS, call
	gomp_iter_dynamic_next instead of the _locked variant and don't take
	lock around it, otherwise acquire it before calling
	gomp_iter_dynamic_next_locked.
	(GOMP_sections_next): If HAVE_SYNC_BUILTINS, call
	gomp_iter_dynamic_next instead of the _locked variant and don't take
	lock around it.
	(GOMP_parallel_sections_start): Call gomp_new_team instead of
	gomp_new_work_share.  Call gomp_sections_init on &team->work_shares[0].
	Adjust gomp_team_start caller.  Pass count as second argument to
	gomp_resolve_num_threads, don't adjust num_threads after the call.
	Use gomp_icv.
	* iter.c (gomp_iter_dynamic_next_locked): Don't multiply
	ws->chunk_size by incr.
	(gomp_iter_dynamic_next): Likewise.  If ws->mode, use more efficient
	code.
	* libgomp_f.h.in (omp_lock_25_arg_t, omp_nest_lock_25_arg_t): New
	types.
	(omp_lock_25_arg, omp_nest_lock_25_arg): New macros.
	(omp_check_defines): Check even the compat defines.
	* config/linux/ptrlock.c: New file.
	* config/linux/ptrlock.h: New file.
	* config/linux/wait.h: New file.
	* config/posix/ptrlock.c: New file.
	* config/posix/ptrlock.h: New file.
	* config/linux/bar.h (gomp_team_barrier_wait,
	gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
	(gomp_team_barrier_set_task_pending,
	gomp_team_barrier_clear_task_pending,
	gomp_team_barrier_set_waiting_for_tasks,
	gomp_team_barrier_waiting_for_tasks,
	gomp_team_barrier_done): New inlines.
	(gomp_barrier_t): Rewritten.
	(gomp_barrier_state_t): New typedef.
	(gomp_barrier_init, gomp_barrier_reinit, gomp_barrier_destroy,
	gomp_barrier_wait_start): Rewritten.
	(gomp_barrier_wait_end): Change second argument to
	gomp_barrier_state_t.
	(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
	inlines.
	* config/linux/bar.c: Include wait.h instead of libgomp.h and
	futex.h.
	(gomp_barrier_wait_end): Rewritten.
	(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
	gomp_team_barrier_wake, gomp_barrier_wait_last): New functions.
	* config/posix/bar.h (gomp_barrier_t): Add generation field.
	(gomp_barrier_state_t): New typedef.
	(gomp_team_barrier_wait,
	gomp_team_barrier_wait_end, gomp_team_barrier_wake): New prototypes.
	(gomp_barrier_wait_start): Or all but low 2 bits from generation
	into the return value.  Return gomp_barrier_state_t.
	(gomp_team_barrier_set_task_pending,
	gomp_team_barrier_clear_task_pending,
	gomp_team_barrier_set_waiting_for_tasks,
	gomp_team_barrier_waiting_for_tasks,
	gomp_team_barrier_done): New inlines.
	(gomp_barrier_wait_end): Change second argument to
	gomp_barrier_state_t.
	(gomp_barrier_last_thread, gomp_barrier_wait_last): New static
	inlines.
	* config/posix/bar.c (gomp_barrier_init): Clear generation field.
	(gomp_barrier_wait_end): Change second argument to
	gomp_barrier_state_t. 
	(gomp_team_barrier_wait, gomp_team_barrier_wait_end,
	gomp_team_barrier_wake): New functions.
	* config/linux/mutex.c: Include wait.h instead of libgomp.h and
	futex.h.
	(gomp_futex_wake, gomp_futex_wait): New variables.
	(gomp_mutex_lock_slow): Call do_wait instead of futex_wait.
	* config/linux/lock.c: Rewrite to make locks task owned,
	for backwards compatibility provide the old entrypoints
	if symbol versioning.  Include wait.h instead of libgomp.h and
	futex.h.
	(gomp_set_nest_lock_25): Call do_wait instead of futex_wait.
	* config/posix95/lock.c: Rewrite to make locks task owned,
	for backwards compatibility provide the old entrypoints
	if symbol versioning.
	* config/posix/lock.c: Rewrite to make locks task owned,
	for backwards compatibility provide the old entrypoints
	if symbol versioning.
	* config/linux/proc.c (gomp_init_num_threads): Use gomp_global_icv.
	(get_num_procs, gomp_dynamic_max_threads): Use gomp_icv.
	* config/posix/proc.c, config/mingw32/proc.c: Similarly.
	* config/linux/powerpc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/alpha/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/x86/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/s390/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/ia64/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/sparc/futex.h (FUTEX_WAIT, FUTEX_WAKE): Remove.
	(sys_futex0): Return error code.
	(futex_wake, futex_wait): If ENOSYS was returned, clear
	FUTEX_PRIVATE_FLAG in gomp_futex_wa{ke,it} and retry.
	(cpu_relax, atomic_write_barrier): New static inlines.
	* config/linux/sem.c: Include wait.h instead of libgomp.h and
	futex.h.
	(gomp_sem_wait_slow): Call do_wait instead of futex_wait.
	* config/linux/affinity.c: Assume HAVE_SYNC_BUILTINS.
	* config/linux/omp-lock.h (omp_lock_25_t, omp_nest_lock_25_t): New
	types.
	(omp_nest_lock_t): Change owner into void *, add lock field.
	* config/posix95/omp-lock.h: Include semaphore.h.
	(omp_lock_25_t, omp_nest_lock_25_t): New types.
	(omp_lock_t): Use sem_t instead of mutex if semaphores
	aren't broken.
	(omp_nest_lock_t): Likewise.  Change owner to void *.
	* config/posix/omp-lock.h: Include semaphore.h.
	(omp_lock_25_t, omp_nest_lock_25_t): New types.
	(omp_lock_t): Use sem_t instead of mutex if semaphores
	aren't broken.
	(omp_nest_lock_t): Likewise.  Add owner field.

	* testsuite/libgomp.c/collapse-1.c: New test.
	* testsuite/libgomp.c/collapse-2.c: New test.
	* testsuite/libgomp.c/collapse-3.c: New test.
	* testsuite/libgomp.c/icv-1.c: New test.
	* testsuite/libgomp.c/icv-2.c: New test.
	* testsuite/libgomp.c/lib-2.c: New test.
	* testsuite/libgomp.c/lock-1.c: New test.
	* testsuite/libgomp.c/lock-2.c: New test.
	* testsuite/libgomp.c/lock-3.c: New test.
	* testsuite/libgomp.c/loop-4.c: New test.
	* testsuite/libgomp.c/loop-5.c: New test.
	* testsuite/libgomp.c/loop-6.c: New test.
	* testsuite/libgomp.c/loop-7.c: New test.
	* testsuite/libgomp.c/loop-8.c: New test.
	* testsuite/libgomp.c/loop-9.c: New test.
	* testsuite/libgomp.c/nested-3.c: New test.
	* testsuite/libgomp.c/nestedfn-6.c: New test.
	* testsuite/libgomp.c/sort-1.c: New test.
	* testsuite/libgomp.c/task-1.c: New test.
	* testsuite/libgomp.c/task-2.c: New test.
	* testsuite/libgomp.c/task-3.c: New test.
	* testsuite/libgomp.c/task-4.c: New test.
	* testsuite/libgomp.c++/c++.exp: Add libstdc++-v3 build includes
	to C++ testsuite default compiler options.
	* testsuite/libgomp.c++/collapse-1.C: New test.
	* testsuite/libgomp.c++/collapse-2.C: New test.
	* testsuite/libgomp.c++/ctor-10.C: New test.
	* testsuite/libgomp.c++/for-1.C: New test.
	* testsuite/libgomp.c++/for-2.C: New test.
	* testsuite/libgomp.c++/for-3.C: New test.
	* testsuite/libgomp.c++/for-4.C: New test.
	* testsuite/libgomp.c++/for-5.C: New test.
	* testsuite/libgomp.c++/loop-8.C: New test.
	* testsuite/libgomp.c++/loop-9.C: New test.
	* testsuite/libgomp.c++/loop-10.C: New test.
	* testsuite/libgomp.c++/task-1.C: New test.
	* testsuite/libgomp.c++/task-2.C: New test.
	* testsuite/libgomp.c++/task-3.C: New test.
	* testsuite/libgomp.c++/task-4.C: New test.
	* testsuite/libgomp.c++/task-5.C: New test.
	* testsuite/libgomp.c++/task-6.C: New test.
	* testsuite/libgomp.fortran/allocatable1.f90: New test.
	* testsuite/libgomp.fortran/allocatable2.f90: New test.
	* testsuite/libgomp.fortran/allocatable3.f90: New test.
	* testsuite/libgomp.fortran/allocatable4.f90: New test.
	* testsuite/libgomp.fortran/collapse1.f90: New test.
	* testsuite/libgomp.fortran/collapse2.f90: New test.
	* testsuite/libgomp.fortran/collapse3.f90: New test.
	* testsuite/libgomp.fortran/collapse4.f90: New test.
	* testsuite/libgomp.fortran/lastprivate1.f90: New test.
	* testsuite/libgomp.fortran/lastprivate2.f90: New test.
	* testsuite/libgomp.fortran/lib4.f90: New test.
	* testsuite/libgomp.fortran/lock-1.f90: New test.
	* testsuite/libgomp.fortran/lock-2.f90: New test.
	* testsuite/libgomp.fortran/nested1.f90: New test.
	* testsuite/libgomp.fortran/nestedfn4.f90: New test.
	* testsuite/libgomp.fortran/strassen.f90: New test.
	* testsuite/libgomp.fortran/tabs1.f90: New test.
	* testsuite/libgomp.fortran/tabs2.f: New test.
	* testsuite/libgomp.fortran/task1.f90: New test.
	* testsuite/libgomp.fortran/task2.f90: New test.
	* testsuite/libgomp.fortran/vla4.f90: Add dg-warning.
	* testsuite/libgomp.fortran/vla5.f90: Likewise.
	* testsuite/libgomp.c/pr26943-2.c: Likewise.
	* testsuite/libgomp.c/pr26943-3.c: Likewise.
	* testsuite/libgomp.c/pr26943-4.c: Likewise.

Co-Authored-By: Jakob Blomer <jakob.blomer@ira.uka.de>
Co-Authored-By: Richard Henderson <rth@redhat.com>
Co-Authored-By: Ulrich Drepper <drepper@redhat.com>

From-SVN: r136433
2008-06-06 15:01:54 +02:00
Kaveh R. Ghazi 3101faab46 alpha.c (alpha_mangle_type, [...]): Constify.
* config/alpha/alpha.c (alpha_mangle_type, decl_has_samegp,
	alpha_in_small_data_p, alpha_split_complex_arg,
	alpha_stdarg_optimize_hook, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
	Constify.
	* config/arm/arm-protos.h (arm_mangle_type): Likewise.
	* config/arm/arm.c (arm_comp_type_attributes, arm_mangle_type):
	Likewise.
	* config/bfin/bfin.c (funkind, bfin_comp_type_attributes,
	TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise.
	* config/darwin-protos.h (darwin_binds_local_p): Likewise.
	* config/darwin.c (darwin_binds_local_p): Likewise.
	* config/frv/frv.c (frv_string_begins_with, frv_in_small_data_p):
	Likewise.
	* config/i386/i386-protos.h (i386_pe_binds_local_p,
	i386_pe_valid_dllimport_attribute_p): Likewise.
	* config/i386/i386.c (ix86_function_regparm,
	ix86_comp_type_attributes, ix86_ms_bitfield_layout_p,
	x86_can_output_mi_thunk, ix86_mangle_type,
	TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise.
	* config/i386/winnt.c (i386_pe_valid_dllimport_attribute_p,
	i386_pe_binds_local_p): Likewise.
	* config/ia64/ia64.c
	(ia64_first_cycle_multipass_dfa_lookahead_guard_spec,
	ia64_needs_block_p, ia64_in_small_data_p, ia64_mangle_type,
	ia64_invalid_conversion, ia64_invalid_unary_op,
	ia64_invalid_binary_op, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
	Likewise.
	* config/m32c/m32c.c (m32c_comp_type_attributes): Likewise.
	* config/m32r/m32r.c (m32r_in_small_data_p): Likewise.
	* config/m68k/m68k.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK): Likewise.
	* config/mips/mips.c (mips_use_blocks_for_constant_p,
	mips_in_small_data_p, mips_use_anchors_for_symbol_p,
	mips_comp_type_attributes, TARGET_ASM_CAN_OUTPUT_MI_THUNK,
	mips_near_type_p, mips_far_type_p, mips_global_symbol_p,
	mips_symbol_binds_local_p, mips_classify_symbol): Likewise.
	* config/pa/pa.c (pa_commutative_p): Likewise.
	* config/rs6000/rs6000-protos.h (rs6000_elf_in_small_data_p):
	Likewise.
	* config/rs6000/rs6000.c (rs6000_invalid_within_doloop,
	rs6000_ms_bitfield_layout_p, rs6000_mangle_type,
	rs6000_use_blocks_for_constant_p,
	rs6000_vector_alignment_reachable, rs6000_is_opaque_type,
	invalid_arg_for_unprototyped_fn, TARGET_ASM_CAN_OUTPUT_MI_THUNK,
	TARGET_SPLIT_COMPLEX_ARG, rs6000_elf_in_small_data_p): Likewise.
	* config/s390/s390.c (s390_mangle_type,
	TARGET_ASM_CAN_OUTPUT_MI_THUNK, TARGET_INVALID_WITHIN_DOLOOP):
	Likewise.
	* config/score/score.c (TARGET_ASM_CAN_OUTPUT_MI_THUNK,
	th_in_small_data_p): Likewise.
	* config/sh/sh.c (sh_ms_bitfield_layout_p,
	sh_dwarf_calling_convention, TARGET_ASM_CAN_OUTPUT_MI_THUNK):
	Likewise.
	* config/sparc/sparc.c (sparc_can_output_mi_thunk,
	sparc_mangle_type): Likewise.
	* config/spu/spu.c (spu_vector_alignment_reachable): Likewise.
	* config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): Likewise.
	* emit-rtl.c (const_fixed_htab_hash, const_fixed_htab_eq):
	Likewise.
	* hooks.c (hook_bool_mode_const_rtx_false,
	hook_bool_mode_const_rtx_true,
	hook_bool_const_tree_hwi_hwi_const_tree_false,
	hook_bool_const_tree_hwi_hwi_const_tree_true,
	hook_int_const_tree_0, hook_int_const_tree_const_tree_1,
	hook_constcharptr_const_tree_null,
	hook_constcharptr_const_rtx_null,
	hook_constcharptr_const_tree_const_tree_null,
	hook_constcharptr_int_const_tree_null,
	hook_constcharptr_int_const_tree_const_tree_null): New.
	(hook_bool_mode_rtx_false, hook_bool_mode_rtx_true,
	hook_bool_tree_hwi_hwi_tree_false,
	hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0,
	hook_int_tree_tree_1, hook_constcharptr_tree_null,
	hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null,
	hook_constcharptr_int_tree_null,
	hook_constcharptr_int_tree_tree_null): Delete.
	(default_can_output_mi_thunk_no_vcall): Constify.
	* hooks.h (hook_bool_mode_rtx_false, hook_bool_mode_rtx_true,
	hook_bool_tree_hwi_hwi_tree_false,
	hook_bool_tree_hwi_hwi_tree_true, hook_int_tree_0,
	hook_int_tree_tree_1, hook_constcharptr_tree_null,
	hook_constcharptr_rtx_null, hook_constcharptr_tree_tree_null,
	hook_constcharptr_int_tree_null,
	hook_constcharptr_int_tree_tree_null): Delete.
	(hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true,
	hook_bool_const_tree_hwi_hwi_const_tree_false,
	hook_bool_const_tree_hwi_hwi_const_tree_true,
	hook_int_const_tree_0, hook_int_const_tree_const_tree_1,
	hook_constcharptr_const_tree_null,
	hook_constcharptr_const_rtx_null,
	hook_constcharptr_const_tree_const_tree_null,
	hook_constcharptr_int_const_tree_null,
	hook_constcharptr_int_const_tree_const_tree_null): New.
	(default_can_output_mi_thunk_no_vcall): Constify.
	* integrate.c (function_attribute_inlinable_p): Likewise.
	* integrate.h (function_attribute_inlinable_p): Likewise.
	* jump.c (rtx_renumbered_equal_p): Likewise.
	* output.h (decl_readonly_section, categorize_decl_for_section,
	default_use_anchors_for_symbol_p, default_binds_local_p,
	default_binds_local_p_1): Likewise.
	* rtl.h (rtx_renumbered_equal_p, decl_default_tls_model):
	Likewise.
	* target-def.h (TARGET_ASM_CAN_OUTPUT_MI_THUNK,
	TARGET_VALID_DLLIMPORT_ATTRIBUTE_P, TARGET_VECTOR_OPAQUE_P,
	TARGET_COMMUTATIVE_P, TARGET_USE_BLOCKS_FOR_CONSTANT_P,
	TARGET_COMP_TYPE_ATTRIBUTES,
	TARGET_FUNCTION_ATTRIBUTE_INLINABLE_P,
	TARGET_MS_BITFIELD_LAYOUT_P, TARGET_MANGLE_TYPE,
	TARGET_IN_SMALL_DATA_P, TARGET_INVALID_CONVERSION,
	TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP,
	TARGET_DWARF_CALLING_CONVENTION): Likewise.
	* target.h (can_output_mi_thunk, needs_block_p,
	first_cycle_multipass_dfa_lookahead_guard_spec,
	vector_alignment_reachable, comp_type_attributes,
	function_attribute_inlinable_p, ms_bitfield_layout_p, mangle_type,
	commutative_p, use_blocks_for_constant_p,
	use_anchors_for_symbol_p, in_small_data_p, binds_local_p,
	vector_opaque_p, dwarf_calling_convention, stdarg_optimize_hook,
	invalid_within_doloop, valid_dllimport_attribute_p,
	split_complex_arg, invalid_arg_for_unprototyped_fn,
	invalid_conversion, invalid_unary_op, invalid_binary_op):
	Likewise.
	* targhooks.c (default_invalid_within_doloop,
	hook_invalid_arg_for_unprototyped_fn,
	default_builtin_vector_alignment_reachable): Likewise.
	(hook_bool_rtx_commutative_p): Delete.
	(hook_bool_const_rtx_commutative_p): New.
	* targhooks.h (default_invalid_within_doloop,
	default_builtin_vector_alignment_reachable,
	hook_invalid_arg_for_unprototyped_fn): Constify.
	(hook_bool_rtx_commutative_p): Delete.
	(hook_bool_const_rtx_commutative_p): New.
	* varasm.c (bss_initializer_p, decl_default_tls_model,
	categorize_decl_for_section, decl_readonly_section,
	default_use_anchors_for_symbol_p, default_binds_local_p,
	default_binds_local_p_1): Constify.

From-SVN: r127785
2007-08-24 19:00:59 +00:00
Kaveh R. Ghazi 586de21898 arc-protos.h (arc_select_cc_mode, gen_compare_reg): Wrap in RTX_CODE macro guard.
* config/arc/arc-protos.h arc_select_cc_mode, gen_compare_reg):
	Wrap in RTX_CODE macro guard.
	* config/arm/pe.c (arm_dllexport_p, arm_dllimport_p,
	arm_dllexport_name_p, arm_dllimport_name_p, arm_mark_dllexport,
	arm_mark_dllimport, arm_pe_encode_section_info,
	arm_pe_unique_section): Use ISO-C function declarations.
	* config/c4x/c4x-c.c (c4x_parse_pragma, c4x_pr_CODE_SECTION,
	c4x_pr_DATA_SECTION, c4x_pr_FUNC_IS_PURE,
	c4x_pr_FUNC_NEVER_RETURNS, c4x_pr_INTERRUPT, c4x_pr_ignored):
	Likewise.
	* config/iq2000/iq2000.h (ASM_OUTPUT_SKIP): Fix format warning.
	* config/m68hc11/m68hc11.h (ASM_OUTPUT_EXTERNAL): Undef before
	defining.
	* config/mips/mips.h (ASM_DECLARE_OBJECT_NAME): Fix format
	warnings.
	* config/mn10300/mn10300.h (OUTPUT_ADDR_CONST_EXTRA): Likewise.
	* config/pdp11/pdp11.c (pdp11_output_function_epilogue): Likewise.
	(register_move_cost): Use ISO-C function declarations.
	* config/pdp11/pdp11.h (PRINT_OPERAND): Fix format warnings.
	* config/score/score-protos.h (score_declare_object): Add
	ATTRIBUTE_PRINTF_4.
	* config/score/score.h (ASM_DECLARE_OBJECT_NAME): Fix format
	warnings.
	* final.c (profile_function): Avoid empty if-bodies.
	
	
	* calls.c (must_pass_in_stack_var_size,
	must_pass_in_stack_var_size_or_pad): Constify.
	* config/alpha/alpha-protos.h (function_value): Likewise.
	* config/alpha/alpha.c (alpha_return_in_memory,
	alpha_pass_by_reference, function_value,
	unicosmk_must_pass_in_stack, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* config/arc/arc.c (arc_return_in_memory, arc_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/arm/arm-protos.h (arm_return_in_memory,
	arm_pad_arg_upward, arm_function_value): Likewise.
	* config/arm/arm.c (arm_pass_by_reference,
	arm_promote_prototypes, arm_return_in_msb, arm_must_pass_in_stack,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	arm_function_value, arm_return_in_memory, arm_pad_arg_upward):
	Likewise.
	* config/arm/arm.h (ARM_DECLARE_FUNCTION_NAME): Likewise.
	* config/avr/avr-protos.h (avr_function_value): Likewise.
	* config/avr/avr.c (avr_return_in_memory,
	gas_output_limited_string, gas_output_ascii, avr_function_value,
	avr_return_in_memory): Likewise.
	* config/bfin/bfin-protos.h (bfin_return_in_memory): Likewise.
	* config/bfin/bfin.c (bfin_pass_by_reference,
	bfin_return_in_memory, TARGET_PROMOTE_PROTOTYPES,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN):
	Likewise.
	* config/cris/cris.c (cris_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS): Likewise.
	* config/crx/crx.c (crx_return_in_memory): Likewise.
	* config/darwin.c (function_base, machopic_function_base_name):
	Likewise.
	* config/fr30/fr30.c (fr30_must_pass_in_stack,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/frv/frv.c (frv_must_pass_in_stack): Likewise.
	* config/h8300/h8300.c (h8300_return_in_memory): Likewise.
	* config/i386/i386-protos.h (ix86_return_in_memory,
	ix86_sol10_return_in_memory): Likewise.
	* config/i386/i386.c (ix86_function_value,
	ix86_function_sseregparm, ix86_must_pass_in_stack,
	type_natural_mode, classify_argument, examine_argument,
	construct_container, ix86_pass_by_reference, function_value_32,
	function_value_64, ix86_function_value_1, return_in_memory_32,
	return_in_memory_64, return_in_memory_ms_64,
	ix86_return_in_memory, ix86_sol10_return_in_memory,
	TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/ia64/ia64-protos.h (ia64_function_value,
	ia64_hpux_function_arg_padding): Likewise.
	* config/ia64/ia64.c (hfa_element_mode, ia64_return_in_memory,
	ia64_function_value, bundle_state_hash, bundle_state_eq_p,
	ia64_hpux_function_arg_padding): Likewise.
	* config/iq2000/iq2000-protos.h (function_arg,
	iq2000_function_value): Likewise.
	* config/iq2000/iq2000.c (iq2000_return_in_memory,
	iq2000_pass_by_reference, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	function_arg, iq2000_function_value): Likewise.
	* config/m32c/m32c-protos.h (m32c_function_value,
	m32c_promote_function_return): Likewise.
	* config/m32c/m32c.c (m32c_pass_by_reference,
	m32c_promote_prototypes, m32c_promote_function_return,
	m32c_function_value): Likewise.
	* config/m32r/m32r.c (m32r_return_in_memory,
	m32r_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
	m32r_in_small_data_p): Likewise.
	* config/m68hc11/m68hc11-protos.h (m68hc11_function_arg_padding):
	Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_return_in_memory,
	m68hc11_function_arg_padding): Likewise.
	* config/m68k/m68k-protos.h (m68k_function_value): Likewise.
	* config/m68k/m68k.c (TARGET_PROMOTE_PROTOTYPES,
	m68k_function_value): Likewise.
	* config/mcore/mcore-protos.h (mcore_num_arg_regs,
	mcore_function_value): Likewise.
	* config/mcore/mcore.c (handle_structs_in_regs,
	mcore_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	mcore_num_arg_regs, mcore_function_value): Likewise.
	* config/mips/mips-protos.h (mips_pad_arg_upward,
	mips_function_value): Likewise.
	* config/mips/mips.c (mips_fpr_return_fields, mips_return_in_msb,
	mips_return_in_memory, mips_pass_by_reference, mips_callee_copies,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES, mips_pad_arg_upward,
	mips_function_value): Likewise.
	* config/mmix/mmix-protos.h (mmix_function_outgoing_value):
	Likewise.
	* config/mmix/mmix.c (mmix_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, mmix_function_outgoing_value,
	mmix_encode_section_info): Likewise.
	* config/mn10300/mn10300-protos.h (mn10300_function_value):
	Likewise.
	* config/mn10300/mn10300.c (mn10300_return_in_memory,
	mn10300_pass_by_reference, TARGET_PROMOTE_PROTOTYPES,
	mn10300_function_value): Likewise.
	* config/mt/mt-protos.h (mt_function_value): Likewise.
	* config/mt/mt.c (mt_pass_by_reference, mt_function_value,
	mt_pass_in_stack, TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/pa/pa-protos.h (function_arg_padding, function_value,
	pa_return_in_memory): Likewise.
	* config/pa/pa.c (pa_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	function_arg_padding, function_value, pa_return_in_memory):
	Likewise.
	* config/pdp11/pdp11.c (pdp11_return_in_memory): Likewise.
	* config/rs6000/rs6000-protos.h (rs6000_function_value,
	function_arg_padding): Likewise.
	* config/rs6000/rs6000.c (rs6000_return_in_memory,
	rs6000_darwin64_record_arg_recurse, rs6000_darwin64_record_arg,
	rs6000_pass_by_reference, rs6000_must_pass_in_stack,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	function_arg_padding, altivec_expand_dst_builtin,
	altivec_expand_builtin, rs6000_expand_builtin, spe_init_builtins,
	altivec_init_builtins, rs6000_common_init_builtins,
	rs6000_function_value): Likewise.
	* s390/s390-protos.h (s390_function_value): Likewise.
	* config/s390/s390.c (s390_function_arg_size,
	s390_pass_by_reference, s390_return_in_memory,
	s390_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Likewise.
	* config/score/score-protos.h (score_function_value): Likewise.
	* config/score/score.c (score_arg_partial_bytes,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	TARGET_PROMOTE_PROTOTYPES, score_return_in_memory,
	score_pass_by_reference, score_add_offset, score_function_value):
	Likewise.
	* config/sh/sh-protos.h (sh_attr_renesas_p,
	sh_promote_prototypes): Likewise.
	* config/sh/sh.c (sh_return_in_memory, sh_pass_by_reference,
	sh_callee_copies, sh_promote_prototypes, shcompact_byref,
	sh_attr_renesas_p): Likewise.
	* config/sparc/sparc-protos.h (function_value,
	function_arg_padding): Likewise.
	* config/sparc/sparc.c (sparc_promote_prototypes,
	sparc_return_in_memory, sparc_pass_by_reference,
	TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN,
	function_arg_record_value_2, function_arg_record_value_1,
	function_arg_record_value, function_arg_record_value,
	function_arg_padding, function_value): Likewise.
	* config/spu/spu-protos.h (spu_function_value): Likewise.
	* config/spu/spu.c (spu_pass_by_reference, spu_return_in_memory,
	spu_function_value): Likewise.
	* config/stormy16/stormy16-protos.h (xstormy16_function_value):
	Likewise.
	* config/stormy16/stormy16.c (xstormy16_return_in_memory,
	xstormy16_function_value, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* config/v850/v850.c (v850_return_in_memory,
	v850_pass_by_reference, TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/vax/vax.c (TARGET_PROMOTE_PROTOTYPES): Likewise.
	* config/xtensa/xtensa.c (xtensa_return_in_msb,
	xtensa_return_in_memory, TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES):
	Likewise.
	* explow.c (promote_mode, hard_function_value): Likewise.
	* expr.h (hard_function_value, promote_mode): Likewise.
	* function.c (aggregate_value_p): Likewise.
	* hooks.c (hook_bool_const_tree_true): New.
	* hooks.h (hook_bool_const_tree_true): New.
	* sdbout.c (SET_KNOWN_TYPE_TAG, plain_type_1): Constify.
	* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	TARGET_RETURN_IN_MSB): Likewise.
	* target.h (promote_function_args, promote_function_return,
	promote_prototypes, return_in_memory, return_in_msb,
	pass_by_reference, must_pass_in_stack, callee_copies,
	function_value): Likewise.
	* targhooks.c (default_return_in_memory,
	hook_pass_by_reference_must_pass_in_stack,
	hook_callee_copies_named,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
	default_function_value): Likewise. 
	* targhooks.h (default_return_in_memory,
	hook_pass_by_reference_must_pass_in_stack,
	hook_callee_copies_named,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false,
	hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true,
	default_function_value): Likewise.
	* tree-ssa-structalias.c (const_equiv_class_label_t): New.
	(equiv_class_label_hash, equiv_class_label_eq): Constify.
	* tree-vectorizer.c (bb_in_loop_p): Likewise.
	* tree.c (needs_to_live_in_memory): Likewise.
	* tree.h (struct tree_type, needs_to_live_in_memory,
	aggregate_value_p, must_pass_in_stack_var_size,
	must_pass_in_stack_var_size_or_pad): Likewise.
	* vmsdbgout.c (write_debug_addr, write_debug_delta4,
	write_debug_string, ASM_OUTPUT_DEBUG_STRING, write_rtnbeg,
	lookup_filename): Likewise.

From-SVN: r127743
2007-08-23 15:49:56 +00:00
Kaveh R. Ghazi ac7d7749c0 c-common.c (const_strip_array_types): New.
* c-common.c (const_strip_array_types): New.
	* c-common.h (lang_missing_noreturn_ok_p): Delete.
	(const_strip_array_types): New.
	* c-objc-common.c (c_disregard_inline_limits,
	c_warn_unused_global_decl): Constify.
	* c-tree.h (c_disregard_inline_limits, c_warn_unused_global_decl,
	c_vla_type_p, c_incomplete_type_error): Likewise.
	* c-typeck.c (c_incomplete_type_error, c_vla_type_p): Likewise.
	* hooks.c (hook_bool_const_tree_false): New.
	* hooks.h (hook_bool_const_tree_false): Likewise.
	* langhooks-def.h (lhd_warn_unused_global_decl,
	lhd_incomplete_type_error, lhd_expr_size,
	lhd_tree_inlining_disregard_inline_limits,
	lhd_tree_inlining_auto_var_in_fn_p, lhd_tree_dump_type_quals,
	LANG_HOOKS_GENERIC_TYPE_P, LANG_HOOKS_TYPE_MAX_SIZE): Constify.
	* langhooks.c (lhd_warn_unused_global_decl,
	lhd_incomplete_type_error,
	lhd_tree_inlining_disregard_inline_limits,
	lhd_tree_inlining_auto_var_in_fn_p, lhd_tree_dump_type_quals,
	lhd_expr_size): Likewise.
	* langhooks.h (lang_hooks_for_tree_inlining,
	lang_hooks_for_tree_dump, lang_hooks_for_types,
	lang_hooks_for_decls, lang_hooks): Likewise.
	* pointer-set.c (pointer_set_t, pointer_set_create,
	pointer_set_contains, insert_aux, pointer_set_insert,
	pointer_set_traverse, pointer_map_t, pointer_map_create,
	pointer_map_contains, pointer_map_insert, pointer_map_traverse):
	Likewise.
	* pointer-set.h (pointer_set_contains, pointer_set_insert,
	pointer_set_traverse, pointer_map_contains, pointer_map_insert,
	pointer_map_traverse): Likewise.
	* predict.c (assert_is_empty): Likewise.
	* tree-affine.c (free_name_expansion): Likewise.
	* tree-cfg.c (edge_to_cases_cleanup): Likewise.
	* tree.c (size_in_bytes, max_int_size_in_bytes): Likewise.
	* tree.h (size_in_bytes, max_int_size_in_bytes): Likewise.
	
ada:
	* misc.c (gnat_type_max_size): Constify.

cp:
	* cp-objcp-common.c (cxx_warn_unused_global_decl, cp_expr_size):
	Constify.
	* cp-tree.h (local_variable_p, nonstatic_local_decl_p,
	class_tmpl_impl_spec_p, cp_auto_var_in_fn_p, cp_type_quals,
	cxx_incomplete_type_diagnostic, cxx_incomplete_type_error,
	cxx_warn_unused_global_decl, cp_expr_size): Likewise.
	* decl.c (local_variable_p, nonstatic_local_decl_p): Likewise.
	* tree.c (class_tmpl_impl_spec_p, cp_auto_var_in_fn_p): Likewise.
	* typeck.c (cp_type_quals): Likewise.
	* typeck2.c (cxx_incomplete_type_diagnostic,
	cxx_incomplete_type_error): Likewise.

From-SVN: r127560
2007-08-16 14:31:21 +00:00
Nick Clifton 9dcd6f09a3 Change copyright header to refer to version 3 of the GNU General Public License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
2007-07-26 08:37:01 +00:00
Uros Bizjak cc2137be63 targhooks.c (default_builtin_reciprocal): New default target hook.
* targhooks.c (default_builtin_reciprocal): New default target hook.
        * targhooks.h (default_builtin_reciprocal): Add prototype.
        * hooks.c (hook_tree_tree_bool_null): Remove hook.
        * hooks.h (hook_tree_tree_bool_null): Remove prototype.
        * target-def.h (TARGET_BUILTIN_RECIPROCAL): Define as
        default_builtin_reciprocal.

From-SVN: r125758
2007-06-16 20:52:11 +02:00
Uros Bizjak 6b889d891d re PR middle-end/31723 (Use reciprocal and reciprocal square root with -ffast-math)
PR middle-end/31723
    * hooks.c (hook_tree_tree_bool_null): New hook.
    * hooks.h (hook_tree_tree_bool_null): Add prototype.
    * tree-pass.h (pass_convert_to_rsqrt): Declare.
    * passes.c (init_optimization_passes): Add pass_convert_to_rsqrt.
    * tree-ssa-math-opts.c (execute_cse_reciprocals): Scan for a/func(b)
    and convert it to reciprocal a*rfunc(b).
    (execute_convert_to_rsqrt): New function.
    (gate_convert_to_rsqrt): New function.
    (pass_convert_to_rsqrt): New pass definition.
    * target.h (struct gcc_target): Add builtin_reciprocal.
    * target-def.h (TARGET_BUILTIN_RECIPROCAL): New define.
    (TARGET_INITIALIZER): Initialize builtin_reciprocal with
    TARGET_BUILTIN_RECIPROCAL.
    * doc/tm.texi (TARGET_BUILTIN_RECIPROCAL): Document.

    * config/i386/i386.h (TARGET_RECIP): New define.
    * config/i386/i386.md (divsf3): Expand by calling ix86_emit_swdivsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (*rcpsf2_sse): New insn pattern.
    (*rsqrtsf2_sse): Ditto.
    (rsqrtsf2): New expander.  Expand by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (sqrt<mode>2): Expand SFmode operands by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    * config/i386/sse.md (divv4sf): Expand by calling ix86_emit_swdivsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (*sse_rsqrtv4sf2): Do not export.
    (sqrtv4sf2): Ditto.
    (sse_rsqrtv4sf2): New expander.  Expand by calling ix86_emit_swsqrtsf
    for TARGET_SSE_MATH and TARGET_RECIP when
    flag_unsafe_math_optimizations is set and not optimizing for size.
    (sqrtv4sf2): Ditto.
    * config/i386/i386.opt (mrecip): New option.
    * config/i386/i386-protos.h (ix86_emit_swdivsf): Declare.
    (ix86_emit_swsqrtsf): Ditto.
    * config/i386/i386.c (IX86_BUILTIN_RSQRTF): New constant.
    (ix86_init_mmx_sse_builtins): __builtin_ia32_rsqrtf: New
    builtin definition.
    (ix86_expand_builtin): Expand IX86_BUILTIN_RSQRTF using
    ix86_expand_unop1_builtin.
    (ix86_emit_swdivsf): New function.
    (ix86_emit_swsqrtsf): Ditto.
    (ix86_builtin_reciprocal): New function.
    (TARGET_BUILTIN_RECIPROCAL): Use it.
    (ix86_vectorize_builtin_conversion): Rename from
    ix86_builtin_conversion.
    (TARGET_VECTORIZE_BUILTIN_CONVERSION): Use renamed function.
    * doc/invoke.texi (Machine Dependent Options): Add -mrecip to
    "i386 and x86_64 Options" section.
    (Intel 386 and AMD x86_64 Options): Document -mrecip.

testsuite/ChangeLog:

    PR middle-end/31723
    * gcc.target/i386/recip-divf.c: New test.
    * gcc.target/i386/recip-sqrtf.c: Ditto.
    * gcc.target/i386/recip-vec-divf.c: Ditto.
    * gcc.target/i386/recip-vec-sqrtf.c: Ditto.
    * gcc.target/i386/sse-recip.c: Ditto.

From-SVN: r125756
2007-06-16 11:52:48 +02:00
Richard Sandiford 1d3dbd99b6 hooks.c (hook_bool_mode_rtx_true): New function.
* hooks.c (hook_bool_mode_rtx_true): New function.
	* hooks.h (hook_bool_mode_rtx_true): Declare.
	* toplev.c (compile_file): Call output_shared_constant_pool.
	* varasm.c (shared_constant_pool): New variable.
	(assemble_start_function, assemble_end_function): Remove arguments
	from call to output_constant_pool.
	(create_constant_pool): New function, split out from...
	(init_varasm_status): ...here.
	(force_const_mem): Choose between the shared and per-function constant
	pools.  Set current_function_uses_const_pool when reusing old entries
	as well as when creating new ones.
	(mark_constant): Ignore data argument.
	(mark_constants): Remove pool argument.
	(mark_constant_pool): Likewise.  Use current_function_uses_const_pool
	to decide whether the function uses a constant pool.
	(output_constant_pool_contents): New function, split out from...
	(output_constant_pool): ...here.
	(output_shared_constant_pool): New function.
	(init_varasm_once): Initialize shared_constant_pool.
	* output.h (output_constant_pool): Delete.
	(output_shared_constant_pool): Declare.
	* config/s390/s390-protos.h (s390_output_constant_pool): Delete.
	* config/i386/i386.c (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Override.

From-SVN: r111804
2006-03-07 07:41:39 +00:00
Richard Sandiford aacd3885eb re PR target/9703 ([arm] Accessing data through constant pool more times could be solved in less instructions)
* cselib.c (cselib_init): Change RTX_SIZE to RTX_CODE_SIZE.
	* emit-rtl.c (copy_rtx_if_shared_1): Use shallow_copy_rtx.
	(copy_insn_1): Likewise.  Don't copy each field individually.
	Reindent.
	* read-rtl.c (apply_macro_to_rtx): Use RTX_CODE_SIZE instead
	of RTX_SIZE.
	* reload1.c (eliminate_regs): Use shallow_copy_rtx.
	* rtl.c (rtx_size): Rename variable to...
	(rtx_code_size): ...this.
	(rtx_size): New function.
	(rtx_alloc_stat): Use RTX_CODE_SIZE instead of RTX_SIZE.
	(copy_rtx): Use shallow_copy_rtx.  Don't copy each field individually.
	Reindent.
	(shallow_copy_rtx_stat): Use rtx_size instead of RTX_SIZE.
	* rtl.h (rtx_code_size): New variable.
	(rtx_size): Change from a variable to a function.
	(RTX_SIZE): Rename to...
	(RTX_CODE_SIZE): ...this.

	PR target/9703
	PR tree-optimization/17106
	* doc/tm.texi (TARGET_USE_BLOCKS_FOR_CONSTANT_P): Document.
	(Anchored Addresses): New section.
	* doc/invoke.texi (-fsection-anchors): Document.
	* doc/rtl.texi (SYMBOL_REF_IN_BLOCK_P, SYMBOL_FLAG_IN_BLOCK): Likewise.
	(SYMBOL_REF_ANCHOR_P, SYMBOL_FLAG_ANCHOR): Likewise.
	(SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): Likewise.
	* hooks.c (hook_bool_mode_rtx_false): New function.
	* hooks.h (hook_bool_mode_rtx_false): Declare.
	* gengtype.c (create_optional_field): New function.
	(adjust_field_rtx_def): Add the "block_sym" field for SYMBOL_REFs when
	SYMBOL_REF_IN_BLOCK_P is true.
	* target.h (output_anchor, use_blocks_for_constant_p): New hooks.
	(min_anchor_offset, max_anchor_offset): Likewise.
	(use_anchors_for_symbol_p): New hook.
	* toplev.c (compile_file): Call output_object_blocks.
	(target_supports_section_anchors_p): New function.
	(process_options): Check that -fsection-anchors is only used on
	targets that support it and when -funit-at-a-time is in effect.
	* tree-ssa-loop-ivopts.c (prepare_decl_rtl): Only create DECL_RTL
	if the decl doesn't have one.
	* dwarf2out.c: Remove instantiations of VEC(rtx,gc).
	* expr.c (emit_move_multi_word, emit_move_insn): Pass the result
	of force_const_mem through use_anchored_address.
	(expand_expr_constant): New function.
	(expand_expr_addr_expr_1): Call it.  Use the same modifier when
	calling expand_expr for INDIRECT_REF.
	(expand_expr_real_1): Pass DECL_RTL through use_anchored_address
	for all modifiers except EXPAND_INITIALIZER.  Use expand_expr_constant.
	* expr.h (use_anchored_address): Declare.
	* loop-unroll.c: Don't declare rtx vectors here.
	* explow.c: Include output.h.
	(validize_mem): Call use_anchored_address.
	(use_anchored_address): New function.
	* common.opt (-fsection-anchors): New switch.
	* varasm.c (object_block_htab, anchor_labelno): New variables.
	(hash_section, object_block_entry_eq, object_block_entry_hash)
	(use_object_blocks_p, get_block_for_section, create_block_symbol)
	(use_blocks_for_decl_p, change_symbol_section): New functions.
	(get_variable_section): New function, split out from assemble_variable.
	(make_decl_rtl): Create a block symbol if use_object_blocks_p and
	use_blocks_for_decl_p say so.  Use change_symbol_section if the
	symbol has already been created.
	(assemble_variable_contents): New function, split out from...
	(assemble_variable): ...here.  Don't output any code for
	block symbols; just pass them to place_block_symbol.
	Use get_variable_section and assemble_variable_contents.
	(get_constant_alignment, get_constant_section, get_constant_size): New
	functions, split from output_constant_def_contents.
	(build_constant_desc): Create a block symbol if use_object_blocks_p
	says so.  Or into SYMBOL_REF_FLAGS.
	(assemble_constant_contents): New function, split from...
	(output_constant_def_contents): ...here.  Don't output any code
	for block symbols; just pass them to place_section_symbol.
	Use get_constant_section and get_constant_alignment.
	(force_const_mem): Create a block symbol if use_object_blocks_p and
	use_blocks_for_constant_p say so.  Or into SYMBOL_REF_FLAGS.
	(output_constant_pool_1): Add an explicit alignment argument.
	Don't switch sections here.
	(output_constant_pool): Adjust call to output_constant_pool_1.
	Switch sections here instead.  Don't output anything for block symbols;
	just pass them to place_block_symbol.
	(init_varasm_once): Initialize object_block_htab.
	(default_encode_section_info): Keep the old SYMBOL_FLAG_IN_BLOCK.
	(default_asm_output_anchor, default_use_aenchors_for_symbol_p)
	(place_block_symbol, get_section_anchor, output_object_block)
	(output_object_block_htab, output_object_blocks): New functions.
	* target-def.h (TARGET_ASM_OUTPUT_ANCHOR): New macro.
	(TARGET_ASM_OUT): Include it.
	(TARGET_USE_BLOCKS_FOR_CONSTANT_P): New macro.
	(TARGET_MIN_ANCHOR_OFFSET, TARGET_MAX_ANCHOR_OFFSET): New macros.
	(TARGET_USE_ANCHORS_FOR_SYMBOL_P): New macro.
	(TARGET_INITIALIZER): Include them.
	* rtl.c (rtl_check_failed_block_symbol): New function.
	* rtl.h: Include vec.h.  Declare heap and gc rtx vectors.
	(block_symbol, object_block): New structures.
	(rtx_def): Add a block_symbol field to the union.
	(BLOCK_SYMBOL_CHECK): New macro.
	(rtl_check_failed_block_symbol): Declare.
	(SYMBOL_FLAG_IN_BLOCK, SYMBOL_FLAG_ANCHOR): New SYMBOL_REF flags.
	(SYMBOL_REF_IN_BLOCK_P, SYMBOL_REF_ANCHOR_P): New predicates.
	(SYMBOL_FLAG_MACH_DEP_SHIFT): Bump by 2.
	(SYMBOL_REF_BLOCK, SYMBOL_REF_BLOCK_OFFSET): New accessors.
	* output.h (output_section_symbols): Declare.
	(object_block): Name structure.
	(place_section_symbol, get_section_anchor, default_asm_output_anchor)
	(default_use_anchors_for_symbol_p): Declare.
	* Makefile.in (RTL_BASE_H): Add vec.h.
	(explow.o): Depend on output.h.
	* config/rs6000/rs6000.c (TARGET_MIN_ANCHOR_OFFSET): Override default.
	(TARGET_MAX_ANCHOR_OFFSET): Likewise.
	(TARGET_USE_BLOCKS_FOR_CONSTANT_P): Likewise.
	(rs6000_use_blocks_for_constant_p): New function.

From-SVN: r111254
2006-02-18 22:06:53 +00:00
Kazu Hirata 7b2352d90d hooks.c (hook_bool_rtx_int_false): Remove.
* hooks.c (hook_bool_rtx_int_false): Remove.
	* hooks.h: Remove the prototype for hook_bool_rtx_int_false.

From-SVN: r110348
2006-01-28 23:26:38 +00:00
Diego Novillo 953ff28998 [multiple changes]
2006-01-18  Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* libgomp: New directory.
	* Makefile.def: Add target_module libgomp.
	* Makefile.in: Regenerate.
	* configure.in (target_libraries): Add target-libgomp.
	* configure: Regenerate.


contrib/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* gcc_update (files_and_dependencies): Add libgomp files.


gcc/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* omp-low.c: New file.
	* c-omp.c: New file.

2006-01-18  Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* doc/invoke.texi: Document -fopenmp.
	* tree-dump.h (debug_function): Declare.

	* hooks.c (hook_bool_tree_bool_false): New function.
	(hook_tree_tree_null): Remove.
	(hook_tree_tree_tree_null): New.
	* hooks.h: Update to match.

	* tree-pretty-print.c (debug_tree_chain): New.
	(print_generic_expr): Handle TDF_CHAIN.
	(dump_generic_node): Handle BLOCK.
	Do not abort with incomplete SWITCH_EXPRs.
	Do not dump body of an OpenMP directive if TDF_SLIM is given.
	<case OMP_PARALLEL, OMP_FOR, OMP_SECTIONS>: Don't
	print space after directive name.
	<OMP_FOR>: Handle printing OMP_FOR_PRE_BODY.
	Handle OMP_MASTER and OMP_ORDERED.
	Handle printing of OMP_BODY just in one place, goto
	dump_omp_body in the rest of OMP_* nodes that have
	OMP_BODY.
	Don't handle clause nodes here.  Update omp statements to
	use dump_omp_clauses.
	Handle OMP_SINGLE, OMP_SECTIONS, OMP_SECTION,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_SCHEDULE, OMP_ATOMIC,
	OMP_CRITICAL, OMP_CLAUSE_NOWAIT, GOMP_CLAUSE_IF,
	GOMP_CLAUSE_NUM_THREADS, GOMP_FOR, GOMP_CLAUSE_SHARED,
	GOMP_CLAUSE_FIRSTPRIVATE, GOMP_CLAUSE_LASTPRIVATE,
	GOMP_CLAUSE_COPYIN and GOMP_CLAUSE_COPYPRIVATE.
	Adjust output for GOMP_PARALLEL.
	(dump_omp_clauses): New.
	(print_declaration): Dump DECL_VALUE_EXPR.
	(op_symbol_1): Split out of op_symbol.
	(dumping_stmts): Remove.  Update all users.

	* cgraph.c (cgraph_analyze_queue): New.
	(cgraph_add_new_function): New.
	* cgraph.h (cgraph_analyze_queue): Declare.
	(cgraph_add_new_function): Declare.
	(cgraph_lower_function): Remove.

	* tree.c (walk_tree): Walk OMP_CLAUSE_CHAIN of OMP_CLAUSE_*
	nodes.  Use switch for all nodes, handle most of IS_EXPR_CODE_CLASS
	and TYPE_P nodes in its default clause.
	(empty_body_p): New.
	(tree_range_check_failed): New.
	(build5_stat): New.

	* tree.h (OMP_CLAUSE_REDUCTION_INIT,
	OMP_CLAUSE_REDUCTION_MERGE,
	OMP_CLAUSE_REDUCTION_PLACEHOLDER,
	OMP_CLAUSE_PRIVATE_DEBUG,
	OMP_CLAUSE_LASTPRIVATE_FIRSTPRIVATE, OMP_FOR_PRE_BODY,
	OMP_MASTER_BODY, OMP_ORDERED_BODY OMP_BODY,
	OMP_CLAUSES, OMP_CLAUSE_DECL, OMP_CLAUSE_DEFAULT_KIND,
	OMP_CLAUSE_CHAIN, OMP_CLAUSE_OUTER_DECL,
	OMP_CLAUSE_INNER_DECL, OMP_CLAUSE_NUM_THREADS_EXPR,
	OMP_CLAUSE_IF_EXPR, OMP_CLAUSE_SCHEDULE_CHUNK_EXPR,
	OMP_CLAUSE_SCHEDULE_CHUNK_SIZE. OMP_PARALLEL_VAR_INIT,
	OMP_PARALLEL_VAR_REDUC, OMP_FOR_VAR_INIT,
	OMP_FOR_VAR_LAST, OMP_FOR_VAR_REDUC,
	OMP_SECTIONS_VAR_INIT, OMP_SECTIONS_VAR_LAST,
	OMP_SECTIONS_VAR_REDUC, OMP_CLAUSE_REDUCTION_CODE
	OMP_SINGLE_CLAUSES, OMP_SINGLE_BODY,
	OMP_CLAUSE_SCHEDULE_CHUNK_SIZE, OMP_SECTION_BODY,
	OMP_CRITICAL_NAME, OMP_CRITICAL_BODY): New.
	(TREE_RANGE_CHECK): New.
	(empty_body_p): Declare.
	(enum omp_clause_default_kind): New.
	(build_string_literal): Declare.
	(enum omp_clause_schedule_kind, OMP_CLAUSE_SCHEDULE_KIND): New.
	(build5_stat, build5): Declare.

	* tree-pass.h (TDF_CHAIN): Define.
	* tree-pass.h (PROP_gimple_lomp): Define.
	(pass_lower_omp): Declare.

	* diagnostic.h (debug_tree_chain): Declare.

	* builtins.c (get_builtin_sync_mode): Use 0 as last argument to
	mode_for_size.
	(expand_builtin): Handle sync BUILT_IN_*_16 builtins.
	* builtins.c (build_string_literal): Make extern.

	* gcc.c (include_spec_function): New.
	(static_spec_functions): Add it.
	(main): Move load of libgomp.spec ...
	(LINK_COMMAND_SPEC): ... here.
	(link_gomp_spec): New.
	(static_specs): Include it.
	(LINK_COMMAND_SPEC): Add link_gomp.
	(GOMP_SELF_SPECS): New.
	(driver_self_specs): Include it.
	(switch_matches): Don't mark inline.
	(main): Load libgomp.spec.

	* tree-gimple.c (is_gimple_stmt): True for OMP_MASTER,
	OMP_ORDERED, OMP_CRITICAL, OMP_SECTIONS, OMP_SECTION,
	and OMP_SINGLE, OMP_FOR and OMP_PARALLEL.

	* tree-gimple.h (enum omp_parallel): Declare.
	(determine_parallel_type): Declare.
	(omp_firstprivatize_variable): Declare.
	(omp_reduction_init): Declare.
	(diagnose_omp_structured_block_errors): Declare.
	(struct walk_stmt_info): Add want_return_expr.
	(struct walk_stmt_info): Add want_bind_expr, want_locations.
	(find_omp_clause): Declare.
	(insert_field_into_struct): Declare.
	(struct walk_stmt_info): Move from tree-nested.c
	(walk_stmts): Declare.

	* c-cppbuiltin.c (c_cpp_builtins): If -fopenmp, #define _OPENMP
	to 200505.

	* cgraphunit.c (cgraph_lower_function): Make static.
	(cgraph_finalize_pending_functions): New.
	(cgraph_finalize_function): Call it.
	(cgraph_finalize_compilation_unit): Likewise.

	* builtin-types.def (BT_I16, BT_FN_I16_VPTR_I16,
	BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
	(BT_FN_UINT_UINT): New.
	(DEF_FUNCTION_TYPE_6, DEF_FUNCTION_TYPE_7,
	DEF_FUNCTION_TYPE_VAR_4): Document.
	(BT_PTR_LONG, BT_PTR_PTR, BT_FN_BOOL, BT_FN_INT,
	BT_FN_VOID_PTRPTR, BT_PTR_FN_VOID_PTR,
	BT_FN_BOOL_LONGPTR_LONGPTR, BT_FN_VOID_OMPFN_PTR_UINT,
	BT_FN_VOID_OMPFN_PTR_UINT_UINT,
	BT_FN_BOOL_LONG_LONG_LONG_LONGPTR_LONGPTR,
	BT_FN_BOOL_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
	BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG): New.

	* builtins.def: Update DEF_BUILTIN comment to include COND argument.
	Move all DEF_SYNC_BUILTIN () and DEF_GOMP_BUILTIN () builtins
	into separate files.
	(DEF_GOMP_BUILTIN): New.
	(BUILT_IN_OMP_GET_THREAD_NUM, BUILT_IN_GOMP_BARRIER,
	BUILT_IN_GOMP_CRITICAL_START, BUILT_IN_GOMP_CRITICAL_END,
	BUILT_IN_GOMP_CRITICAL_NAME_START, BUILT_IN_GOMP_CRITICAL_NAME_END,
	BUILT_IN_GOMP_LOOP_STATIC_START, BUILT_IN_GOMP_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_GUIDED_START, BUILT_IN_GOMP_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_ORDERED_STATIC_START,
	BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_START,
	BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_START,
	BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_STATIC_NEXT, BUILT_IN_GOMP_LOOP_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_GUIDED_NEXT, BUILT_IN_GOMP_LOOP_RUNTIME_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_STATIC_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_DYNAMIC_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_GUIDED_NEXT,
	BUILT_IN_GOMP_LOOP_ORDERED_RUNTIME_NEXT,
	BUILT_IN_GOMP_PARALLEL_LOOP_STATIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_DYNAMIC_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_GUIDED_START,
	BUILT_IN_GOMP_PARALLEL_LOOP_RUNTIME_START,
	BUILT_IN_GOMP_LOOP_END, BUILT_IN_GOMP_LOOP_END_NOWAIT,
	BUILT_IN_GOMP_ORDERED_START, BUILT_IN_GOMP_ORDERED_END,
	BUILT_IN_GOMP_PARALLEL_START, BUILT_IN_GOMP_PARALLEL_END,
	BUILT_IN_GOMP_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_NEXT,
	BUILT_IN_GOMP_PARALLEL_SECTIONS_START, BUILT_IN_GOMP_SECTIONS_END,
	BUILT_IN_GOMP_SECTIONS_END_NOWAIT, BUILT_IN_GOMP_SINGLE_START,
	BUILT_IN_GOMP_SINGLE_COPY_START, BUILT_IN_GOMP_SINGLE_COPY_END): New.
	* sync-builtins.def: New file, moved from builtins.def.
	* omp-builtins.def: New file, moved from builtins.def.

	* c-objc-common.h (LANG_HOOKS_OMP_PREDETERMINED_SHARING): Redefine.

	* gimple-low.c (lower_function_body): Clear data.
	(lower_stmt): Do not handle COMPOUND_EXPR.
	Remove call to print_node_brief.

	* c-tree.h (c_finish_omp_clauses): New prototype.
	(C_DECL_THREADPRIVATE_P): Define.
	(lookup_name_no_remap, c_omp_remap_private): Remove
	(c_begin_omp_parallel, c_finish_omp_parallel): Update.
	(check_for_loop_decls): Update decl.
	(lookup_name_no_remap, c_omp_remap_private): Declare.
	(build_indirect_ref, build_modify_expr, pushdecl,
	pushdecl_top_level): Move to c-common.h.

	* dwarf2out.c (loc_descriptor_from_tree_1): Don't set unsignedp
	before the switch, but just in the 2 places that need it.

	* c-decl.c (diagnose_mismatched_decls): Do not check for
	mismatched thread-local attributes when OLDDECL is marked
	threadprivate and NEWDECL has no thread-local attributes.
	(merge_decls): Merge C_DECL_THREADPRIVATE_P.
	(c_gimple_diagnostics_recursively): Rename from
	c_warn_unused_result_recursively.  Invoke
	diagnose_omp_structured_block_errors.
	(check_for_loop_decls): Return a singular decl found.

	* langhooks.c (lhd_omp_predetermined_sharing): Return
	OMP_CLAUSE_DEFAULT_SHARED for DECL_ARTIFICIAL decls.
	(lhd_omp_firstprivatize_type_sizes): New.
	(lhd_omp_assignment): New.
	(lhd_omp_predetermined_sharing): New.

	* langhooks.h (struct gimplify_omp_ctx): Forward declare.
	(struct lang_hooks_for_types): Add
	omp_firstprivatize_type_sizes, omp_privatize_by_reference,
	omp_predetermined_sharing, omp_disregard_value_expr,
	omp_private_debug_clause, omp_clause_default_ctor,
	omp_clause_copy_ctor, omp_clause_assign_op, omp_clause_dtor.

	(c_finish_omp_clauses): New.
	(c_finish_bc_stmt): Diagnose break within omp for.
	(c_begin_omp_parallel, c_finish_omp_parallel): New.
	(build_unary_op): Return error_mark after reporting
	a readonly_error.
	(build_modify_expr): Likewise.

	* gimplify.c: Include optabs.h and pointer-set.h.
	(enum gimplify_omp_var_data): Declare.
	(struct gimplify_omp_ctx): Declare.
	(struct gimplify_ctx): Add fields prev_context, combined_pre_p
	and combined_ctxp.
	(gimplify_ctxp, gimplify_omp_ctxp): New local variables.
	(push_gimplify_context, pop_gimplify_context): Allow nesting.
	(splay_tree_compare_decl_uid): New.
	(new_omp_context): New.
	(delete_omp_context): New.
	(gimple_add_tmp_var): Call omp_add_variable.
	(gimplify_bind_expr): Likewise.
	(gimplify_var_or_parm_decl): If omp_notice_variable returned
	true, disregard DECL_VALUE_EXPR on the decl if any.
	(gimplify_expr_in_ctx): New.
	(omp_firstprivatize_variable, omp_firstprivatize_type_sizes
	omp_add_variable, omp_notice_variable, omp_is_private
	gimplify_scan_omp_clauses, gimplify_adjust_omp_clauses_1
	gimplify_adjust_omp_clauses, gimplify_omp_parallel
	gimplify_omp_for, gimplify_omp_workshare, goa_lhs_expr_p
	gimplify_omp_atomic_fetch_op, goa_stabilize_expr
	gimplify_omp_atomic_pipeline, gimplify_omp_atomic_mutex
	gimplify_omp_atomic): New.
	(gimplify_expr): Handle OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
	OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
	OMP_CRITICAL and OMP_ATOMIC.
	(gimplify_body): Verify gimplify_ctxp is empty after gimplification.

	* c-pragma.h (enum pragma_kind): Add
	PRAGMA_OMP_ATOMIC, PRAGMA_OMP_BARRIER,
	PRAGMA_OMP_CRITICAL, PRAGMA_OMP_FLUSH, PRAGMA_OMP_FOR,
	PRAGMA_OMP_MASTER, PRAGMA_OMP_ORDERED,
	PRAGMA_OMP_PARALLEL, PRAGMA_OMP_PARALLEL_FOR,
	PRAGMA_OMP_PARALLEL_SECTIONS, PRAGMA_OMP_SECTION,
	PRAGMA_OMP_SECTIONS, PRAGMA_OMP_SINGLE,
	PRAGMA_OMP_THREADPRIVATE.

	* tree.def (OMP_PARALLEL, OMP_FOR, OMP_SECTIONS,
	OMP_SINGLE, OMP_SECTION, OMP_MASTER, OMP_ORDERED,
	OMP_CRITICAL, OMP_ATOMIC, OMP_CLAUSE_PRIVATE,
	OMP_CLAUSE_SHARED, OMP_CLAUSE_FIRSTPRIVATE,
	OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_REDUCTION,
	OMP_CLAUSE_COPYIN, OMP_CLAUSE_COPYPRIVATE,
	OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS,
	OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_NOWAIT,
	OMP_CLAUSE_ORDERED, OMP_CLAUSE_DEFAULT): Define.

	* print-tree.c (print_node): Dump DECL_VALUE_EXPR.

	* tree-ssa-dce.c (find_control_dependence): Do not assume that
	ENTRY_BLOCK_PTR->next_bb == single_succ (ENTRY_BLOCK_PTR).

	* tree-nested.c (convert_call_expr): Call walk_body on OMP_BODY for
	OpenMP directives.
	(struct nesting_info): Add field_map,
	suppress_expansion, debug_var_chain.
	(create_nesting_tree): Initialize them.
	(lookup_field_for_decl): Use field_map.
	(get_nonlocal_debug_decl, get_local_debug_decl): New.
	(convert_local_omp_clauses): New.
	(finalize_nesting_tree_1): Add debug_var_chain to toplevel block.
	(walk_body): Split out of walk_function.
	(convert_nonlocal_omp_clauses, convert_local_omp_clauses): New.
	(convert_nonlocal_reference): Handle omp statements.
	(convert_local_reference): Likewise.
	(unnest_nesting_tree_1): Split out of finalize_nesting_tree_1.
	(unnest_nesting_tree): New.
	(lower_nested_functions): Call it.
	(insert_field_into_struct): Make extern.
	(struct walk_stmt_info): Move to tree-gimple.h.
	(walk_stmts): Make extern.

	* omp-builtins.def: New file.

	* tree-iterator.c (expr_only): Clarify comment.

	* c-common.h (pushdecl_top_level, pushdecl,
	build_modify_expr, build_indirect_ref,
	c_finish_omp_master, c_finish_omp_critical,
	c_finish_omp_ordered, c_finish_omp_barrier,
	c_finish_omp_atomic, c_finish_omp_flush,
	c_finish_omp_for, c_split_parallel_clauses,
	omp_clause_default_kind, c_omp_sharing_predetermined,
	c_omp_remap_decl): Declare.

	* Makefile.in (BUILTINS_DEF): Add omp-builtins.def.
	(OBJS-common): Add omp-low.o.
	(c-omp.o, omp-low.o): Add.
	(gimplify.o): Add dependency on $(OPTABS_H).
	(GTFILES): Add omp-low.c.
	(gt-stringpool.h): Add.

	* tree-cfg.c (set_bb_for_stmt): Do not update the
	block-to-labels map if we are currently expanding to RTL.
	(tree_node_can_be_shared): Remove unnecessary CONSTANT_CLASS_P
	checks.
	Handle IDENTIFIER_NODE.
	(tree_verify_flow_info): Do not ICE when emitting error
	messages about invalid labels.
	(dump_function_to_file): Reset CFUN before emitting the body
	of the function.
	(debug_function): New.

	* passes.c (init_optimization_passes): Schedule
	pass_lower_omp.

	* langhooks-def.h (lhd_omp_predetermined_sharing,
	lhd_omp_assignment, lhd_omp_firstprivatize_type_sizes):
	Declare.
	(LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
	(LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
	(LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE,
	LANG_HOOKS_OMP_PREDETERMINED_SHARING,
	LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
	LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE,
	LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR,
	LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
	LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP,
	LANG_HOOKS_OMP_CLAUSE_DTOR): Define.
	(LANG_HOOK_DECLS): Use them.


2006-01-18  Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
	    Richard Henderson  <rth@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>

	* c-parser.c (pragma_omp_clause): Define.
	(c_parser_declaration_or_fndef): Document OpenMP syntax.
	(c_parser_compound_statement): Likewise.
	(c_parser_statement): Likewise.
	(c_parser_pragma): Handle omp pragmas.
	(OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
	OMP_PARALLEL_CLAUSE_MASK, OMP_SINGLE_CLAUSE_MASK): Define.
	(c_parser_omp_clause_name, check_no_duplicate_clause,
	c_parser_omp_variable_list,
	c_parser_omp_var_list_parens, c_parser_omp_clause_copyin,
	c_parser_omp_clause_copyprivate,
	c_parser_omp_clause_default,
	c_parser_omp_clause_firstprivate, c_parser_omp_clause_if,
	c_parser_omp_clause_lastprivate,
	c_parser_omp_clause_nowait,
	c_parser_omp_clause_num_threads,
	c_parser_omp_clause_ordered, c_parser_omp_clause_private,
	c_parser_omp_clause_reduction,
	c_parser_omp_clause_schedule, c_parser_omp_clause_shared,
	c_parser_omp_all_clauses, c_parser_omp_structured_block,
	c_parser_omp_atomic, c_parser_omp_barrier,
	c_parser_omp_critical, c_parser_omp_flush,
	c_parser_omp_for_loop, c_parser_omp_for,
	c_parser_omp_master, c_parser_omp_ordered,
	c_parser_omp_sections_scope, c_parser_omp_sections,
	c_parser_omp_parallel, c_parser_omp_single,
	c_parser_omp_construct, c_parser_omp_threadprivate): New.
	* c-pragma.c (init_pragma): Do omp pragma registration here.
	* c.opt (fopenmp): New flag.


2006-01-18  Eric Christopher  <echristo@apple.com>

	* gcc.c (GOMP_SELF_SPECS): Bracket in #ifndef/#endif.
	* config/darwin.h (GOMP_SELF_SPECS): Define.


testsuite/

2006-01-18  Richard Henderson  <rth@redhat.com>
            Aldy Hernandez  <aldyh@redhat.com>
	    Jakub Jelinek  <jakub@redhat.com>
            Diego Novillo  <dnovillo@redhat.com>
            Uros Bizjak  <uros@kss-loka.si>

	* testsuite/gcc.dg/gomp: New directory.

From-SVN: r109902
2006-01-18 14:21:25 -05:00
J"orn Rennecke 8ddf681af7 hooks.c (hook_bool_rtx_int_false): New function.
* hooks.c (hook_bool_rtx_int_false): New function.
	* hooks.h (hook_bool_rtx_int_false): Declare.
	* target-def.h (TARGET_COMMUTATIVE_P): Define.
	(TARGET_INITIALIZER): Add TARGET_COMMUTATIVE_P.
	* target.h (struct gcc_target): Add commutative_p member.
	* targhooks.c (hook_bool_rtx_commutative_p): New function.
	* targhooks.h (hook_bool_rtx_commutative_p): Declare.
	* pa.c (TARGET_COMMUTATIVE_P): Redefine.
	(pa_commutative_p): New function.
	* jump.c (target.h): Include.
	(rtx_renumbered_equal_p): Use targetm.commutative_p.
	* doc/tm.texi: Document TARGET_COMMUTATIVE_P.

From-SVN: r101706
2005-07-07 12:48:15 +01:00
Joseph Myers 4de67c26fe target.h (invalid_conversion, [...]): New hooks.
* target.h (invalid_conversion, invalid_unary_op,
	invalid_binary_op): New hooks.
	* target-def.h (TARGET_INVALID_CONVERSION,
	TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP,
	TARGET_INITIALIZER): Likewise.
	* hooks.h (hook_constcharptr_tree_tree_null,
	hook_constcharptr_int_tree_null,
	hook_constcharptr_int_tree_tree_null): New.
	* hooks.c (hook_constcharptr_tree_tree_null,
	hook_constcharptr_int_tree_null,
	hook_constcharptr_int_tree_tree_null): Likewise.
	* gcc/doc/tm.texi (TARGET_INVALID_CONVERSION,
	TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP): Document.
	* c-convert.c (convert): Use invalid_conversion hook.
	* c-typeck.c (build_unary_op): Use invalid_unary_op hook.
	(build_binary_op): Use invalid_binary_op hook.
	* config/ia64/ia64-modes.def: Define RFmode.
	* config/ia64/ia64-protos.h (spill_xfmode_operand): Remove.
	(ia64_expand_movxf_movrf): New.
	* config/ia64/ia64.md (movxf): Move code to
	ia64_expand_movxf_movrf.
	(movrf, movrf_internal): New.
	* ia64.c (ia64_invalid_conversion, ia64_invalid_unary_op,
	ia64_invalid_binary_op, TARGET_INVALID_CONVERSION,
	TARGET_INVALID_UNARY_OP, TARGET_INVALID_BINARY_OP): New.
	(spill_xfmode_operand): Rename to spill_xfmode_rfmode_operand.
	Add mode parameter.  Make static.
	(ia64_expand_movxf_movrf): New, moved from ia64.md.  Handle RFmode
	as well as XFmode.
	(ia64_function_arg, ia64_function_value, ia64_register_move_cost,
	ia64_scalar_mode_supported_p): Handle RFmode as well as XFmode.
	(ia64_init_builtins): Set up __fpreg as RFmode.
	(ia64_mangle_fundamental_type): Mangle __fpreg as u7__fpreg.

cp:
	* cvt.c (ocp_convert): Use invalid_conversion hook.
	* typeck.c (build_binary_op): Use invalid_binary_op hook.
	(build_unary_op): Use invalid_unary_op hook.

testsuite:
	* g++.dg/ext/fpreg1.C, gcc.target/ia64/fpreg-1.c,
	gcc.target/ia64/fpreg-2.c: New tests.

From-SVN: r101391
2005-06-28 22:55:24 +01:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Adrian Straetling e7e64a25d5 target.h (insn_valid_within_doloop): Rename into "invalid_within_doloop".
2005-06-09  Adrian Straetling  <straetling@de.ibm.com>

	* target.h (insn_valid_within_doloop): Rename into
	"invalid_within_doloop".  Change return type to "const char *".
	Update Comment.
	* targhooks.h (default_insn_valid_within_doloop): Rename into
	"default_invalid_within_doloop".
	* targhooks.c (default_insn_valid_within_doloop): Likewise.
	Update Comment.
	* target-def.h (TARGET_INSN_VALID_WITHIN_DOLOOP): Rename target hook
	into "TARGET_INVALID_WITHIN_DOLOOP". Default it to
	"default_invalid_within_doloop".
	* hooks.c (hook_constcharptr_rtx_null): New function.
	(hook_bool_rtx_true): Remove.
	* hooks.h (hook_constcharptr_rtx_null): Declare.
	(hook_bool_rtx_true): Remove.
	* loop-doloop.c (doloop_valid_p): Temporarily store return value of
	"invalid_within_doloop" and print error message if non-null.
	Update Comment.
	* doc/tm.texi: Update documentation.
	* config/s390/s390.c: Adjust to new hook name and new default hook.
	* config/rs6000/rs6000.c: (rs6000_insn_valid_within_doloop): Rename
	into "rs6000_invalid_within_doloop".
	(rs6000_invalid_within_doloop): Change return type to "static const
	char *" and replace return values.  Update Comment.

From-SVN: r100797
2005-06-09 11:17:23 +00:00
Adrian Straetling a71a498df0 loop-doloop.c: Include "target.h".
2005-05-25  Adrian Straetling  <straetling@de.ibm.com>

	* loop-doloop.c: Include "target.h".
	  (doloop_valid_p): Move tests to function in targhooks.c.
	* target.h (struct gcc_target): New target hook
	  "insn_valid_within_doloop".
	* target-def.h: Define default value for "insn_valid_within_doloop".
	  (TARGET_INITIALIZER): Insert new target hook into initializer.
	* targhooks.c (default_insn_valid_within_doloop): New function.
	* targhooks.h (default_insn_valid_within_doloop): Declare.
	* hooks.c (hook_bool_rtx_true): New function.
	* hooks.h (hook_bool_rtx_true): Declare.
	* doc/tm.texi: Add documentation for new target hook.

From-SVN: r100143
2005-05-25 11:52:13 +00:00
Hans-Peter Nilsson 6115892313 tm.texi (TARGET_MD_ASM_CLOBBERS): Adjust wording to not imply that this is called once, independent of asms in code.
* doc/tm.texi (TARGET_MD_ASM_CLOBBERS): Adjust wording to not
	imply that this is called once, independent of asms in code.
	Adjust to now being pased output and input lists.  Mention helper
	function decl_overlaps_hard_reg_set_p.
	* hooks.c (hook_tree_tree_tree_tree_3rd_identity): Rename from
	hook_tree_tree_identity and to take three trees, returning third.
	* hooks.h (hook_tree_tree_tree_tree_3rd_identity): Adjust the
	prototype.
	* stmt.c: include hard-reg-set.h before tree.h.
	(decl_overlaps_hard_reg_set_p): New function, broken out from...
	(decl_conflicts_with_clobbers_p): Call
	decl_overlaps_hard_reg_set_p.
	(expand_asm_operands): Pass output and input lists in call to
	targetm.md_asm_clobbers.
	* target-def.h (TARGET_MD_ASM_CLOBBERS): Define as
	hook_tree_tree_tree_tree_3rd_identity.
	* target.h (struct gcc_target.md_asm_clobbers): Take three tree
	parameters.
	* tree.h [HARD_CONST] (decl_overlaps_hard_reg_set_p): Prototype.
	* config/i386/i386.c (ix86_md_asm_clobbers): Adjust to three
	parameters, first two unused.
	* config/cris/cris.c (cris_md_asm_clobbers): Adjust to added
	parameters.  Only add MOF to clobbers if there's no 'h' mentioned
	in constraint letters and MOF is not mentioned as a asm-declared
	register in neither of the input and output lists.

From-SVN: r96923
2005-03-23 03:55:36 +00:00
Kazu Hirata a05a80fc7c builtins.c (fold_builtin_1): Update a call to targetm.fold_builtin.
* builtins.c (fold_builtin_1): Update a call to
	targetm.fold_builtin.
	* hooks.c (hook_tree_tree_bool_null): Rename to
	hook_tree_tree_tree_bool_null.  Take one more argument of type
	tree.
	* hooks.h: Update the prototype of hook_tree_tree_bool_null.
	* target-def.h (TARGET_FOLD_BUILTIN): Define it as
	hook_tree_tree_tree_bool_null.
	* target.h (gcc_target): Update the prototype of fold_builtin.
	* config/alpha/alpha.c (alpha_fold_builtin): Take decomposed
	arguments of CALL_EXPR.
	* doc/tm.texi (TARGET_FOLD_BUILTIN): Update.  Mention the
	new prototype.

From-SVN: r96762
2005-03-20 15:54:41 +00:00
Kazu Hirata bc7ffd06f7 hooks.c, [...]: Update copyright.
* hooks.c, hooks.h, intl.c, opts.h, prefix.c, tree-gimple.c,
	config/alpha/ev4.md, config/alpha/ev5.md, config/alpha/ev6.md,
	config/alpha/freebsd.h, config/alpha/linux.h,
	config/alpha/netbsd.h, config/alpha/osf5.h,
	config/alpha/vms.h, config/arc/arc.c, config/arc/arc.h,
	config/h8300/h8300-protos.h, config/h8300/h8300.c,
	config/h8300/h8300.h, config/ia64/unwind-ia64.c,
	doc/cppopts.texi: Update copyright.

From-SVN: r96686
2005-03-18 15:24:28 +00:00
Richard Sandiford 7568579261 config.gcc (extra_options): New variable for listing option files.
* config.gcc (extra_options): New variable for listing option files.
	Add ${cpu_type}/${cpu_type}.opt to it if that file exists.
	* configure.ac (extra_opt_files): New AC_SUBST variable.
	(tm_file_list, tm_include_list): Include options.h first.
	* configure: Regenerate.
	* Makefile.in (extra_opt_files, ALL_OPT_FILES): New variables.
	(s-options): Use $(ALL_OPT_FILES) instead of $(lang_opt_files)
	(s-options-h): New rule.
	(options.h): Depend on it.
	(TEXI_GCCINT_FILES): Add options.texi.
	* hooks.h (hook_bool_size_t_constcharptr_int_true): Declare.
	* hooks.c (hook_bool_size_t_constcharptr_int_true): New function.
	* target.h (gcc_target): Add default_target_flags and handle_option.
	* target-def.h (TARGET_DEFAULT_TARGET_FLAGS)
	(TARGET_HANDLE_OPTION): New macros.
	(TARGET_INITIALIZER): Include them.
	* opt-functions.awk (opt_args, nth_arg): New functions.
	(switch_flags): Handle the "Target" flag.
	(var_args): Delete.
	(var_name): Use opt_args and nth_arg.
	(var_set, var_ref): Likewise.  Handle "Mask" and "InverseMask".
	* opth-gen.awk: Declare target_flags.  Declare MASK_* and TARGET_*
	macros for the "Mask" and "InverseMask" options.
	* opts.h (cl_var_cond): New enum.
	(cl_option): Replace the "has_set_value" and "set_value" fields with
	"var_cond" and "var_value".
	(CL_TARGET): New macro.
	(option_enabled, print_filtered_help): Declare.
	(decode_options): Move definition.
	* opts.c (handle_option): Search for the original option before
	removing any "no-" prefix.  Handle CL_TARGET.  Adjust for the new
	var_cond and var_value fields.  Use targetm.handle_option to handle
	target options.
	(decode_options): Set target_flags to targetm.default_target_flags.
	(print_filtered_help): Make global.  Handle CL_TARGET.
	(option_enabled): New function.
	* toplev.c (target_switches): Guard with #ifdef TARGET_SWITCHES.
	(display_target_options, set_target_switch, print_switch_values)
	(default_pch_valid_p): Guard uses of target_switches with
	#ifdef TARGET_SWITCHES.  Also...
	(display_target_options): Display the CL_TARGET entries in cl_options.
	(set_target_option): Don't complain about the "" option when
	TARGET_SWITCHES is undefined.
	(print_switch_values): Use option_enabled.
	(default_pch_valid_p): Check cl_options[] when looking for something
	that has changed the value of target_flags.
	* c.opt: Remove documentation from top of file.
	* doc/gccint.texi: Add an "Options" chapter.  Include options.texi.
	* doc/sourecebuild.texi: Refer to the new options documentation
	instead of c.opt.  Document machine-specific .opt files.
	* doc/tm.texi (target_flags): Say that this variable is declared
	by options.h.
	(TARGET_DEFAULT_TARGET_FLAGS, TARGET_HANDLE_OPTION): Document.
	(TARGET_SWITCHES, TARGET_OPTIONS): Refer to the option files as
	an alternative.
	* doc/options.texi: New file.

From-SVN: r96448
2005-03-14 20:18:43 +00:00
Kazu Hirata 5ac6107c32 hooks.c (hook_int_void_1, [...]): Remove.
* hooks.c (hook_int_void_1, hook_void_int): Remove.
	* hooks.h: Remove the corresponding prototypes.

From-SVN: r88657
2004-10-07 04:00:55 +00:00
Eric Christopher a1c496cb43 dwarf2.h (dwarf_calling_convention): Add enum for renesas sh abi.
2004-09-30  Eric Christopher  <echristo@redhat.com>

	* dwarf2.h (dwarf_calling_convention): Add enum for renesas
	sh abi.
	* dwarf2out.c (add_calling_convention_attribute): New function.
	(gen_subroutine_type_die): Use.
	* target-def.h (TARGET_DWARF_CALLING_CONVENTION): New hook.
	* target.h (gcc_target): Add dwarf_calling_convention.
	* hooks.c (hook_int_tree_0): New function.
	* hooks.h: Prototype.
	* config/sh/sh.c: Include dwarf2.h.
	(sh_dwarf_calling_convention): New function.
	(TARGET_DWARF_CALLING_CONVENTION): Use.
	* doc/tm.texi (TARGET_DWARF_CALLING_CONVENTION): Document.

From-SVN: r88382
2004-10-01 05:08:59 +00:00
Paolo Bonzini 55e74277ea hooks.c (hook_tree_tree_bool_null): New.
2004-09-24  Paolo Bonzini  <bonzini@gnu.org>

	* hooks.c (hook_tree_tree_bool_null): New.
	* hooks.h (hook_tree_tree_bool_null): Declare it.
	* target-def.c (TARGET_FOLD_BUILTIN): Point to it.
	* targhooks.c (default_fold_builtin): Remove.
	* targhooks.h (default_fold_builtin): Remove.

From-SVN: r88040
2004-09-24 15:13:53 +00:00
Mark Mitchell af28769744 hooks.c (hook_bool_void_true): New function.
* hooks.c (hook_bool_void_true): New function.
	* hooks.h (hook_bool_void_true): Declare.
	* target-def.h (TARGET_CXX): Add
	TARGET_CXX_KEY_METHOD_MAY_BE_INLINE.
	* target.h (struct cxx): Add key_method_may_be_inline.
	* config/arm/arm.c (arm_cxx_key_method_may_be_inline): New
	function.
	(TARGET_CXX_KEY_METHOD_MAY_BE_INLINE): New macro.
	* config/arm/bpabi.h: Use __THUMB_INTERWORK__ instead of
	__THUMB_INTERWORK.

 	* class.c (key_method): Rename to ...
	(determine_key_method): ... this.
	(finish_struct_1): Adjust accordingly.
	* cp-tree.h (key_method): Declare.
	* decl2.c (maybe_emit_vtables): Determine the key method here if
	it has not already been done.

	* g++.dg/abi/key1.C: New test.

From-SVN: r86843
2004-08-31 20:29:28 +00:00
Eric Christopher f676971a92 defaults.h (VECTOR_MODE_SUPPORTED_P): Remove macro.
2004-08-23  Eric Christopher  <echristo@redhat.com>

	* defaults.h (VECTOR_MODE_SUPPORTED_P): Remove macro.
	* system.h (VECTOR_MODE_SUPPORTED_P): Poison.
	* target-def.h (TARGET_VECTOR_MODE_SUPPORTED_P): Define.
	* target.h: Ditto.
	* hooks.h: Include machmode.h.
	(hook_bool_mode_false): Declare.
	* hooks.c (hook_bool_mode_false): Define.
	* expr.c (vector_mode_valid_p): Use targetm.vector_mode_supported_p.
	* stor-layout.c (layout_type): Ditto.
	* config/alpha/alpha.c (alpha_vector_mode_supported_p): New function.
	Define to target macro.
	* config/alpha/alpha.h (VECTOR_MODE_SUPPORTED_P): Delete.
	* config/arm/arm.c: Ditto. Use.
	* config/arm/arm.h: Ditto.
	* config/arm/arm-protos.h: Ditto.
	* config/i386/i386.c: Ditto.
	* config/i386/i386.h: Ditto.
	* config/rs6000/rs6000.c: Ditto.
	* config/rs6000/rs6000.h: Ditto.
	* config/sh/sh.c: Ditto.
	* config/sh/sh.h: Ditto.
	* config/sh/sh-protos.h: Ditto.
	* config/sh/sh.md: Use.
	* doc/tm.texi: Move documentation for VECTOR_MODE_SUPPORTED_P
	to TARGET_VECTOR_MODE_SUPPORTED_P.

2004-08-23  Eric Christopher  <echristo@redhat.com>

	* trans-types.c (gfc_type_for_mode): Remove VECTOR_TYPE_SUPPORTED_P
	usage. Use build_vector_type_for_mode for vector types.

From-SVN: r86453
2004-08-24 00:30:52 +00:00
Devang Patel 8e3e233be0 c-common.c (handle_used_attribute): Set DECL_PRESERVE_P.
* c-common.c (handle_used_attribute): Set DECL_PRESERVE_P.
        * print-tree.c (print_node): Print DECL_PRESERVE_P.
        * target-def.h (TARGET_ASM_MARK_DECL_PRESERVED): New #define.
        (TARGET_ASM_OUT): New member, TARGET_ASM_MARK_DECL_PRESERVED
        * target.h (struct gcc_target): New member, mark_decl_preserved.
        * hooks.c (hook_void_charptr): Rename to ...
        (hook_void_constcharptr): ... new name.
        * hooks.h (hook_void_charptr): Rename to ..
        (hook_void_constcharptr): ... new name.
        * tree.h (DECL_PRESERVE_P): New #define.
        (struct tree_decl): New member, preserve_flag.
        * varasm.c (assemble_start_function): Mark decl preserved.
        (assemble_variable): Same.
        * darwin.c (darwin_mark_decl_preserved): New function.
        * darwin.h (TARGET_ASM_MARK_DECL_preserved): New #define.
        * darwin-protos.h (darwin_mark_decl_preserved): New decl.
        * doc/tm.texi (TARGET_ASM_MARK_DECL_PRESERVED): Document.

        testsuite:
        * gcc.dg/darwin-20040809-1.c: New test.

From-SVN: r86076
2004-08-16 13:54:43 -07:00
Steven Bosscher e4638a72d8 hooks.c (hook_int_void_1): New generic hook.
* hooks.c (hook_int_void_1): New generic hook.
	* hooks.h (hook_int_void_1): Add prototype.
	* config/c4x/c4x.c (TARGET_SCHED_USE_DFA_PIPELINE_INTERFACE):
	Define to hook_int_void_1.
	* config/c4x/c4x.md: Replace dummies for the old pipeline model
	with dummies for the new one.

From-SVN: r82682
2004-06-07 06:04:14 +00:00
Ziemowit Laski f18eca824c hooks.c (hook_constcharptr_tree_null): New hook.
[gcc/ChangeLog]
2004-03-23  Ziemowit Laski  <zlaski@apple.com>

        * hooks.c (hook_constcharptr_tree_null): New hook.
        * hooks.h (hook_constcharptr_tree_null): New prototype.
        * target-def.h (TARGET_MANGLE_FUNDAMENTAL_TYPE): New target hook.
        * target.h (mangle_fundamental_type): New target hook.
        * config/rs6000/rs6000.c (TARGET_MANGLE_FUNDAMENTAL_TYPE): Point
        target hook at rs6000_mangle_fundamental_type.
        (rs6000_mangle_fundamental_type): New function.
        * doc/tm.texi (TARGET_MANGLE_FUNDAMENTAL_TYPE): Document.

[gcc/cp/ChangeLog]
2004-03-23  Ziemowit Laski  <zlaski@apple.com>

        * Make-lang.in (cp/mangle.o): Depend on $(TARGET_H).
        * mangle.c (write_type): Add call to 'mangle_fundamental_type'
        target hook.

[gcc/testsuite/ChangeLog]
2004-03-23  Ziemowit Laski  <zlaski@apple.com>

        * g++.dg/ext/altivec-7.C: New test.

From-SVN: r79885
2004-03-24 00:13:33 +00:00
Richard Henderson 4d0c31e68c c-pch.c (c_common_no_more_pch): Update for gt_pch_use_address extra arguments.
* c-pch.c (c_common_no_more_pch): Update for gt_pch_use_address
        extra arguments.
        * config.host (*-*-solaris2*, *-*-linux*): Add out_host_hook_obj
        and host_xmake_file fragments.
        * ggc-common.c (gt_pch_save): Update for gt_pch_get_address change.
        (gt_pch_restore): Similarly for gt_pch_use_address.
        (default_gt_pch_get_address): New.
        (mmap_gt_pch_get_address): Split out of gt_pch_save.
        (default_gt_pch_use_address): Split out of gt_pch_restore.
        (mmap_gt_pch_use_address): Likewise.
        * hooks.c (hook_voidp_size_t_null): Remove.
        (hook_bool_voidp_size_t_false): Remove.
        * hooks.h: Likewise.
        * hosthooks-def.h (HOST_HOOKS_GT_PCH_GET_ADDRESS): Use one of the
        default_ or mmap_ definitions.
        (HOST_HOOKS_GT_PCH_USE_ADDRESS): Likewise.
        * hosthooks.h (struct host_hooks): Update gt_pch_get_address
        and gt_pch_use_address.
        * config/host-linux.c, config/host-solaris.c: New files.
        * config/x-linux, config/x-solaris: New files.
        * config/rs6000/host-darwin.c darwin_rs6000_gt_pch_get_address):
        Update for changed definition.
        (darwin_rs6000_gt_pch_use_address): Likewise.
        * doc/hostconfig.texi: Update docs.

From-SVN: r79295
2004-03-10 19:19:04 -08:00
Mike Stump 94d1613b23 Add framework support for darwin.
* c-incpath.c: Include target.h and machmode.h.
	(add_path): Use a consistent style for cpp_dir.  Initialize
	p->construct to 0.
	(add_cpp_dir_path): New.
	(register_include_chains): Add use of extra_includes callback.
	(hook_void_int): Add.
	(target_c_incpath): Add.
	* c-incpath.h (add_cpp_dir_path): New.
	(target_c_incpath_s): Add.
	(target_c_incpath): Add.
	(C_INCPATH_INIT): Add.
	* c-opts.c (c_common_missing_argument,
	c_common_handle_option): Add -F argument processing.
	* c.opt: Add -F argument processing.
	* gcc.c (trad_capable_cpp): Add -F argument processing.
	* cppfiles.c (find_file_in_dir): Update to use construct
	callback.
	(search_path_exhausted, cpp_get_path, cpp_get_buffer,
	cpp_get_prev): New.
	(_cpp_find_file): Use search_path_exhausted.
	(make_cpp_dir): Initialize construct to 0.
	* cpplib.h (missing_header_cb
	cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New.
	(cpp_callbacks): Add missing_header
	(cpp_dir): Add construct.
	* target-def.h: (TARGET_OPTF): New.
	* hooks.c (hook_void_int, hook_void_charptr): Add.
	* hooks.h (hook_void_int, hook_void_charptr): Add.
	* Makefile.in (c-incpath.o) : Add $(TARGET_H) and
	$(MACHMODE_H) dependencies.
	* doc/invoke.texi (Darwin Options): Document -F.
	* doc/tm.texi (TARGET_EXTRA_INCLUDES): Add.
	(TARGET_OPTF): Add.
	* fix-header.c (target_c_incpath): Add.

	* config/darwin-c.c: Add c-incpath.h include.
	(using_frameworks, find_subframework_file,
	find_subframework_header, add_system_framework_path,
	frameworks_in_use, num_frameworks, max_frameworks,
	add_framework, find_framework, struct framework_header,
	framework_header_dirs, framework_construct_pathname,
	find_subframework_file, add_system_framework_path,
	add_framework_path, framework_defaults,
	darwin_register_frameworks, find_subframework_header): Add.
	* config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New.
	(TARGET_OPTION_TRANSLATE_TABLE): Add -framework support.
	(CPP_SPEC): Add __APPLE_CC__ support.
	* t-darwin (darwin-c.o): Add c-incpath.h dependency.

From-SVN: r78875
2004-03-04 00:18:54 +00:00
Kazu Hirata 67dfe1108e hooks.c (hook_tree_tree_identity): New.
* hooks.c (hook_tree_tree_identity): New.
	* hooks.h: Add a prototype for hook_tree_tree_identity.
	* stmt.c (expand_asm_operands): Use targetm.md_asm_clobbers
	instead of MD_ASM_CLOBBERS.
	* system.h (MD_ASM_CLOBBERS): Poison.
	* target-def.h (TARGET_MD_ASM_CLOBBERS): New.
	(TARGET_INITIALIZER): Add TARGET_MD_ASM_CLOBBERS.
	* target.h (gcc_target): Add md_asm_clobbers.
	* config/i386/i386.c (TARGET_MD_ASM_CLOBBERS): New.
	(ix86_md_asm_clobbers): New.
	* config/i386/i386.h (MD_ASM_CLOBBERS): Remove.
	* doc/tm.texi (MD_ASM_CLOBBERS): Change to
	TARGET_MD_ASM_CLOBBERS.

From-SVN: r78868
2004-03-03 23:55:52 +00:00
Kazu Hirata 45ea6431a0 hooks.c (hook_void_tree_int): Remove.
* hooks.c (hook_void_tree_int): Remove.
	(hook_void_constcharptr): Likewise.
	(hook_int_void_0): Likewise.
	* hooks.h: Remove the prototypes for the above three
	functions.
	* targhooks.c (hook_bool_machine_mode_true): Remove.
	* targhooks.h: Remove the prototype for
	hook_bool_machine_mode_true.

From-SVN: r78093
2004-02-19 11:06:26 +00:00
Ian Lance Taylor e129d93a7b re PR target/1532 (-O3 generates (obviously) redundant tests and jumps)
PR gcc/1532
	* cse.c (cse_change_cc_mode): New static function.
	(cse_change_cc_mode_insns, cse_cc_succs): Likewise.
	(cse_condition_code_reg): New function.
	* rtl.h (cse_condition_code_reg): Declare.
	* toplev.c (rest_of_handle_cse2): Call cse_condition_code_reg.
	* target.h (struct gcc_target): Add fixed_condition_code_regs and
	cc_modes_compatible.
	* target-def.h (TARGET_FIXED_CONDITION_CODE_REGS): Define.
	(TARGET_CC_MODES_COMPATIBLE): Define.
	(TARGET_INITIALIZER): Add new initializers.
	* targhooks.c (default_cc_modes_compatible): New function.
	* targhooks.c (default_cc_modes_compatible): Declare.
	* hooks.c (hook_bool_intp_intp_false): New function.
	* hooks.h (hook_bool_intp_intp_false): Declare.
	* config/i386/i386.c (TARGET_FIXED_CONDITION_CODE_REGS): Define.
	(TARGET_CC_MODES_COMPATIBLE): Define.
	(ix86_fixed_condition_code_regs): New static function.
	(ix86_cc_modes_compatible): Likewise.
	* doc/tm.texi (Condition Code): Document new hooks.

From-SVN: r76454
2004-01-23 21:05:21 +00:00
Geoffrey Keating c6e8c92195 hooks.c (hook_bool_tree_true): New.
* hooks.c (hook_bool_tree_true): New.
	(hook_rtx_tree_int_null): New.
	(hook_rtx_rtx_null): Use NULL, not 0.
	* hooks.h: Add 'extern' to everything.
	(hook_bool_tree_true): New.
	(hook_rtx_tree_int_null): New.
	* targhooks.c (hook_bool_CUMULATIVE_ARGS_true): New.
	* targhooks.h (hook_bool_CUMULATIVE_ARGS_true): New.
	* config/rs6000/rs6000-protos.h (setup_incoming_varargs): Remove
	prototype.
	* config/rs6000/rs6000.c (rs6000_return_in_memory): New.
	(setup_incoming_varargs): Prototype.
	(TARGET_PROMOTE_FUNCTION_ARGS): Define.
	(TARGET_PROMOTE_FUNCTION_RETURN): Define.
	(TARGET_STRUCT_VALUE_RTX): Define.
	(TARGET_RETURN_IN_MEMORY): Define.
	(TARGET_SETUP_INCOMING_VARARGS): Define.
	(TARGET_STRICT_ARGUMENT_NAMING): Define.
	(TARGET_PRETEND_OUTGOING_VARARGS_NAMED): Define.
	(init_cumulative_args): Use rs6000_return_in_memory.
	(setup_incoming_varargs): Make 'static'.
	* config/rs6000/rs6000.h (PROMOTE_FUNCTION_ARGS): Delete.
	(PROMOTE_FUNCTION_RETURN): Delete.
	(STRUCT_VALUE): Delete.
	(RETURN_IN_MEMORY): Delete.
	(SETUP_INCOMING_VARARGS): Delete.

From-SVN: r72197
2003-10-07 19:23:08 +00:00
Geoffrey Keating 18c8152070 c-common.c (allow_pch): Remove.
2003-07-29  Geoffrey Keating  <geoffk@apple.com>

	* c-common.c (allow_pch): Remove.
	* c-common.h (allow_pch): Remove.
	(c_common_no_more_pch): Declare.
	* c-lex.c (c_lex): Call c_common_no_more_pch when appropriate.
	* c-pch.c: Include hosthooks.h.
	(c_common_valid_pch): Don't check allow_pch.
	(c_common_read_pch): Clear valid_pch to prevent reading PCH files.
	(c_common_no_more_pch): New.
	* ggc-common.c: Include hosthooks.h.
	(gt_pch_save): Call gt_pch_get_address.
	(gt_pch_restore): Call gt_pch_use_address.
	* hooks.c (hook_voidp_size_t_null): New.
	(hook_bool_voidp_size_t_false): New.
	* hooks.h (hook_voidp_size_t_null): New.
	(hook_bool_voidp_size_t_false): New.
	* hosthooks-def.h (HOST_HOOKS_GT_PCH_GET_ADDRESS): New.
	(HOST_HOOKS_GT_PCH_USE_ADDRESS): New.
	(HOST_HOOKS_INITIALIZER): Add HOST_HOOKS_GT_PCH_GET_ADDRESS,
	HOST_HOOKS_GT_PCH_USE_ADDRESS.
	* hosthooks.h (struct host_hooks): Add gt_pch_get_address,
	gt_pch_use_address.
	* doc/hostconfig.texi (Host Common): Document
	HOST_HOOKS_GT_PCH_GET_ADDRESS, HOST_HOOKS_GT_PCH_USE_ADDRESS.
	* Makefile.in (c-pch.o): Depend on hosthooks.h.
	(ggc-common.o): Likewise.

	* config/rs6000/host-darwin.c (HOST_HOOKS_GT_PCH_GET_ADDRESS): Define.
	(HOST_HOOKS_GT_PCH_USE_ADDRESS): Define.
	(pch_address_space): New.
	(darwin_rs6000_gt_pch_get_address): New.
	(darwin_rs6000_gt_pch_use_address): New.

Index: cp/ChangeLog
2003-07-29  Geoffrey Keating  <geoffk@apple.com>

	* parser.c (cp_lexer_new_main): Use c_common_no_more_pch instead
	of setting valid_pch by hand.

From-SVN: r69944
2003-07-29 23:36:53 +00:00
Neil Booth cb66e38590 c-common.h (c_comon_handle_filename, [...]): New.
* c-common.h (c_comon_handle_filename,
	c_common_missing_arguement): New.
	* c-lang.c (LANG_HOOKS_HANDLE_FILENAME,
	LANG_HOOKS_MISSING_ARGUMENT): New.
	* c-opts.c (missing_arg): Rename c_common_missing_argument,
	update to be an appropriate langhook.
	(c_common_handle_option): Don't handle filenames.
	(c_common_handle_filename): New.
	* hooks.c (hook_void_constcharptr,
	hook_bool_constcharptr_size_t_false): New.
	* hooks.h (hook_void_constcharptr,
	hook_bool_constcharptr_size_t_false): New.
	* langhooks-def.h (LANG_HOOKS_HANDLE_FILENAME,
	LANG_HOOKS_MISSING_ARGUMENT): New.
	(LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (struct lang_hooks): Add handle_filename and
	missing_argument.
	* opts.c (handle_option): Don't handle filenames here, but ...
	(handle_options): ... here.
	(common_handle_option): Don't handle missing arguments here.
	* objc/objc-lang.c (LANG_HOOKS_HANDLE_FILENAME,
	LANG_HOOKS_MISSING_ARGUMENT): New.
ada:
	* misc.c (gnat_handle_option): Don't handle filenames.
cp:
	* cp-lang.c (LANG_HOOKS_HANDLE_FILENAME,
	LANG_HOOKS_MISSING_ARGUMENT): Override.
f:
	* top.c (ffe_handle_option): Don't handle filenames.
java:
	* lang.c (java_handle_option): Don't handle filenames.

From-SVN: r69011
2003-07-06 19:01:21 +00:00
Andreas Jaeger 1d088deebe gcc.c: Convert prototypes to ISO C90.
* gcc.c: Convert prototypes to ISO C90.
	* gcc.h: Likewise.
	* gcov-dump.c: Likewise.
	* gcov-iov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.h: Likewise.
	* ggc.h: Likewise.
	* global.c: Likewise.
	* graph.c: Likewise.
	* graph.h: Likewise.
	* hosthooks.h: Likewise.
	* hooks.h: Likewise.
	* hooks.c: Likewise.
	* hashtable.h: Likewise.
	* hashtable.c: Likewise.
	* haifa-sched.c: Likewise.
	* integrate.h: Likewise.
	* integrate.c: Likewise.
	* input.h: Likewise.
	* ifcvt.c: Likewise.

From-SVN: r68995
2003-07-06 08:15:36 +02:00
Neil Booth b86f6cd9ab c-common.h (c_common_init_options): New prototype.
* c-common.h (c_common_init_options): New prototype.
	* c-opts.c (deferred_size): Remove.
	(defer_opt): Array is now pre-allocated.
	(c_common_init_options): Pre-allocate deferred_opts.  Make
	lang_flags unsigned.
	(push_command_line_options): Free deferred_opts.
	* hooks.c (hook_uint_uint_constcharptrptr_0): New.
	* hooks.h (hook_uint_uint_constcharptrptr_0): New.
	* langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): Update.
	* langhooks.h (struct lang_hooks): New prototype for init_options.
	* main.c (main): Cast argv.
	* opts.c (handle_option, handle_options): Update prototypes.
	(decode_options): save_argc, save_argv are not global.  Constify.
	* opts.h (decode_options): New prototype.
	* toplev.c (general_init): New protoype.
	(save_argv): Make static.
	(save_argc): Remove.
	(print_switch_values, general_init): Constify.
	(toplev_main): Save argv.
	* toplev.h (toplev_main): Update prototype.
	(save_argc, save_argv): Remove.
ada:
	* misc.c (save_argc, save_argv): Make static.
	(gnat_init_options): New prototype.
	(gnat_init_options): Update.
f:
	* top.c (ffe_init_options): Update prototype.
	* top.h (ffe_init_options): Update prototype.
java:
	* lang.c (java_init_options): Update prototype.
treelang:
	* tree1.c (treelang_init_options): Update prototype.
	* treelang.h (treelang_init_options): Update prototype.

From-SVN: r68850
2003-07-02 20:15:46 +00:00
Richard Henderson a3424f5c1e hooks.c (hook_int_void_no_regs): Rename from hook_reg_class_void_no_regs; change return type.
* hooks.c (hook_int_void_no_regs): Rename from
        hook_reg_class_void_no_regs; change return type.
        * hooks.h: Update.
        * target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Update.
        * target.h (branch_target_register_class): Change return type to int.
        Add documentation.
        * config/sh/sh.c (sh_target_reg_class): Change return type.
        * doc/tm.texi (TARGET_BRANCH_TARGET_REGISTER_CLASS): Likewise.

From-SVN: r68275
2003-06-20 10:30:05 -07:00
J"orn Rennecke 676fceebc1 hooks.h (hook_reg_class_void_no_regs): Only declare if tm.h has been included.
* hooks.h (hook_reg_class_void_no_regs): Only declare if tm.h
	has been included.

From-SVN: r68188
2003-06-19 11:44:44 +01:00
Stephen Clarke fe3ad57221 bt-load.c: New file.
2003-06-18  Stephen Clarke <stephen.clarke@superh.com>
            J"orn Rennecke <joern.rennecke@superh.com>

	* bt-load.c: New file.
	* Makefile.in (OBJS): Include bt-load.o
	(bt-load.o): Add dependencies.
	* flags.h (flag_branch_target_load_optimize): Declare.
	(flag_branch_target_load_optimize2): Likewise.
	* hooks.c (hook_reg_class_void_no_regs): New function.
	(hook_bool_bool_false): Likewise.
	* hooks.h (hook_reg_class_void_no_regs, hook_bool_bool_false): Declare.
	* rtl.h (branch_target_load_optimize): Declare.
	* target-def.h (TARGET_BRANCH_TARGET_REGISTER_CLASS): Define.
	(TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise.
	(TARGET_INITIALIZER): Include these.
	* target.h (struct gcc_target): Add branch_target_register_class
	and branch_target_register_callee_saved members.
	* toplev.c (enum dump_file_index): Add DFI_branch_target_load
	(dump_file) Add "tars" entry.
	(flag_branch_target_load_optimize): New variable.
	(flag_branch_target_load_optimize2): Likewise.
	(lang_independent_options): Add entries for new options.
	(rest_of_compilation): Call branch_target_load_optimize.
	* doc/tm.texi (TARGET_BRANCH_TARGET_REGISTER_CLASS): Document.
	(TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise.
	* doc/invoke.texi: Document -fbranch-target-load-optimize and
	-fbranch-target-load-optimize2.
	* rtl.h (epilogue_completed): Declare.
	* recog.c (epilogue_completed): New variable.
	* toplev.c (rest_of_compilation): Set it.
	* flow.c (mark_regs_live_at_end): Use it.
	* config/ia64/ia64.c (ia64_output_mi_thunk): Set it.
	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
	* config/sh/sh.c (sh_output_mi_thunk): Likewise.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.

	* sh.c (shmedia_space_reserved_for_target_registers): New variable.
	(sh_target_reg_class): New function.
	(sh_optimize_target_register_callee_saved): Likwise.
	(shmedia_target_regs_stack_space): Likewise.
	(shmedia_reserve_space_for_target_registers_p): Likewise.
	(shmedia_target_regs_stack_adjust): Likewise.
	(TARGET_BRANCH_TARGET_REGISTER_CLASS): Override.
	(TARGET_BRANCH_TARGET_REGISTER_CALLEE_SAVED): Likewise.
	(calc_live_regs): If flag_branch_target_load_optimize2 and
	TARGET_SAVE_ALL_TARGET_REGS is enabled, and we have space reserved
	for target registers, make sure that we save all target registers.
	(sh_expand_prologue, sh_expand_epilogue): Take target register
	optimizations into account.  Collapse stack adjustments if that
	is beneficial.
	(initial_elimination_offset): Reserve space for target registers
	if necessary.
	* sh.h (SAVE_ALL_TR_BIT, TARGET_SAVE_ALL_TARGET_REGS): Define.
	(OPTIMIZATION_OPTIONS): Enable flag_branch_target_load_optimize.

Co-Authored-By: J"orn Rennecke <joern.rennecke@superh.com>

From-SVN: r68165
2003-06-18 20:43:55 +01:00
Neil Booth 7fb26bb001 hooks.c (hook_int_size_t_constcharptr_int_0): New.
* hooks.c (hook_int_size_t_constcharptr_int_0): New.
	* hooks.h (hook_int_size_t_constcharptr_int_0): New.
	* langhooks-def.h (lhd_decode_option, LANG_HOOKS_DECODE_OPTION): Die.
	(LANG_HOOKS_HANDLE_OPTION, LANG_HOOKS_INITIALIZER): Update.
	* langhooks.c (lhd_decode_option): Remove.
	* langhooks.h (struct lang_hooks): Remove decode_option.
	* opts.c (handle_option): No longer use decode_option.
java:
	* Make-lang.in: Handle mostlyclean.
treelang:
	* Make-lang.in: Update for option handling.
	* lang.opt: New.
	* tree1.c: Include opts.h and t-options.h.
	(treelang_decode_option): Remove.
	(treelang_handle_option): New.
	* treetree.c (LANG_HOOKS_DECODE_OPTION): Remove.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	* treetree.h (treelang_decode_option): Remove.
	(treelang_handle_option): New.

From-SVN: r67799
2003-06-11 22:21:10 +00:00
Neil Booth 2772ef3ef3 Makefile.in (OJBS, c-opts.o): Update.
* Makefile.in (OJBS, c-opts.o): Update.
	(c-options.c, c-options.h): Rename options.h and options.c.
	(options.h): Rename options_.h.
	(opts.o): New.
	* c-common.h (c_common_handle_option): Replace c_common_decode_option.
	(c_common_init_options): Update prototype.
	* c-lang.c (c_init_options): Update prototype.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	(LANG_HOOKS_DECODE_OPTION): Drop.
	* c-opts.c: Include opts.h and options.h instead of c-options.h
	and c-options.c.
	(lang_flags): Move to file scope.
	(find_opt, c_common_decode_option): Remove.
	(CL_C, CL_OBJC, CL_CXX, CL_OBJCXX, CL_JOINED, CL_SEPARATE,
	CL_REJECT_NEGATIVE): Move to opts.h.
	(missing_arg): Update prototype.
	(c_common_init_options): Update for new prototype.
	(c_common_handle_options): Filenames are passed as N_OPTS.
	* hooks.c (hook_int_void_0): New.
	* hooks.h (hook_int_void_0): New.
	* langhooks-def.h (LANG_HOOKS_INIT_OPTIONS): New default.
	(LANG_HOOKS_HANDLE_OPTION): Default to NULL for now.
	(LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (init_options): Update.
	(handle_option): New.
	* opts.c, opts.h: New files.
	* opts.sh: Update c file to include opts.h and options.h.
	* toplev.c: Include opts.h; change options.h to options_.h.
	(parse_options_and_default_flags): Get lang_mask, use
	handle_option for language-specific handling.
	* objc/objc-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	(objc_init_options): Update.
ada:
	* misc.c (gnat_init_options): Update.
cp:
	* cp-lang.c (LANG_HOOKS_DECODE_OPTON): Drop.
	(LANG_HOOKS_HANDLE_OPTION): Override.
	* cp-tree.h (cxx_init_options): Update.
	* lex.c (cxx_init_options): Update.
f:
	* com.c (ffe_init_options): Update.
java:
	* lang.c (java_init_options): Update.

From-SVN: r67584
2003-06-07 11:10:46 +00:00
Aldy Hernandez 967143957e tm.texi: Document TARGET_DWARF_REGISTER_SPAN.
2003-03-05  Aldy Hernandez  <aldyh@redhat.com>

        * doc/tm.texi: Document TARGET_DWARF_REGISTER_SPAN.

        * config/rs6000/rs6000.c (rs6000_dwarf_register_span): New.

        * hooks.c (hook_rtx_rtx_null): New.

        * hooks.h (hook_rtx_rtx_null): Protoize.

        * target-def.h (TARGET_DWARF_REGISTER_SPAN): New macro.
        (TARGET_INITIALIZER): Add TARGET_DWARF_REGISTER_SPAN.

        * target.h (struct gcc_target): Add dwarf_register_span.

        * dwarf2out.c (multiple_reg_loc_descriptor): New.
        (one_reg_loc_descriptor): New.
        (reg_loc_descriptor): Add support for values that span more than
        one register.

From-SVN: r63870
2003-03-05 22:37:52 +00:00
Roger Sayle 7daebb7ae4 hooks.c (hook_rtx_rtx_identity): Generic hook function that takes a single rtx and returns it unmodified.
* hooks.c (hook_rtx_rtx_identity): Generic hook function that
	takes a single rtx and returns it unmodified.
	* hooks.h (hook_rtx_rtx_identity): Prototype here.
	* target.h (struct gcc_target): Add "delegitimize_address"
	field to target structure.
	* target-def.h (TARGET_DELEGITIMIZE_ADDRESS):  Provide default
	for delegitimize_address target using hook_rtx_rtx_identity.
	(TARGET_INITIALIZER): Initialize delegitimize_address field
	using TARGET_DELEGITIMIZE_ADDRESS macro.
	* simplify-rtx.c (avoid_constant_pool_reference): Handle float
	extensions of constant pool references.  Use delegitimize_address
	to undo the obfuscation of "-fpic".
	* Makefile.in (simplify-rtx.o): Add dependency on target.h.

	* config/i386/i386.c (TARGET_DELEGITIMIZE_ADDRESS): Define as
	i386_simplify_dwarf_addr.
	(ix86_find_base_term): Simplify using i386_simplify_dwarf_addr.
  	(maybe_get_pool_constant): Likewise.

From-SVN: r62336
2003-02-03 19:40:58 +00:00
Richard Henderson dcefdf6717 target.h (targetm.address_cost): New.
* target.h (targetm.address_cost): New.
	* target-def.h (TARGET_ADDRESS_COST): New.
	(TARGET_RTX_COSTS): Uncomment.  Oops.
	* cse.c (address_cost): Use new target hook.
	(default_address_cost): New.
	* output.h (default_address_cost): Declare.
	* hooks.c (hook_int_rtx_0): New.
	* hooks.h (hook_int_rtx_0): Declare.
	* loop.c (combine_givs_p): Remove if 0 code.
	* system.h (ADDRESS_COST): Poison.

	* config/alpha/alpha.c, config/alpha/alpha.h, config/d30v/d30v.c,
	config/d30v/d30v.h, config/ia64/ia64.c, config/ia64/ia64.h,
	config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c,
	config/mcore/mcore.h, config/mmix/mmix.c, config/mmix/mmix.h,
	config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/sparc/sparc.c,
	config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h,
	config/xtensa/xtensa.c, config/xtensa/xtensa.h
	(TARGET_ADDRESS_COST): Define as hook_int_rtx_0.
	(ADDRESS_COST): Remove.

	* config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h,
	config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
	config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
	config/dsp16xx/dsp16xx-protos.h, config/dsp16xx/dsp16xx.c,
	config/dsp16xx/dsp16xx.h, config/i386/i386-protos.h,
	config/i386/i386.c, config/i386/i386.h, config/i960/i960-protos.h,
	config/i960/i960.c, config/i960/i960.h, config/ip2k/ip2k-protos.h,
	config/ip2k/ip2k.c, config/ip2k/ip2k.h, config/mips/mips-protos.h,
	config/mips/mips.c, config/mips/mips.h,
	config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
	config/m68hc11/m68hc11.h, config/ns32k/ns32k-protos.h,
	config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa-protos.h,
	config/pa/pa.c, config/pa/pa.h, config/s390/s390-protos.h,
	config/s390/s390.c, config/s390/s390.h, config/vax/vax-protos.h,
	config/vax/vax.c, config/vax/vax.h
	(foo_address_cost): Make static.
	(TARGET_ADDRESS_COST): New.
	(ADDRESS_COST): Remove.

	* config/arm/arm.h, config/arm/arm.c, config/m88k/m88k.h,
	config/m88k/m88k.c, config/romp/romp.h, config/romp/romp.c,
	config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c,
	config/stormy16/stormy16.h
	(ADDRESS_COST): Move code ...
	(foo_address_cost): ... here.
	(TARGET_ADDRESS_COST): New.

	* config/m32r/m32r.c (m32r_address_cost): Remove.
	* config/m32r/m32r-protos.h: Update.

	* config/mmix/mmix.c (mmix_address_cost): Remove.
	* config/mmix/mmix-protos.h: Update.

	* config/mn10300/mn10300.c (mn10300_address_cost_1): Rename from
	mn10300_address_cost; move unsig allocation ...
	(mn10300_address_cost): ... here.
	(TARGET_ADDRESS_COST): New.
	* config/mn10300/mn10300-protos.h: Update.
	* config/mn10300/mn10300.h (ADDRESS_COST): Remove.

From-SVN: r61988
2003-01-28 10:08:56 -08:00
Richard Henderson 3c50106f69 Makefile.in (cse.o): Depend on TARGET_H.
* Makefile.in (cse.o): Depend on TARGET_H.
	* cse.c (rtx_cost): Use targetm.rtx_costs.
	* system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison.
	* doc/tm.texi: Update.

	* target.h (targetm.rtx_costs): New.
	* target-def.h (TARGET_RTX_COSTS): New.
	* hooks.c (hook_bool_rtx_int_int_intp_false): New.
	* hooks.h: Update.

	* config/alpha/alpha.c (alpha_rtx_cost_data): New.
	(alpha_rtx_costs, TARGET_RTX_COSTS): New.
	* config/alpha/alpha.h (PROCESSOR_MAX): New.
	(CONST_COSTS, RTX_COSTS): Remove.

	* config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c,
	config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h,
	config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c,
	config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h,
	config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
	config/i370/i370.h, config/i386/i386.c, config/i386/i386.h,
	config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c,
	config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h,
	config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c,
	config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h,
	config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c,
	config/mn10200/mn10200.h, config/mn10300/mn10300.c,
	config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h,
	config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c,
	config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h,
	config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c,
	config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
	config/stormy16/stormy16.c, config/stormy16/stormy16.h,
	config/v850/v850.c, config/v850/v850.h,
	config/xtensa/xtensa.c, config/xtensa/xtensa.h
	(CONST_COSTS, RTX_COSTS): Move code ...
	(foo_rtx_costs, TARGET_RTX_COSTS): ... here.

	* config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs.
	(arm_rtx_costs, TARGET_RTX_COSTS): New.
	* config/arm/arm-protos.h: Update.
	* config/arm/arm.h (DEFAULT_RTX_COSTS): Remove.

	* config/avr/avr.h (CONST_COSTS): Move code ...
	* config/avr/avr.c (avr_rtx_costs): ... here.
	(default_rtx_costs): Make static.
	* config/avr/avr-protos.h: Update.

	* config/h8300/h8300.c (const_costs): Make static.
	(h8300_and_costs, h8300_shift_costs): Likewise.
	* config/h8300/h8300-protos.h: Update.

	* config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove.
	(CONST_COSTS): Move code ...
	* config/ip2k/ip2k.c (ip2k_rtx_costs): ... here.  Rename from
	default_rtx_costs; update for signature change.
	* config/ip2k/ip2k-protos.h: Update.

	* config/m68hc11/m68hc11.h (RTX_COSTS): Remove.
	(CONST_COSTS): Move code ...
	* config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here.
	(TARGET_RTX_COSTS): New.
	(m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static.
	* config/m68hc11/m68hc11-protos.h: Update.

	* config/m68k/m68k.c (const_int_cost): Make static.
	* config/m68k/m68k-protos.h: Update.

	* config/mcore/mcore.c (mcore_const_costs): Make static.
	(mcore_and_cost, mcore_ior_cost): Likewise.
	* config/mcore/mcore-protos.h: Update.

	* config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New.
	(mmix_rtx_cost_recalculated): Remove.
	* config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove.
	* config/mmix/mmix-protos.h: Update.

	* config/sh/sh.c (shiftcosts): Make static.
	(addsubcosts, andcosts, multcosts): Likewise.
	* config/sh/sh-protos.h: Update.

	* config/sparc/sparc.c (TARGET_RTX_COSTS): New.
	(sparc_rtx_costs): Make static; update for change in signature.
	* config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove.
	* config/sparc/sparc-protos.h: Update.

	* config/v850/v850.c (const_costs): Make static.
	* config/v850/v850-protos.h: Update.

	* config/vax/vax.h (RTX_COSTS): Remove.
	(CONST_COSTS): Move code ...
	* config/vax/vax.c (vax_rtx_costs_1): ... here; rename
	from vax_rtx_cost.
	(vax_rtx_costs, TARGET_RTX_COSTS): New.

From-SVN: r61954
2003-01-27 20:46:33 -08:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Richard Henderson 3a04ff6433 target.h (gcc_target): Add cannot_force_const_mem.
* target.h (gcc_target): Add cannot_force_const_mem.
        * target-def.h (TARGET_CANNOT_FORCE_CONST_MEM): New.
        (TARGET_INITIALIZER): Add it.
        * varasm.c (force_const_mem): Fail if cannot_force_const_mem.
        * expr.c (emit_move_insn): Be prepared for force_const_mem to fail.
        * reload1.c (reload): Likewise.
        * hooks.c (hook_bool_rtx_false): New.
        * hooks.h: Declare it.

        * config/i386/i386.c (ix86_cannot_force_const_mem): New.
        (TARGET_CANNOT_FORCE_CONST_MEM): New.
        (ix86_expand_move): Remove de-const-pooling hack.

	* gcc.dg/tls/opt-4.c: New.

From-SVN: r59971
2002-12-09 15:54:01 -08:00