Commit Graph

808 Commits

Author SHA1 Message Date
Jan Hubicka 0e45662527 calls.c (expand_call): Do not sibcall if outgoing_reg_parm_stack_space does not match.
* calls.c (expand_call): Do not sibcall if
	outgoing_reg_parm_stack_space does not match.

Co-Authored-By: Kai Tietz <kai.tietz@onevision.com>

From-SVN: r142792
2008-12-17 12:03:04 +00:00
Kai Tietz 4576913435 function.c (aggregate_value_p): Get fntype from CALL_EXPR in any case.
2008-12-09  Kai Tietz  <kai.tietz@onevision.com>

	PR/38366
	* function.c (aggregate_value_p): Get fntype from CALL_EXPR in any
	case.
	* calls.c (nitialize_argument_information): Add fntype argument 
	and use it for calls.promote_function_args.
        (expand_call): Pass fntype to aggregate_value_p if no fndecl
	available and pass additional fntype to
	initialize_argument_information.
	* config/i386/i386.c (ix86_reg_parm_stack_space): Remove cfun part
	to get function abi type.
	(init_cumulative_args): Use for abi kind detection fntype, when no
	fndecl is available.

From-SVN: r142584
2008-12-09 10:14:28 +01:00
Kai Tietz 5d059ed962 calls.c (expand_call): Pass to REG_PARM_STACK_SPACE the type of the function...
2008-11-26  Kai Tietz  <kai.tietz@onevision.com>

        PR/38227
        * calls.c (expand_call): Pass to REG_PARM_STACK_SPACE
        the type of the function, when there is no FUNCTION_DECL available.
        OUTGOING_REG_PARM_STACK_SPACE pass fntype, when no fndecl is available.
        (compute_argument_block_size): Add fntype argument.
        OUTGOING_REG_PARM_STACK_SPACE pass fntype, when no fndecl is available.
        (emit_library_call_value_1): Likewise.
        OUTGOING_REG_PARM_STACK_SPACE pass fntype, when no fndecl is available.
        * config/i386/i386.c (ix86_reg_parm_stack_space): Handle function types.
        * doc/tm.texi (REG_PARM_STACK_SPACE): Adjust documentation.

From-SVN: r142215
2008-11-26 11:25:38 +01:00
Eric Botcazou 852d22b41a calls.c (store_unaligned_arguments_into_pseudos): Deal only with values living in memory and use more precise alignment information.
* calls.c (store_unaligned_arguments_into_pseudos): Deal only with
	values living in memory and use more precise alignment information.

From-SVN: r141742
2008-11-10 16:52:50 +00:00
Ian Lance Taylor e0c68ce9d2 rtl.h (LABEL_REF_NONLOCAL_P): Don't check for REG_LABEL_OPERAND or REG_LABEL_TARGET.
./:	* rtl.h (LABEL_REF_NONLOCAL_P): Don't check for REG_LABEL_OPERAND
	or REG_LABEL_TARGET.
	* calls.c (emit_library_call_value_1): Use MEM_P rather than
	comparing MODE with MEM.
	* gimple.c (gimple_build_predict): Cast END_PREDICTORS before
	comparing with GF_PREDICT_TAKEN.
	(gimple_get_lhs): Change code to enum gimple_code.
	(gimple_set_lhs): Likewise.
	* ifcvt.c (noce_process_if_block): Correct GET_MODE to GET_CODE.
	* omp-low.c (find_omp_clause): Change kind parameter to enum
	omp_clause_code.
	* tree-flow.h (find_omp_clause): Update declaration.
	* regrename.c (clear_dead_regs): Change kind parameter to enum
	reg_note.
	* reload1.c (eliminate_regs_1): Use REG_NOTE_KIND rather than
	GET_MODE.
	* see.c (see_get_extension_data): Change return type to enum
	entry_type.  Change UNKNOWN to NOT_RELEVANT, SIGN_EXTEND to
	SIGNED_EXTENDED_DEF, ZERO_EXTEND to ZERO_EXTENDED_DEF.
	(see_gen_normalized_extension): Change extension_code parameter to
	enum entry_type.
	(see_seek_pre_extension_expr): Change extension_code to enum
	entry_type.
	(see_merge_one_def_extension): Likewise.
	(see_handle_relevant_defs): Likewise.
	(see_handle_relevant_uses): Likewise.
	(see_analyze_one_def): Likewise.
	* tree-cfg.c (need_fake_edge_p): Compare gimple code with
	GIMPLE_ASM rather than ASM_EXPR.
	* tree-ssa-alias.c (is_escape_site): Compare gimple code with
	GIMPLE_RETURN rather than RETURN_EXPR.
	* tree-ssa-ccp.c (likely_value): Change code to enum gimple_code.
	(evaluate_stmt): Likewise.
	* tree-vect-analyze.c (vect_analyze_operations): Change relevance
	to enum vect_relevant.
	(vect_mark_stmts_to_be_vectorized): Change assertion to not
	compare gimple codes with tree codes.
cp/:
	* parser.c (check_no_duplicate_clause): Change code parameter to
	enum omp_clause_code.
fortran/:
	* symbol.c (generate_isocbinding_symbol): Compare
	gfc_notification_std with ERROR rather than FAILURE.
	* resolve.c (check_assumed_size_reference): Compare array type
	with AR_FULL rather than DIMEN_ELEMENT.
	(resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
	FL_VARIABLE.

From-SVN: r139991
2008-09-04 17:32:38 +00:00
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
Eric Botcazou b38f3813f7 re PR middle-end/20548 (ACATS c52103x c52104x c52104y segfault)
PR ada/20548
	* common.opt (-fstack-check): Do not declare the variable here.
	(-fstack-check=): New option variant.
	* doc/invoke.texi (Code Gen Options): Document it.
	* expr.h (STACK_OLD_CHECK_PROTECT): New macro.
	(STACK_CHECK_PROTECT): Bump to 3 pages if DWARF-2 EH is used.
	(STACK_CHECK_STATIC_BUILTIN): New macro.
	* doc/tm.texi (Stack Checking): Document STACK_CHECK_STATIC_BUILTIN.
	* opts.c: Include expr.h.
	(common_handle_option) <OPT_fold_stack_check_>: New case.
	<OPT_fstack_check>: Likewise.
	* calls.c (initialize_argument_information): Use TYPE_SIZE_UNIT
	consistently in the test for variable-sized types.  Adjust for
	new behaviour of flag_stack_check.
	* explow.c: Include except.h.
	(allocate_dynamic_stack_space): Do not take into account
	STACK_CHECK_MAX_FRAME_SIZE for static builtin stack checking.
	* function.c (gimplify_parameters): Use DECL_SIZE_UNIT in the test
	for variable-sized parameters.  Treat all parameters whose size is
	greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized if generic
	stack checking is enabled.
	* gimplify.c (gimplify_decl_expr): Treat non-static objects whose
	size is greater than STACK_CHECK_MAX_VAR_SIZE as variable-sized
	if generic stack checking is enabled.
	(expand_function_end): Adjust for new behaviour of flag_stack_check.
	* reload1.c (reload): Likewise.
	* stmt.c (expand_decl): Assert that all automatic variables have
	fixed size at this point and remove dead code.
	* flags.h (stack_check_type): New enumeration type.
	(flag_stack_check): Declare.
	* toplev.c (flag_stack_check): New global variable.
	* Makefile.in (opts.o): Add dependency on EXPR_H.
	(explow.o): Add dependency on except.h.
ada/
	* gcc-interface/decl.c (gnat_to_gnu_entity): Use DECL_SIZE_UNIT in the
	setjmp test consistently.  Adjust for new behaviour of flag_stack_check.
	* gcc-interface/utils2.c (build_call_alloc_dealloc): Remove redundant
	test of flag_stack_check.  Adjust for new behaviour of flag_stack_check.

From-SVN: r139159
2008-08-16 18:40:57 +00:00
Kaveh R. Ghazi 82d6e6fc38 builtins.c (expand_builtin_profile_func): Avoid C++ keywords.
* builtins.c (expand_builtin_profile_func): Avoid C++ keywords.
	* calls.c (avoid_likely_spilled_reg): Likewise.
	* cfgexpand.c (gimple_assign_rhs_to_tree): Likewise.
	* cgraph.c (cgraph_clone_edge, cgraph_clone_node): Likewise.
	* config/i386/i386.c (ix86_expand_special_args_builtin,
	ix86_secondary_reload): Likewise.
	* except.c (struct eh_region, gen_eh_region_catch,
	remove_unreachable_regions, duplicate_eh_regions,
	assign_filter_values, build_post_landing_pads,
	sjlj_find_directly_reachable_regions, remove_eh_handler,
	reachable_next_level, foreach_reachable_handler,
	can_throw_internal_1, can_throw_external_1,
	collect_one_action_chain): Likewise.
	* expr.c (expand_expr_real_1, vector_mode_valid_p): Likewise.
	* fold-const.c (twoval_comparison_p, eval_subst): Likewise.
	* function.c (update_temp_slot_address, instantiate_new_reg,
	instantiate_virtual_regs_in_rtx,
	instantiate_virtual_regs_in_insn): Likewise.
	* gimple.c (extract_ops_from_tree, gimple_seq_copy): Likewise.
	* gimplify.c (gimplify_call_expr, gimplify_init_constructor,
	gimplify_cleanup_point_expr): Likewise.
	* ipa-cp.c (ipcp_lattice_changed): Likewise.
	* passes.c (next_pass_1): Likewise.
	* print-tree.c (print_node_brief, print_node): Likewise.
	* profile.c (branch_prob): Likewise.
	* tree-dump.c (dump_register): Likewise.
	* tree-eh.c (replace_goto_queue_cond_clause, lower_catch):
	Likewise.
	* tree-inline.c (remap_ssa_name, remap_type_1, remap_blocks,
	copy_statement_list, remap_gimple_op_r, copy_tree_body_r,
	copy_edges_for_bb, copy_cfg_body, copy_tree_r,
	copy_arguments_for_versioning, copy_static_chain): Likewise.
	* tree-into-ssa.c (names_replaced_by, add_to_repl_tbl,
	add_new_name_mapping, register_new_name_mapping): Likewise.
	* tree-mudflap.c (mf_xform_derefs): Likewise.
	* tree-predcom.c (struct chain, dump_chain, replace_ref_with,
	get_init_expr, combine_chains): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-structalias.c (create_variable_info_for): Likewise.
	* tree-vrp.c (simplify_cond_using_ranges): Likewise.
	* tree.c (substitute_in_expr, iterative_hash_expr): Likewise.
	* value-prof.c (gimple_duplicate_stmt_histograms): Likewise.

From-SVN: r138809
2008-08-06 15:57:09 +00:00
H.J. Lu 01973e2672 re PR middle-end/37010 (-mno-accumulate-outgoing-args doesn't work with stack alignment)
gcc/

2008-08-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/37010
	* calls.c (expand_call): Use the biggest preferred stack
	boundary.

gcc/testsuite/

2008-08-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/37010
	* gcc.dg/torture/stackalign/push-1.c: New.

From-SVN: r138808
2008-08-06 08:43:46 -07:00
H.J. Lu 2e3f842fe6 [multiple changes]
2008-07-30  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* builtins.c (expand_builtin_setjmp_receiver): Replace
	virtual_incoming_args_rtx with crtl->args.internal_arg_pointer.
	(expand_builtin_apply_args_1): Likewise.
	(expand_builtin_longjmp): Need DRAP for stack alignment.
	(expand_builtin_apply): Likewise.

	* caller-save.c (setup_save_areas): Call assign_stack_local_1
	instead of assign_stack_local to allow alignment reduction.

	* calls.c (emit_call_1): Need DRAP for stack alignment if
	return pops.
	(expand_call): Replace virtual_incoming_args_rtx with
	crtl->args.internal_arg_pointer.
	* stmt.c (expand_nl_goto_receiver): Likewise.

	* cfgexpand.c (get_decl_align_unit): Estimate stack variable
	alignment and store to stack_alignment_estimated and
	max_used_stack_slot_alignment.
	(expand_one_var): Likewise.
	(expand_stack_alignment): New function.
	(tree_expand_cfg): Initialize max_used_stack_slot_alignment
	and stack_alignment_estimated fields in rtl_data.  Call
	expand_stack_alignment at end.

	* defaults.h (INCOMING_STACK_BOUNDARY): New.
	(MAX_STACK_ALIGNMENT): Likewise.
	(MAX_SUPPORTED_STACK_ALIGNMENT): Likewise.
	(SUPPORTS_STACK_ALIGNMENT): Likewise.

	* emit-rtl.c (gen_reg_rtx): Estimate stack alignment for
	stack alignment when generating virtual registers.

	* function.c (assign_stack_local): Renamed to ...
	(assign_stack_local_1): This.  Add a parameter to indicate
	if it is OK to reduce alignment.
	(assign_stack_local): Use it.
	(instantiate_new_reg): Instantiate virtual incoming args rtx
	to vDRAP if stack realignment and DRAP is needed.
	(assign_parms): Collect parameter/return type alignment and
	contribute to stack_alignment_estimated.
	(locate_and_pad_parm): Likewise.
	(get_arg_pointer_save_area): Replace virtual_incoming_args_rtx
	with crtl->args.internal_arg_pointer.

	* function.h (rtl_data): Add new field drap_reg,
	max_used_stack_slot_alignment, stack_alignment_estimated,
	stack_realign_needed, need_drap, stack_realign_processed and
	stack_realign_finalized.
	(stack_realign_fp): New macro.
	(stack_realign_drap): Likewise.

	* global.c (compute_regsets): Frame pointer is needed when
	stack is realigned.  Can eliminate frame pointer when stack is
	realigned and dynamic realigned argument pointer isn't used.

	* reload1.c (update_eliminables):  Frame pointer is needed
	when stack is realigned.
	(init_elim_table): Can eliminate frame pointer when stack is
	realigned and dynamic realigned argument pointer isn't used.

	* rtl.h (assign_stack_local_1): Declare new funtion.

	* target-def.h (TARGET_UPDATE_STACK_BOUNDARY): New.
	(TARGET_GET_DRAP_RTX): Likewise.
	(TARGET_CALLS): Add TARGET_UPDATE_STACK_BOUNDARY and
	TARGET_GET_DRAP_RTX.

	* target.h (gcc_target): Add update_stack_boundary and
	get_drap_rtx.

	* tree-vectorizer.c (vect_can_force_dr_alignment_p): Replace
	STACK_BOUNDARY with MAX_STACK_ALIGNMENT.

2008-07-30  Xuepeng Guo  <xuepeng.guo@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* dwarf2out.c (dw_fde_struct): Add stack_realignment, drap_reg,
	vdrap_reg, stack_realign and drap_reg_saved.
	(add_cfi): Don't allow redefining CFA when DRAP is used.
	(reg_save): Handle stack alignment.
	(dwarf2out_frame_debug_expr): Add rules 16-20 to handle stack
	alignment.  Don't generate DWARF information for (set fp sp)
	when DRAP is used.
	(dwarf2out_begin_prologue): Initialize drap_reg and vdrap_reg
	to INVALID_REGNUM.
	(int_loc_descriptor): Move prototype forward.  Also define if
	DWARF2_UNWIND_INFO is true.
	(output_cfa_loc): Handle DW_CFA_expression.
	(build_cfa_aligned_loc): New.
	(based_loc_descr): Update assert for stack realign.  For local
	variables, use sp+offset when stack is aligned without drap and
	fp+offset when stack is aligned with drap.  For arguments, use
	cfa+offset when drap is used to align stack.

2008-07-30  Joey Ye  <joey.ye@intel.com>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* config/i386/i386.c (ix86_force_align_arg_pointer_string):
	Break long line.
	(ix86_gen_andsp): New.
	(ix86_user_incoming_stack_boundary): Likewise.
	(ix86_default_incoming_stack_boundary): Likewise.
	(ix86_incoming_stack_boundary): Likewise.
	(ix86_can_eliminate): Likewise.
	(find_drap_reg): Likewise.
	(ix86_update_stack_boundary): Likewise.
	(ix86_get_drap_rtx): Likewise.
	(ix86_finalize_stack_realign_flags): Likewise.
	(TARGET_UPDATE_STACK_BOUNDARY): Likewise.
	(TARGET_GET_DRAP_RTX): Likewise.
	(override_options): Overide option value for new options.
	(ix86_function_ok_for_sibcall): Remove check for
	force_align_arg_pointer.
	(ix86_handle_cconv_attribute): Likewise.
	(ix86_function_regparm): Likewise.
	(setup_incoming_varargs_64): Don't set stack_alignment_needed
	here.
	(ix86_va_start): Replace virtual_incoming_args_rtx with
	crtl->args.internal_arg_pointer.
	(ix86_select_alt_pic_regnum): Check DRAP register.
	(ix86_save_reg): Replace force_align_arg_pointer with drap_reg.
	(ix86_compute_frame_layout): Compute frame layout wrt stack
	realignment.
	(ix86_internal_arg_pointer): Just return
	virtual_incoming_args_rtx.
	(ix86_expand_prologue): Decide if stack realignment is needed
	and generate prologue code accordingly.
	(ix86_expand_epilogue): Generate epilogue code wrt stack
	realignment is really needed or not.
	
	* config/i386/i386.h (MAIN_STACK_BOUNDARY): New.
	(ABI_STACK_BOUNDARY): Likewise.
	(PREFERRED_STACK_BOUNDARY_DEFAULT): Likewise.
	(STACK_REALIGN_DEFAULT): Likewise.
	(INCOMING_STACK_BOUNDARY): Likewise.
	(MAX_STACK_ALIGNMENT): Likewise.
	(ix86_incoming_stack_boundary): Likewise.
	(FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Removed.
	(REAL_PIC_OFFSET_TABLE_REGNUM): Updated to use BX_REG.
	(CAN_ELIMINATE): Defined with ix86_can_eliminate.
	(machine_function): Remove force_align_arg_pointer.

	* config/i386/i386.md (BX_REG): New.
	(R13_REG): Likewise.

	* config/i386/i386.opt (mforce_drap): New.
	(mincoming-stack-boundary): Likewise.
	(mstackrealign): Add Init(-1).

	* config/i386/i386-protos.h (ix86_can_eliminate): New

2008-07-30  H.J. Lu  <hongjiu.lu@intel.com>

	* doc/extend.texi: Update force_align_arg_pointer.

	* doc/invoke.texi: Document -mincoming-stack-boundary.  Update
	-mstackrealign.

	* doc/tm.texi (MAX_STACK_ALIGNMENT): Add macro.
	(INCOMING_STACK_BOUNDARY): Likewise.
	(TARGET_UPDATE_STACK_BOUNDARY): New target hook.
	(TARGET_GET_DRAP_RTX): Likewise.

From-SVN: r138335
2008-07-30 12:20:43 -07:00
Richard Biener 726a989a8b backport: ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
2008-07-28  Richard Guenther  <rguenther@suse.de>

	Merge from gimple-tuples-branch.

	* ChangeLog.tuples: ChangeLog from gimple-tuples-branch.
	* gimple.def: New file.
	* gsstruct.def: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* tree-gimple.c: Removed.  Merged into ...
	* gimple.c: ... here.  New file.
	* tree-gimple.h: Removed.  Merged into ...
	* gimple.h: ... here.  New file.

	* Makefile.in: Add dependencies on GIMPLE_H and tree-iterator.h.
	* configure.ac: Added support for ENABLE_GIMPLE_CHECKING and the
	--enable-checking=gimple flag.
	* config.in: Likewise.
	* configure: Regenerated.

	* tree-ssa-operands.h: Tuplified.
	* tree-vrp.c: Likewise.
	* tree-loop-linear.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-complex.c: Likewise.
	* cgraphbuild.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tracer.c: Likewise.
	* gengtype.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* value-prof.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-tailcall.c: Likewise.
	* value-prof.h: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* tree-pass.h: Likewise.
	* ipa-cp.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-scalar-evolution.h: Likewise.
	* target.h: Likewise.
	* lambda-mat.c: Likewise.
	* tree-phinodes.c: Likewise.
	* diagnostic.h: Likewise.
	* builtins.c: Likewise.
	* tree-ssa-alias-warnings.c: Likewise.
	* cfghooks.c: Likewise.
	* fold-const.c: Likewise.
	* cfghooks.h: Likewise.
	* omp-low.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* ipa-reference.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* toplev.c: Likewise.
	* tree-gimple.c: Likewise.
	* tree-gimple.h: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sccvn.h: Likewise.
	* cgraphunit.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* c-format.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* ipa-utils.c: Likewise.
	* tree-ssa-propagate.h: Likewise.
	* tree-ssa-alias.c: Likewise.
	* gimple-low.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* ipa-inline.c: Likewise.
	* c-semantics.c: Likewise.
	* dwarf2out.c: Likewise.
	* expr.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* predict.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* matrix-reorg.c: Likewise.
	* c-decl.c: Likewise.
	* tree-eh.c: Likewise.
	* c-pretty-print.c: Likewise.
	* lambda-trans.c: Likewise.
	* function.c: Likewise.
	* langhooks.c: Likewise.
	* ebitmap.h: Likewise.
	* tree-vectorizer.c: Likewise.
	* function.h: Likewise.
	* langhooks.h: Likewise.
	* tree-vectorizer.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa-type-escape.h: Likewise.
	* domwalk.c: Likewise.
	* tree-if-conv.c: Likewise.
	* profile.c: Likewise.
	* domwalk.h: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-affine.c: Likewise.
	* tree-vect-analyze.c: Likewise.
	* c-typeck.c: Likewise.
	* gimplify.c: Likewise.
	* coretypes.h: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* calls.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree.def: Likewise.
	* tree-dfa.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* cfgexpand.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-predcom.c: Likewise.
	* lambda.h: Likewise.
	* tree-mudflap.c: Likewise.
	* ipa-prop.c: Likewise.
	* print-tree.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* ipa-prop.h: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* ggc-page.c: Likewise.
	* c-omp.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-ssa.c: Likewise.
	* lambda-code.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-inline.h: Likewise.
	* tree-iterator.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-vect-transform.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* cfgloop.c: Likewise.
	* system.h: Likewise.
	* tree-profile.c: Likewise.
	* cfgloop.h: Likewise.
	* c-gimplify.c: Likewise.
	* c-common.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-flow.h: Likewise.
	* c-common.h: Likewise.
	* basic-block.h: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-ssa-structalias.h: Likewise.
	* tree-cfg.c: Likewise.
	* passes.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* cfgrtl.c: Likewise.
	* varpool.c: Likewise.
	* stmt.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* langhooks-def.h: Likewise.
	* tree-ssa-operands.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32c/m32c-protos.h: Likewise.
	* config/spu/spu.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/mips/mips.c: Likewise.

From-SVN: r138207
2008-07-28 14:33:56 +00:00
Ian Lance Taylor 65c5f2a63f rtlanal.c (add_reg_note): New function.
* rtlanal.c (add_reg_note): New function.
	* rtl.h (add_reg_note): Declare.
	* auto-inc-dec.c (attempt_change): Use add_reg_note.
	* bb-reorder.c (add_reg_crossing_jump_notes): Likewise.
	* builtins.c (expand_builtin_longjmp): Likewise.
	(expand_builtin_nonlocal_goto): Likewise.
	* calls.c (emit_call_1, expand_call): Likewise.
	* cfgexpand.c (add_reg_br_prob_note): Likewise.
	* cfglayout.c (fixup_reorder_chain): Likewise.
	* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
	(commit_one_edge_insertion): Likewise.
	* combine.c (move_deaths, distribute_notes): Likewise.
	* df-problems.c (df_set_note): Likewise.
	* emit-rtl.c (link_cc0_insns, try_split): Likewise.
	(set_unique_reg_note): Likewise.
	(emit_copy_of_insn_after): Likewise.
	* expr.c (expand_expr_real): Likewise.
	* gcse.c (add_label_notes): Likewise.
	* haifa-sched.c (create_check_block_twin): Likewise.
	* jump.c (mark_jump_label_1): Likewise.
	* loop-doloop.c (add_test, doloop_modify): Likewise.
	* loop-unswitch.c (compare_and_jump_seq): Likewise.
	* lower-subreg.c (move_eh_region_note): Likewise.
	* optabs.c (emit_libcall_block): Likewise.
	* predict.c (predict_insn): Likewise.
	(combine_predictions_for_insn): Likewise.
	* recog.c (peephole2_optimize): Likewise.
	* regmove.c (try_auto_increment): Likewise.
	* reg-stack.c (emit_pop_insn, move_for_stack_reg): Likewise.
	* reload.c (find_reloads): Likewise.
	* reload1.c (fixup_eh_region_note): Likewise.
	(reload_as_needed, add_auto_inc_notes, copy_eh_notes): Likewise.
	* reorg.c (delete_prior_computation): Likewise.
	(delete_computation, dbr_schedule): Likewise.
	* config/pa/pa.c (legitimize_pic_address): Likewise.
	* config/sh/sh.c (sh_reorg): Likewise.

From-SVN: r137374
2008-07-02 18:01:18 +00:00
Kaveh R. Ghazi f883e0a7dc alias.c (record_alias_subset, [...]): Fix -Wc++-compat and/or -Wcast-qual warnings.
* alias.c (record_alias_subset, init_alias_analysis): Fix
	-Wc++-compat and/or -Wcast-qual warnings.
	* attribs.c (lookup_attribute_spec): Likewise.
	* bb-reorder.c (find_traces, rotate_loop, find_traces_1_round,
	copy_bb, connect_traces,
	find_rarely_executed_basic_blocks_and_cr): Likewise.
	* bt-load.c (find_btr_def_group, add_btr_def, new_btr_user,
	note_btr_set, migrate_btr_defs): Likewise.
	* builtins.c (result_vector, expand_builtin_memcpy,
	expand_builtin_mempcpy_args, expand_builtin_strncpy,
	builtin_memset_read_str, expand_builtin_printf,
	fold_builtin_memchr, rewrite_call_expr, fold_builtin_printf):
	Likewise.
	* caller-save.c (mark_set_regs): Likewise.
	* calls.c (expand_call, emit_library_call_value_1): Likewise.
	* cgraph.c (cgraph_edge): Likewise.
	* combine.c (likely_spilled_retval_1): Likewise.
	* coverage.c (htab_counts_entry_hash, htab_counts_entry_eq,
	htab_counts_entry_del, get_coverage_counts): Likewise.
	* cselib.c (new_elt_list, new_elt_loc_list, entry_and_rtx_equal_p,
	new_cselib_val): Likewise.
	* dbgcnt.c (dbg_cnt_process_opt): Likewise.
	* dbxout.c (dbxout_init, dbxout_type, output_used_types_helper):
	Likewise.
	* df-core.c (df_compact_blocks): Likewise.
	* df-problems.c (df_grow_bb_info, df_chain_create): Likewise.
	* df-scan.c (df_grow_reg_info, df_ref_create,
	df_insn_create_insn_record, df_insn_rescan, df_notes_rescan,
	df_ref_compare, df_ref_create_structure, df_bb_refs_record,
	df_record_entry_block_defs, df_record_exit_block_uses,
	df_bb_verify): Likewise.
	* df.h (DF_REF_EXTRACT_WIDTH_CONST, DF_REF_EXTRACT_OFFSET_CONST,
	DF_REF_EXTRACT_MODE_CONST): New.
	* dominance.c (get_immediate_dominator, get_dominated_by,
	nearest_common_dominator, root_of_dom_tree,
	iterate_fix_dominators, first_dom_son, next_dom_son): Fix
	-Wc++-compat and/or -Wcast-qual warnings.
	* dse.c (clear_alias_set_lookup, get_group_info, gen_rtx_MEM,
	record_store, replace_read, check_mem_read_rtx, scan_insn,
	dse_step1, dse_record_singleton_alias_set): Likewise.
	* dwarf2asm.c (dw2_force_const_mem): Likewise.

From-SVN: r137137
2008-06-26 00:28:15 +00:00
Uros Bizjak b5f772ce8d PR middle-end/PR36584
PR middle-end/PR36584
	* calls.c (expand_call): Increase alignment for recursive functions.

testsuite/ChangeLog:

	PR middle-end/PR36584
	* testsuite/gcc.dg/pr36584.c: New test.
	* testsuite/gcc.target/i386/local2.c: Remove invalid test.

From-SVN: r137045
2008-06-23 19:31:12 +02:00
Kenneth Zadeck 84b8030f0e optabs.c (prepare_cmp_insn): Changed LCT_PURE_MAKE_BLOCK to LCT_PURE and LCT_CONST_MAKE_BLOCK to LCT_CONST...
2008-05-14  Kenneth Zadeck <zadeck@naturalbridge.com>

	* optabs.c (prepare_cmp_insn): Changed LCT_PURE_MAKE_BLOCK to
	LCT_PURE and LCT_CONST_MAKE_BLOCK to LCT_CONST in calls to
	emit_library_call_value. 
	* builtins.c (expand_builtin_powi, expand_builtin_memcmp): Ditto.
	* tree.h (ECF_LIBCALL_BLOCK): Removed.
	* calls.c (initialize_argument_information, precompute_arguments, 
	expand_call, emit_library_call_value_1): Remove ECF_LIBCALL_BLOCK.
	(precompute_arguments): Removed flags parameter.
	* rtl.h (LCT_CONST_MAKE_BLOCK, LCT_PURE_MAKE_BLOCK): Removed.

From-SVN: r135299
2008-05-14 17:05:13 +00:00
Adam Nemet 1fd03c7021 calls.c (emit_library_call_value_1): Restore code clearing ECF_LIBCALL_BLOCK to ensure that we only call...
* calls.c (emit_library_call_value_1): Restore code clearing
	ECF_LIBCALL_BLOCK to ensure that we only call end_sequence
	once.

From-SVN: r135295
2008-05-14 14:27:06 +00:00
H.J. Lu 17b29c0a17 calls.c (expand_call): Don't use callgraph to increase preferred_stack_boundary.
2008-05-09  H.J. Lu  <hongjiu.lu@intel.com>

	* calls.c (expand_call): Don't use callgraph to increase
	preferred_stack_boundary.

	* cgraph.h (cgraph_rtl_info): Use unsigned on
	preferred_incoming_stack_boundary.

	* final.c (rest_of_clean_state): Use unsigned on
	preferred_stack_boundary.

From-SVN: r135134
2008-05-09 17:41:39 -07:00
Kai Tietz 033df0b9d2 calls.c (compute_argument_block_size ): Add ATTRIBUTE_UNUSED to fndecl argument.
2008-05-08  Kai Tietz  <kai.tietz@onevision.com>

	PR/36180
	* calls.c (compute_argument_block_size ): Add ATTRIBUTE_UNUSED to
	fndecl argument.
	(emit_library_call_value_1): Add ATTRIBUTE_UNUSED to variable
	fndecl.
	* target-def.h: Check that TARGET_RETURN_IN_MEMORY isn't declared in front.

From-SVN: r135079
2008-05-08 13:32:55 +02:00
Kai Tietz 81464b2cd8 2008-05-07 Kai Tietz <kai,tietz@onevision.com>
* calls.c (compute_argument_block_size): Add argument tree fndecl.
	(OUTGOING_REG_PARM_STACK_SPACE): Add function type argument.
	(emit_library_call_value_1): Add new variable fndecl initialized by
	NULL_TREE. It should be the decl type of orgfun, but this information
	seems not to be available here, so it uses the default calling abi.
	* config/arm/arm.c (arm_return_in_memory): Add fntype argumen.
	* config/arm/arm.h (RETURN_IN_MEMORY): Replace RETURN_IN_MEMORY
	by TARGET_RETURN_IN_MEMORY.
	* config/i386/i386-interix.h: Likewise.
	* config/i386/i386.h: Likewise.
	* config/i386/i386elf.h: Likewise.
	* config/i386/ptx4-i.h: Likewise.
	* config/i386/sol2-10.h: Likewise.
	* config/i386/sysv4.h: Likewise.
	* config/i386/vx-common.h: Likewise.
	* config/cris/cris.h: Removed #if 0 clause.
	* config/arm/arm-protos.h (arm_return_in_memory): Add fntype
	argument.
	* config/i386/i386-protos.h (ix86_return_in_memory): Add fntype
	argument.
	(ix86_sol10_return_in_memory): Likewise.
	(ix86_i386elf_return_in_memory): New.
	(ix86_i386interix_return_in_memory): New.
	* config/mt/mt-protos.h (mt_return_in_memory): New.
	* config/mt/mt.c: Likewise.
	* config/mt/mt.h (OUTGOING_REG_PARM_STACK_SPACE): Add FNTYPE argument.
	(RETURN_IN_MEMORY):  Replace by TARGET_RETURN_IN_MEMORY.
	* config/bfin/bfin.h: Likewise.
	* config/bfin/bfin-protos.h (bfin_return_in_memory): Add fntype
	argument.
	* config/bfin/bfin.c: Likewise.
	* config/pa/pa.h (OUTGOING_REG_PARM_STACK_SPACE): Add FNTYPE argument.
	* config/alpha/unicosmk.h: Likewise.
	* config/i386/cygming.h: Likewise.
	* config/iq2000/iq2000.h: Likewise.
	* config/mips/mips.h: Likewise.
	* config/mn10300/mn10300.h: Likewise.
	* config/rs6000/rs6000.h: Likewise.
	* config/score/score.h: Likewise.
	* config/spu/spu.h: Likewise.
	* config/v850/v850.h: Likewise.
	* defaults.h: Likewise.
	* doc/tm.texi (OUTGOING_REG_PARM_STACK_SPACE): Adjust documentation.
	* expr.c (emit_block_move): Adjust use of OUTGOING_REG_PARM_STACK_SPACE.
	* function.c (STACK_DYNAMIC_OFFSET): Adjust use of
	OUTGOING_REG_PARM_STACK_SPACE.
	* targhooks.c (default_return_in_memory): Remove RETURN_IN_MEMORY.

From-SVN: r135069
2008-05-08 09:10:49 +02:00
Kenneth Zadeck becfd6e57b [multiple changes]
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>

        PATCH rtl/7335
        PATCH rtl/33826
        * see.c (see_copy_insn): Copy new pure const attributes for new
        call.
        * c-decl.c (merge_decls): Ditto.
        * postreload.c (record_opr_changes): Change CONST_OR_PURE_CALL_P
        to RTL_CONST_OR_PURE_CALL_P.
        * tree.c (define_local_buitin): Rename DECL_IS_PURE to
        DECL_PURE_P.  Initialized DECL_LOOPING_CONST_PURE.
        (process_call_operands): Set tree_side_effects properly.
        * tree.h (TREE_READONLY_DECL_P): Removed.
        (DECL_IS_PURE): Renamed to DECL_PURE_P.
        (DECL_LOOPING_OR_CONST_P): New macro.
        (struct tree_function_decl): Added looping_const_or_pure_p.
        (ECF_*) Renumbered.
        (ECF_LOOPING_OR_CONST_P): New macro,
        * rtlanal.c (pure_const_p): Removed.
        * builtins.c (expand_builtin): Rename DECL_IS_PURE to DECL_PURE_P.
        * reorg.c (delete_prior_computation) Changed CONST_OR_PURE_CALL_P
        to RTL_CONST_CALL_P.
        * ipa-pure-const.c (pure_const_state_e): Added looping field.
        (check_decl, check_tree, check_call, scan_function): Initialize
        looping.
        (analyze_function): Rename DECL_IS_PURE to DECL_PURE_P.
        (static_execute): Set looping true for recursive functions.
        Undo setting state to IPA_NEITHER for recursive functions.
        * cse.c (cse_insn): 
        * ifcvt.c (noce_can_store_speculate_p): Changed
        CONST_OR_PURE_CALL_P and pure_call_p to RTL_CONST_CALL_P or 
        RTL_CONST_OR_PURE_CALL_P.
        * dse.c (scan_insn): Ditto.
        * local-alloc.c (validate_equiv_mem, memref_used_between_p): Ditto.
        * gcse.c (oprs_not_seen_p) Changed CONST_OR_PURE_CALL_P to
        RTL_CONST_OR_PURE_CALL_P.
        (store_killed_in_insn): Changed CONST_OR_PURE_CALL_P and
        pure_call_p to RTL_CONST_CALL_P.
        * gimplify.c (gimplify_call_expr): Clear side effects for
        non-looping pure and constant calls.
        * calls.c (emit_call_1): Set rtl flags from ecf flags.
        (flags_from_decl_or_type): Set ecf flags from decl flags.
        (initialize_argument_information): Turn off
        ECF_LOOPING_CONST_OR_PURE when turning off ECF_CONST.
        Change const to pure if callee_copies is true rather than just
        turning off const.
        (expand_call): Turn off ECF_LOOPING_PURE_CONST_CALL and remove old
        way of marking pure calls.
        (emit_library_call_value_1): Turn off ECF_LOOPING_PURE_CONST_CALL.
        Remove hack that was supposed to fix pr7335 and remove old
        way of marking pure calls.
        * emit-rtl.c (emit_copy_of_insn_after): Copy RTL_CONST_CALL_P,
        RTL_PURE_CALL_P, RTL_LOOPING_CONST_OR_PURE_CALL_P.
        * cselib.c (cselib_process_insn): Changed CONST_OR_PURE_CALL_P to
        RTL_CONST_OR_PURE_CALL_P.
        * tree-ssa-pre.c (can_value_number_call): Fixed spacing.
        * loop-invariant.c (find_exits, find_invariant_bb): Changed
        CONST_OR_PURE_CALL_P to RTL_CONST_OR_PURE_CALL_P.
        * sched-deps.c (schedule_analyze): Ditto.
        * rtl.h (struct rtx_def): Use call field, unchanging field, and
        return_val field of calls to represent pure and const function
        info.
        (CONST_OR_PURE_CALL_P): Deleted macro.
        (RTL_CONST_CALL_P, RTL_PURE_CALL_P,
        RTL_LOOPING_CONST_OR_PURE_CALL_P, RTL_CONST_OR_PURE_P): New macros.
        * tree-inline.c (copy_body_r): Changed TREE_READONLY_DECL_P to
        TREE_READONLY.
        * tree-optimize.c (execute_fixup_cfg): Added test for
        ECF_LOOPING_CONST_OR_PURE.
        * c-common.c (handle_pure_attribute): Changed DECL_IS_PURE to
        DECL_PURE_P.
        * tree-cfg.c (update_call_expr_flags): Do not clear tree side
        effects for looping pure or const calls.
        (verify_gimple_expr): Added verification code. 
        * config/alpha/alpha.c (alpha_legitimize_address,
        alpha_emit_xfloating_libcall): Changed CONST_OR_PURE_CALL_P to
        RTL_CONST_CALL_P.
        * config/s390/s390.c (s390_emit_tls_call_insn): Ditto.
        * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Ditto.
        * config/mips/mips.c (mips_call_tls_get_addr): Ditto.
        * cfgrtl.c (need_fake_edge_p): Changed CONST_OR_PURE_CALL_P to
        RTL_CONST_OR_PURE_CALL_P.
        * dce.c (deletable_insn_p): Allow non looping, non sibling, pure
        and const calls to be deleted.

java:
2008-05-07  Kenneth Zadeck <zadeck@naturalbridge.com>

	* decl.c (java_init_decl_processing): Change DECL_IS_PURE to
	DECL_PURE_P.

cp:
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>

	 * decl.c (duplicate_decls): Merge in DECL_PURE_P, TREE_READONLY,
	 DECL_LOOPING_CONST_OR_PURE_P attributes.
	 * rtti.c (build_dynamic_cast_1): Rename DECL_IS_PURE to
	 DECL_PURE_P.

gfortran:
2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>

	 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
	 Rename DECL_IS_PURE to DECL_PURE_P.

From-SVN: r135053
2008-05-07 20:48:07 +00:00
Jan Hubicka e3b5732b21 re PR testsuite/35843 (-fdump-rtl-expand does not exist anymore)
PR testsuite/35843
	* cfgexpand.c (pass_expand): Turn into RTL pass.
	* passes.c (execute_one_pass): Do pass typechecking after execution.
	* tree-pass.h (pass_expand): Turn into RTL pass.

	* function.h (struct rtl_data): Move here fields
	accesses_prior_frames, calls_eh_return, saves_all_registers,
	has_nonlocal_goto, has_asm_statement, is_thunk,
	all_throwers_are_sibcalls, limit_stack, profile, uses_const_pool,
	uses_pic_offset_table, uses_eh_lsda, tail_call_emit,
	arg_pointer_save_area_init from struct function; turn into bool.
	(struct function): Move
	calls_eh_return, saves_all_registers, has_nonlocal_goto,
	has_asm_statement, is_thunk, all_throwers_are_sibcalls, limit_stack,
	profile, uses_const_pool, uses_pic_offset_table, uses_eh_lsda,
	tail_call_emit, arg_pointer_save_area_init
	into struct rtl_data.  Remove recursive_call_emit and gimplified flags.
	(current_function_returns_struct, current_function_returns_pcc_struct,
	current_function_calls_setjmp, current_function_calls_alloca,
	current_function_accesses_prior_frames,
	current_function_calls_eh_return, current_function_is_thunk,
	current_function_stdarg, current_function_profile,
	current_function_limit_stack, current_function_uses_pic_offset_table,
	current_function_uses_const_pool, current_function_has_nonlocal_label,
	current_function_saves_all_registers,
	current_function_has_nonlocal_goto,
	current_function_has_asm_statement): Remove accesor macros.
	* ra-conflict.c (global_conflicts): Update.
	* tree-tailcall.c (suitable_for_tail_opt_p): Update.
	(suitable_for_tail_call_opt_p): Update.
	* builtins.c (expand_builtin_return_addr): Update.
	(expand_builtin_setjmp_setup): Update.
	(expand_builtin_nonlocal_goto): Update.
	* final.c (final_start_function): Update.
	(profile_function): Update.
	(leaf_function_p): Update.
	(only_leaf_regs_used): Update.
	* df-scan.c (df_get_exit_block_use_set): Update.
	* dojump.c (clear_pending_stack_adjust): Update.
	* tree-stdarg.c (gate_optimize_stdarg): Update.
	* gimple-low.c (lower_function_body): Update.
	* global.c (compute_regsets): Update.
	(global_alloc): Update.
	* dwarf2out.c (dwarf2out_begin_prologue): Update.
	* expr.c (expand_assignment): Update.
	* dse.c (dse_step0): Update.
	(dse_step1): Update.
	* c-decl.c (store_parm_decls): Update.
	* local-alloc.c (combine_regs): Update.
	(find_free_reg): Update.
	* function.c (assign_parms_augmented_arg_list): Update.
	(assign_parm_find_data_types): Update.
	(assign_parms): Update.
	(allocate_struct_function): Update.
	(expand_function_start): Update.
	(expand_function_end): Update.
	(get_arg_pointer_save_area): Update.
	(thread_prologue_and_epilogue_insns): Update.
	(rest_of_match_asm_constraints): Update.
	* stor-layout.c (variable_size): Update.
	* gcse.c (gcse_main): Update.
	(bypass_jumps): Update.
	* gimplify.c (gimplify_function_tree): Update.
	* calls.c (emit_call_1): Update.
	(expand_call): Update.
	* bt-load.c (compute_defs_uses_and_gen): Update.
	* except.c (sjlj_assign_call_site_values): Update.
	(sjlj_emit_function_enter): Update.
	(can_throw_external): Update.
	(set_nothrow_function_flags): Update.
	(expand_builtin_unwind_init): Update.
	(expand_eh_return): Update.
	(convert_to_eh_region_ranges): Update.
	(output_function_exception_table): Update.
	* emit-rtl.c (gen_tmp_stack_mem): Update.
	* cfgexpand.c (expand_used_vars): Update.
	(tree_expand_cfg): Update.
	* cfgcleanup.c (rest_of_handle_jump): Update.
	* explow.c (allocate_dynamic_stack_space): Update.
	* varasm.c (assemble_start_function): Update.
	(force_const_mem): Update.
	(mark_constant_pool): Update.
	* tree-optimize.c (tree_rest_of_compilation): Update.
	* stack-ptr-mod.c (notice_stack_pointer_modification): Update.
	* tree-cfg.c (notice_special_calls): Update.
	(is_ctrl_altering_stmt): Update.
	(tree_can_make_abnormal_goto): Update.
	(tree_purge_dead_abnormal_call_edges): Update.
	* config/alpha/predicates.md: Update.
	* config/alpha/alpha.c (alpha_sa_mask): Update.
	(alpha_sa_size): Update.
	(alpha_does_function_need_gp): Update.
	(alpha_expand_prologue): Update.
	(alpha_start_function): Update.
	(alpha_output_function_end_prologue): Update.
	(alpha_expand_epilogue): Update.
	* config/frv/frv.c (frv_stack_info): Update.
	(frv_expand_epilogue): Update.
	* config/s390/s390.c (s390_regs_ever_clobbered): Update.
	(s390_register_info): Update.
	(s390_frame_info): Update.
	(s390_init_frame_layout): Update.
	(s390_can_eliminate): Update.
	(save_gprs): Update.
	* config/spu/spu.c (spu_split_immediate): Update.
	(need_to_save_reg): Update.
	(spu_expand_prologue): Update.
	(spu_expand_epilogue): Update.
	* config/sparc/sparc.md: Update.
	* config/sparc/sparc.c (eligible_for_return_delay): Update.
	(sparc_tls_got): Update.
	(legitimize_pic_address): Update.
	(sparc_emit_call_insn): Update.
	(sparc_expand_prologue): Update.
	(output_return): Update.
	(print_operand): Update.
	(sparc_function_ok_for_sibcall): Update.
	* config/sparc/sparc.h (EXIT_IGNORE_STACK): Update.
	* config/m32r/m32r.md: Update.
	* config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Update.
	(m32r_compute_frame_size): Update.
	(m32r_expand_prologue): Update.
	(m32r_expand_epilogue): Update.
	(m32r_legitimize_pic_address): Update.
	* config/m32r/m32r.h (FRAME_POINTER_REQUIRED): Update.
	* config/i386/linux.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
	* config/i386/i386.c (ix86_frame_pointer_required): Update.
	(gen_push): Update.
	(ix86_save_reg): Update.
	(ix86_compute_frame_layout): Update.
	(ix86_expand_prologue): Update.
	(ix86_expand_epilogue): Update.
	* config/sh/sh.c (output_stack_adjust): Update.
	(calc_live_regs): Update.
	(sh5_schedule_saves): Update.
	(sh_expand_prologue): Update.
	(sh_expand_epilogue): Update.
	(sh_setup_incoming_varargs): Update.
	(sh_allocate_initial_value): Update.
	(sh_get_pr_initial_val): Update.
	* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): Update.
	* config/sh/sh.md (label:): Update.
	* config/avr/avr.c (out_movhi_mr_r): Update.
	* config/crx/crx.h (enum): Update.
	* config/xtensa/xtensa.h (along): Update.
	* config/stormy16/stormy16.c Update.
	(xstormy16_compute_stack_layout): Update.
	* config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Update.
	(fr30_expand_prologue): Update.
	* config/cris/cris.c (cris_conditional_register_usage): Update.
	(cris_reg_saved_in_regsave_area): Update.
	(cris_initial_frame_pointer_offset): Update.
	(cris_simple_epilogue): Update.
	(cris_expand_prologue): Update.
	(cris_expand_epilogue): Update.
	(cris_expand_pic_call_address): Update.
	(cris_asm_output_symbol_ref): Update.
	(cris_asm_output_label_ref): Update.
	* config/cris/cris.md Update.
	* config/iq2000/iq2000.c (compute_frame_size): Update.
	(iq2000_expand_epilogue): Update.
	* config/mt/mt.h (save_direction): Update.
	* config/mn10300/mn10300.c (mn10300_function_value): Update.
	* config/ia64/ia64.c (ia64_compute_frame_size): Update.
	(ia64_secondary_reload_class): Update.
	* config/m68k/m68k.c (m68k_save_reg): Update.
	(m68k_expand_prologue): Update.
	(m68k_expand_epilogue): Update.
	(legitimize_pic_address): Update.
	* config/rs6000/rs6000.c (rs6000_got_register): Update.
	(first_reg_to_save): Update.
	(first_altivec_reg_to_save): Update.
	(compute_vrsave_mask): Update.
	(compute_save_world_info): Update.
	(rs6000_stack_info): Update.
	(spe_func_has_64bit_regs_p): Update.
	(rs6000_ra_ever_killed): Update.
	(rs6000_emit_eh_reg_restore): Update.
	(rs6000_emit_allocate_stack): Update.
	(rs6000_emit_prologue): Update.
	(rs6000_emit_epilogue): Update.
	(rs6000_output_function_epilogue): Update.
	(output_profile_hook): Update.
	(rs6000_elf_declare_function_name): Update.
	* config/rs6000/rs6000.h (rs6000_args): Update.
	* config/rs6000/rs6000.md: Update.
	* config/mcore/mcore.c (mcore_expand_prolog): Update.
	* config/arc/arc.c (arc_output_function_epilogue): Update.
	* config/arc/arc.h (FRAME_POINTER_REQUIRED): Update.
	* config/darwin.c (machopic_function_base_name): Update.
	* config/score/score3.c (score3_compute_frame_size): Update.
	(rpush): Update.
	(rpop): Update.
	(score3_epilogue): Update.
	* config/score/score7.c (score7_compute_frame_size): Update.
	(score7_prologue): Update.
	(score7_epilogue): Update.
	* config/score/score.h (FRAME_POINTER_REQUIRED): Update.
	* config/arm/linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
	* config/arm/arm.c (use_return_insn): Update.
	(require_pic_register): Update.
	(arm_load_pic_register): Update.
	(arm_compute_save_reg0_reg12_mask): Update.
	(arm_compute_save_reg_mask): Update.
	(thumb1_compute_save_reg_mask): Update.
	(output_return_instruction): Update.
	(arm_output_function_prologue): Update.
	(arm_output_epilogue): Update.
	(arm_get_frame_offsets): Update.
	(arm_expand_prologue): Update.
	(thumb_pushpop): Update.
	(thumb_exit): Update.
	(thumb1_expand_prologue): Update.
	(thumb1_expand_epilogue): Update.
	(arm_unwind_emit): Update.
	(arm_output_fn_unwind): Update.
	* config/arm/arm.h (FRAME_POINTER_REQUIRED): Update.
	* config/arm/arm.md: Update.
	* config/pa/pa.md: Update.
	* config/pa/pa.c (legitimize_pic_address): Update.
	(compute_frame_size): Update.
	(hppa_expand_prologue): Update.
	(hppa_expand_epilogue): Update.
	(borx_reg_operand): Update.
	* config/pa/pa.h (FRAME_POINTER_REQUIRED): Update.
	(HARD_REGNO_RENAME_OK): Update.
	* config/mips/mips.c (mips_global_pointer): Update.
	(mips_save_reg_p): Update.
	(mips_compute_frame_info): Update.
	(mips_frame_pointer_required): Update.
	(mips_expand_prologue): Update.
	(mips_expand_epilogue): Update.
	(mips_can_use_return_insn): Update.
	(mips_reorg_process_insns): Update.
	* config/v850/v850.c (compute_register_save_size): Update.
	* config/mmix/mmix.h (FRAME_POINTER_REQUIRED): Update.
	* config/mmix/mmix.c (along): Update.
	(mmix_expand_epilogue): Update.
	* config/bfin/bfin.c (legitimize_pic_address): Update.
	(must_save_p): Update.
	(stack_frame_needed_p): Update.
	(add_to_reg): Update.
	(bfin_expand_prologue): Update.
	* stmt.c (expand_asm_operands): Update.
	* reload1.c (reload): Update.
	(init_elim_table): Update.

From-SVN: r134682
2008-04-25 23:14:40 +00:00
Jan Hubicka cb91fab00f except.c (dw2_size_of_call_site_table, [...]): Use vector API for call_site_record.
* except.c (dw2_size_of_call_site_table,
	sjlj_size_of_call_site_table): Use vector API for call_site_record.

	* cgraphbuild.c (build_cgraph_edges): Update.
	* tree-pass.h: Update comment.
	* final.c (leaf_function_p): Update.
	(leaf_renumber_regs): Update.
	(rest_of_clean_state): Update.
	* omp-low.c (expand_omp_parallel): Update.
	* ipa-reference.c (analyze_function): Update.
	* reorg.c (find_end_label): Update.
	(optimize_skip): Update.
	(fill_simple_delay_slots): Update.
	(fill_simple_delay_slots): Update.
	(make_return_insns): Update.
	(dbr_schedule): Update.
	* gimple-low.c (record_vars_into): Update.
	* cfgbuild.c (make_edges): Update.
	* function.c (assign_stack_local): Update.
	(assign_parm_adjust_stack_rtl): Update.
	(locate_and_pad_parm): Update.
	(allocate_struct_function): Do not initialize stack_alignment_needed
	and preferred_stack_boundary here.
	(stack_protect_prologue): Update.
	(stack_protect_epilogue): Update.
	(expand_function_start): Initialize stack_alignment_needed,
	preferred_stack_boundary and max_jumptable_ents.
	(expand_function_end): Update.
	(free_after_compilation): Do not NULLify epilogue_delay_list.
	* function.h (struct rtl_data): Add stack_protect_guard,
	stack_alignment_needed,
	preferred_stack_boundary, epilogue_delay_list.
	(struct function): Remove value_histograms, stack_alignment_needed,
	preferred_stack_boundary, epilogue_delay_list, max_jumptable_ents,
	last_label_uid,
	unexpanded_var_list, stack_protect_guard.
	(current_function_epilogue_delay_list): Remove.
	* ipa-type-escape.c (analyze_function): Update.
	* gimplify.c (pop_gimplify_context): Update comment.
	* calls.c (expand_call): Update.
	(emit_library_call_value_1): Update.
	* except.c (set_nothrow_function_flags): Update.
	* cfgexpand.c (get_decl_align_unit): Update.
	(create_stack_guard): Update.
	(estimated_stack_frame_size): Update.
	(expand_used_vars): Update.
	(tree_expand_cfg): Free histogram earliers, init expansion variables.
	* explow.c (allocate_dynamic_stack_space): Update.
	* tree-ssa-live.c (remove_unused_locals): Update.
	* varasm.c (mark_constant_pool): Update.
	* tree-inline.c (remap_decls): Update.
	(initialize_cfun): Update.
	(declare_return_variable): Update.
	(inline_forbidden_p): Update.
	(expand_call_inline): Update.
	(declare_inline_vars): Update.
	(tree_function_versioning): Update.
	* tree-flow.h (value_histograms): New.
	(VALUE_HISTOGRAMS): New macro.
	* basic-block.h (control_flow_graph): Add max_jumptable_ents,
	last_label_uid.
	* tree-cfg.c (set_bb_for_stmt): Update.
	(replace_by_duplicate_decl): Update.
	(move_block_to_fn): Update.
	(new_label_mapper): Update.
	(dump_function_to_file): Update.
	* ipa-struct-reorg.c (build_data_structure): Update.
	* cfgrtl.c (print_rtl_with_bb): Update.
	* reload1.c (reload): Update.
	(reload): Update.
	* config/i386/i386.c (setup_incoming_varargs_64,
	ix86_compute_frame_layout): Update.
	* config/arc/arc.c (arc_output_function_epilogue): Update.

From-SVN: r134425
2008-04-18 05:26:12 +00:00
Jan Hubicka 69c32ec801 gengtype.c (write_root): Param_is argument is OK.
* gengtype.c (write_root): Param_is argument is OK.
	* expr.c (expand_expr_real_1): Update call of get_exception_*.
	* function.h: Include varray.h
	(rtl_eh): New stucture based on except.c one.
	(call_site_record): New forward declaration and vector type.
	* calls.c (emit_call_1): Do not call
	note_current_region_may_contain_throw.
	* except.c (eh_status): Remove cur_region, try_region since they are
	unused.
	Move filter, exc_ptr, ttype_data, ehspec_data, action_record_data and
	exception_handler_label_map, ehr_stackadj, ehr_handler, ehr_label,
	sjlj_fc, sjlj_exit_after to rth_eh in function.h. 
	Remove call_site_data_used, call_site_data_size.
	Turn call_site_record into vector in function.h.
	(note_current_region_may_contain_throw): Remove.
	(get_exception_pointer, get_exception_filter): Do not take struct
	function argument; update.
	(add_ehl_entry, find_exception_handler_labels, ehspec_filter_hash,
	add_ttypes_entry, add_ehspec_entry, assign_filter_values,
	build_post_landing_pads, dw2_build_landing_pads,
	sjlj_assign_call_site_values, sjlj_mark_call_sites,
	sjlj_emit_function_enter, sjlj_emit_function_enter, 
	sjlj_emit_function_exit, sjlj_emit_dispatch_table,
	sjlj_build_landing_pads, finish_eh_generation,
	remove_exception_handler_label, remove_eh_handler,
	maybe_remove_eh_handler, add_reachable_handler,
	reachable_handlers, expand_builtin_eh_return,
	expand_eh_return, add_action_record, collect_one_action_chain,
	add_call_site, convert_to_eh_region_ranges, sjlj_size_of_call_site_table,
	sjlj_output_call_site_table, output_function_exception_table,
	* except.h (note_current_region_may_contain_throw): Remove
	(get_exception_pointer, get_exception_filter): Do not take struct
	function argument.
	* Makefile.in (GTFILES): Put varargs before struct function.

From-SVN: r134328
2008-04-15 19:37:22 +00:00
Jan Hubicka 38173d38cc function.h (incomming_args): Break out of struct function.
* function.h (incomming_args): Break out of struct function.
	(function_subsections): Break out of struct function.
	(rtl_data): Add args, subsections fields. Break out outgoing_args_size,
	return_rtx and hard_reg_initial_vals from struct function.
	Kill inl_max_label_num.
	(current_function_pops_args, current_function_args_info,
	current_function_args_size, current_function_args_size,
	current_function_pretend_args_size,
	current_function_outgoing_args_size,
	current_function_internal_arg_pointer, current_function_return_rtx):
	Kill compatibility accestor macros.
	* builtins.c (expand_builtin_apply_args_1): Update.
	(expand_builtin_next_arg): Update.
	* df-scan.c (df_get_call_refs): Update.
	* dbxout.c (dbxout_function_end): Update.
	* dwarf2out.c (dwarf2out_switch_text_section): Update.
	(output_line_info): Update.
	(secname_for_decl): Update.
	(dwarf2out_var_location): Update.
	* function.c (free_after_compilation): Update.
	(assign_parm_find_stack_rtl): Update.
	(assign_parms): Update.
	(expand_dummy_function_end): Update.
	(expand_function_end): Update.
	* calls.c (mem_overlaps_already_clobbered_arg_p): Update.
	(expand_call): Update.
	(emit_library_call_value_1): Update.
	(store_one_arg): Update.
	* varasm.c (initialize_cold_section_name): Update.
	(unlikely_text_section): Update.
	(unlikely_text_section_p): Update.
	(assemble_start_function): Update.
	(assemble_end_function): Update.
	(default_section_type_flags): Update.
	(switch_to_section): Update.
	* integrate.c (set_decl_abstract_flags): Update.
	(get_hard_reg_initial_val): Update.
	(has_hard_reg_initial_val): Update.
	(allocate_initial_values): Update.
	* resource.c (init_resource_info): Update.
	* config/alpha/alpha.c (NUM_ARGS): Update.
	(direct_return): Update.
	(alpha_va_start): Update.
	(alpha_sa_size): Update.
	(alpha_initial_elimination_offset): Update.
	(alpha_expand_prologue): Update.
	(alpha_start_function): Update.
	(alpha_expand_epilogue): Update.
	(unicosmk_initial_elimination_offset):
	* config/alpha/alpha.md (call expander): Update.
	* config/s390/s390.c (s390_register_info): Update.
	(s390_register_info): Update.
	(s390_frame_info): Update.
	(s390_initial_elimination_offset): Update.
	(s390_build_builtin_va_list): Update.
	(s390_va_start): Update.
	* config/spu/spu.c (direct_return): Update.
	(spu_expand_prologue): Update.
	(spu_initial_elimination_offset): Update.
	(spu_build_builtin_va_list): Update.
	(spu_va_start): Update.
	* config/sparc/sparc.c (sparc_init_modes): Update.
	(sparc_compute_frame_size): Update.
	(function_value): Update.
	* config/m32r/m32r.c (m32r_compute_frame_size): Update.
	* config/i386/i386.md (return expander): Update.
	* config/i386/i386.c (ix86_va_start): Update.
	(ix86_can_use_return_insn_p): Update.
	(ix86_compute_frame_layout): Update.
	(ix86_expand_epilogue): Update.
	* config/sh/sh.c (output_stack_adjust): Update.
	(calc_live_regs): Update.
	(sh_expand_prologue): Update.
	(sh_builtin_saveregs): Update.
	(sh_va_start): Update.
	(initial_elimination_offset): Update.
	(sh_allocate_initial_value): Update.
	(sh_function_ok_for_sibcall): Update.
	(sh_get_pr_initial_val): Update.
	* config/sh/sh.md (return expander): Update.
	* config/avr/avr.c (frame_pointer_required_p): UPdate.
	* config/crx/crx.c (crx_compute_frame): UPdate.
	(crx_initial_elimination_offset): UPdate.
	* config/xtensa/xtensa.c (compute_frame_size): Update
	(xtensa_builtin_saveregs): Update.
	(xtensa_va_start): Update.
	(order_regs_for_local_alloc): Update.
	* config/stormy16/stormy16.c (xstormy16_compute_stack_layout): Update.
	(xstormy16_expand_builtin_va_start): Update.
	* config/fr30/fr30.c (fr30_compute_frame_size): Update.
	* config/m68hc11/m68hc11.md (return expanders): Update.
	* config/m68hc11/m68hc11.c (expand_prologue): Update.
	(expand_epilogue): Update.
	* config/cris/cris.c (cris_initial_frame_pointer_offset): Update.
	(cris_simple_epilogue): Update.
	(cris_expand_prologue): Update.
	(cris_expand_epilogue): Update.
	* config/iq2000/iq2000.c (iq2000_va_start): Update.
	(compute_frame_size): Update.
	* config/mt/mt.c (mt_compute_frame_size): Update.
	* config/mn10300/mn10300.c (expand_prologue): Update.
	(expand_epilogue): Update.
	(initial_offset): Update.
	(mn10300_builtin_saveregs):
	* config/mn10300/mn10300.md (return expander): Update.
	* config/ia64/ia64.c (ia64_compute_frame_size): Update.
	(ia64_initial_elimination_offset): Update.
	(ia64_initial_elimination_offset): Update.
	(ia64_expand_prologue): Update.
	* config/m68k/m68k.md (return expander): Update.
	* config/rs6000/rs6000.c (rs6000_va_start): Update.
	(rs6000_stack_info): Update.
	* config/mcore/mcore.c (layout_mcore_frame): Update.
	(mcore_expand_prolog): Update.
	* config/arc/arc.c (arc_compute_frame_size): Update.
	* config/score/score3.c (score3_compute_frame_size): Update.
	* config/score/score7.c (score7_compute_frame_size): Update.
	* config/arm/arm.c (use_return_insn): Update.
	(thumb_find_work_register): Update.
	(arm_compute_save_reg_mask): Update.
	(arm_output_function_prologue): Update.
	(arm_output_epilogue): Update.
	(arm_size_return_regs): Update.
	(arm_get_frame_offsets): Update.
	(arm_expand_prologue): Update.
	(thumb_exit): Update.
	(thumb_unexpanded_epilogue): Update.
	(thumb1_output_function_prologue): Update.
	* config/pa/pa.md (return expander): Update.
	* config/pa/pa.c (compute_frame_size): Update.
	(hppa_builtin_saveregs): Update.
	* config/mips/mips.c (mips_va_start): Update.
	(mips16_build_function_stub): Update.
	(mips_compute_frame_info): Update.
	(mips_restore_gp): Update.
	(mips_output_function_prologue): Update.
	(mips_expand_prologue): Update.
	* config/v850/v850.c (compute_frame_size): Update.
	(expand_prologue): * config/mmix/mmix.c (along): update.
	(mmix_initial_elimination_offset): update.
	(mmix_reorg): update.
	(mmix_use_simple_return): update.
	(mmix_expand_prologue): update.
	(mmix_expand_epilogue): Update.
	* config/bfin/bfin.c (bfin_initial_elimination_offset): Update.
	(emit_link_insn): Update.

From-SVN: r134087
2008-04-08 08:59:34 +00:00
Eric Botcazou 9dd9bf80a8 Removal of Return with Depressed Stack Pointer support
Removal of Return with Depressed Stack Pointer support
	* tree.h (TYPE_RETURNS_STACK_DEPRESSED): Delete.
	(ECF_SP_DEPRESSED): Likewise.
	(ECF_LIBCALL_BLOCK, ECF_NOVOPS): Adjust.
	* calls.c (emit_call_1): Do not test ECF_SP_DEPRESSED.
	(flags_from_decl_or_type): Do not test TYPE_RETURNS_STACK_DEPRESSED.
	(expand_call): Do not test ECF_SP_DEPRESSED.
	* dse.c (dse_step0): Do not test TYPE_RETURNS_STACK_DEPRESSED.
	* function.c (keep_stack_depressed): Delete.
	(handle_epilogue_set): Likewise.
	(update_epilogue_consts): Likewise.
	(emit_equiv_load): Likewise.
	(thread_prologue_and_epilogue_insns): Remove support for Return with
	Depressed Stack Pointer.
	* print-tree.c (print_node): Do not test TYPE_RETURNS_STACK_DEPRESSED.

ada/
	* gigi.h (create_subprog_type): Remove returns_with_dsp parameter.
	* decl.c (gnat_to_gnu_entity): Adjust for above new prototype.
	* utils.c (create_subprog_type): Remove returns_with_dsp parameter.
	* trans.c (gnat_to_gnu) <N_Return_Statement>: Remove code dealing with
	Return by Depressed Stack Pointer.

From-SVN: r133976
2008-04-07 09:37:51 +00:00
Michael Matz 05e6ee933e re PR middle-end/35616 (Incorrect code while O2 compling)
PR middle-end/35616
        * calls.c (expand_call): Check overlap of arguments with call
        address for sibcalls.

        * gcc.dg/pr35616.c: New test.

From-SVN: r133348
2008-03-19 19:15:03 +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
Richard Sandiford 3fb300196d calls.c (avoid_likely_spilled_reg): New function.
gcc/
	* calls.c (avoid_likely_spilled_reg): New function.
	(expand_call): Use it.

From-SVN: r127360
2007-08-11 16:51:07 +00:00
Kaveh R. Ghazi fa233e34c9 attribs.c (hash_attr, [...]): Constify.
* attribs.c (hash_attr, eq_attr, init_attributes): Constify.
	* builtins.c (validate_arg, builtin_mathfn_code,
	validate_arglist): Likewise.
	* calls.c (call_expr_flags): Likewise.
	* combine.c (reg_nonzero_bits_for_combine,
	reg_num_sign_bit_copies_for_combine, get_last_value,
	reg_truncated_to_mode): Likewise.
	* emit-rtl.c (subreg_lowpart_p): Likewise.
	* expr.c (highest_pow2_factor_for_target,
	categorize_ctor_elements_1, categorize_ctor_elements,
	count_type_elements, contains_packed_reference,
	highest_pow2_factor, highest_pow2_factor_for_target): Likewise.
	* fold-const.c (may_negate_without_overflow_p, int_const_binop,
	fold_convertible_p, operand_equal_p, tree_swap_operands_p,
	native_encode_int, native_encode_real, native_encode_complex,
	native_encode_vector, native_encode_expr, native_interpret_int,
	native_interpret_real, native_interpret_complex,
	native_interpret_vector, native_interpret_expr): Likewise.
	* function.c (use_register_for_decl): Likewise.
	* gimplify.c (get_name): Likewise.
	* langhooks-def.h (lhd_return_null_const_tree): New.
	(LANG_HOOKS_GET_CALLEE_FNDECL): Use it.
	* langhooks.c (lhd_return_null_const_tree): New.
	* langhooks.h (lang_get_callee_fndecl): Constify.
	* output.h (constructor_static_from_elts_p): Likewise.
	* rtl-factoring.c (gen_symbol_ref_rtx_for_label): Likewise.
	* rtl.h (nonzero_bits, num_sign_bit_copies, truncated_to_mode,
	subreg_lowpart_p, noop_move_p, struct rtl_hooks): Likewise.
	* rtlanal.c (cached_nonzero_bits, nonzero_bits1,
	cached_num_sign_bit_copies, num_sign_bit_copies1, noop_move_p,
	nonzero_bits, num_sign_bit_copies, truncated_to_mode): Likewise.
	* rtlhooks-def.h (reg_nonzero_bits_general,
	reg_num_sign_bit_copies_general, reg_truncated_to_mode_general):
	Likewise. 
	* rtlhooks.c (reg_num_sign_bit_copies_general,
	reg_nonzero_bits_general, reg_truncated_to_mode_general):
	Likewise. 
	* stmt.c (warn_if_unused_value, is_body_block): Likewise.
	* stor-layout.c (mode_for_size_tree): Likewise.
	* tree-ssa-loop-im.c (memref_eq): Likewise.
	* tree-ssa-loop-ivopts.c (tree_int_cst_sign_bit): Likewise.
	* tree.c (contains_placeholder_p, type_list_equal,
	simple_cst_equal, get_callee_fndecl, operand_equal_for_phi_arg_p):
	Likewise. 
	* tree.h (tree_int_cst_sign_bit, may_negate_without_overflow_p,
	mode_for_size_tree, categorize_ctor_elements, count_type_elements,
	contains_placeholder_p, contains_packed_reference,
	get_callee_fndecl, operand_equal_for_phi_arg_p,
	warn_if_unused_value, is_body_block, native_encode_expr,
	native_interpret_expr, fold_convertible_p, operand_equal_p,
	int_const_binop, tree_swap_operands_p, builtin_mathfn_code,
	validate_arglist, simple_cst_equal, type_list_equal,
	use_register_for_decl, call_expr_flags, get_name,
	highest_pow2_factor): Likewise.
	(const_call_expr_arg_iterator_d,
	init_const_call_expr_arg_iterator, next_const_call_expr_arg,
	first_const_call_expr_arg, more_const_call_expr_args_p,
	FOR_EACH_CONST_CALL_EXPR_ARG): New.
	* varasm.c (constructor_static_from_elts_p): Constify.
	
cp:
	* parser.c (eof_token): Un-constify.
	(cp_lexer_new_main, cp_lexer_new_from_tokens, VEC_alloc,
	cp_lexer_consume_token, cp_lexer_purge_token): Remove spurious
	casts.

java:
	* lang.c (java_get_callee_fndecl): Constify.

objc:
	* objc-act.c (objc_get_callee_fndecl): Constify.
	* objc-act.h (objc_get_callee_fndecl): Likewise.

From-SVN: r127036
2007-07-29 05:43:43 +00:00
Kaveh R. Ghazi 6ea2b70d9c calls.c (special_function_p, [...]): Constify.
* calls.c (special_function_p, setjmp_call_p, alloca_call_p,
	flags_from_decl_or_type): Constify.
	* gcc.c (do_spec_1): Likewise.
	* print-tree.c (dump_addr, print_node_brief): Likewise.
	* tree-cfg.c (stmt_starts_bb_p, is_ctrl_stmt, computed_goto_p,
	simple_goto_p, tree_can_make_abnormal_goto, stmt_starts_bb_p,
	tree_purge_all_dead_eh_edges): Likewise.
	* tree-flow.h (is_ctrl_stmt, computed_goto_p, simple_goto_p,
	tree_can_make_abnormal_goto, tree_purge_all_dead_eh_edges):
	Likewise. 
	* tree.c (expr_location, expr_has_location, expr_locus,
	expr_filename, expr_lineno, get_inner_array_type,
	fields_compatible_p): Likewise.
	* tree.h (get_inner_array_type, fields_compatible_p,
	expr_location, expr_has_location, expr_locus, expr_filename,
	expr_lineno, dump_addr, print_node_brief, flags_from_decl_or_type,
	setjmp_call_p, alloca_call_p): Likewise.

From-SVN: r127017
2007-07-28 14:51:40 +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
Josh Conner d6c2c77c91 re PR middle-end/32602 (Sibcall optimization fails to detect overlap)
2007-07-06  Josh Conner  <jconner@apple.com>

	PR middle-end/32602
	PR middle-end/32603
	* calls.c (store_one_arg): Handle arguments which are partially
	on the stack when detecting argument overlap.

2007-07-06  Josh Conner  <jconner@apple.com>

	PR middle-end/32602
	* gcc.dg/sibcall-8.c: New test.

2007-07-06  Josh Conner  <jconner@apple.com>

	PR middle-end/32603
	* gcc.target/arm/sibcall-1.c: New test.

From-SVN: r126422
2007-07-06 16:57:19 +00:00
Manuel López-Ibáñez ad960f56f2 re PR c/4076 (-Wunused doesn't warn about static function only called by itself.)
2007-06-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR c/4076
	* c-typeck.c (build_external_ref): Don't mark as used if called
	from itself.
	* calls.c (rtx_for_function_call): Likewise.

testsuite/
	* gcc.dg/Wunused-function.c: New.

From-SVN: r126144
2007-06-30 12:56:43 +00:00
Jakub Jelinek 6a4e56a90e re PR middle-end/32285 (Miscompilation with pure _Complex returning call inside another fn's argument list)
PR middle-end/32285
	* calls.c (precompute_arguments): Also precompute CALL_EXPR arguments
	if ACCUMULATE_OUTGOING_ARGS.

	* gcc.c-torture/execute/20070614-1.c: New test.

From-SVN: r125873
2007-06-20 08:35:55 +02:00
Daniel Berlin 6fb5fa3cbc Merge dataflow branch into mainline
From-SVN: r125624
2007-06-11 18:02:15 +00:00
Zdenek Dvorak 79f5e44262 tree-data-ref.c (dr_analyze_alias): Handle case smt is NULL.
* tree-data-ref.c (dr_analyze_alias): Handle case smt is NULL.
	* tree-predcom.c (mark_virtual_ops_for_renaming): Exported.
	* tree-ssa-loop-prefetch.c: Include optabs.h.
	(FENCE_FOLLOWING_MOVNT): New macro.
	(struct mem_ref): Add independent_p and storent_p fields.
	(record_ref): Initalize the new fields.
	(gather_memory_references_ref): Return true if the reference
	could be analysed.
	(gather_memory_references): Check whether all memory accesses
	in loop were recorded.
	(should_issue_prefetch_p): Return false for nontemporal stores.
	(nontemporal_store_p, mark_nontemporal_store, emit_mfence_after_loop,
	may_use_storent_in_loop_p, mark_nontemporal_stores): New functions.
	(determine_loop_nest_reuse): Detect independent memory references.
	(loop_prefetch_arrays): Call mark_nontemporal_stores.
	* tree-flow.h (mark_virtual_ops_for_renaming): Declare.
	* Makefile.in (tree-ssa-loop-prefetch.o): Add OPTABS_H dependency.
	* config/i386/i386.h (x86_mfence): Declare.
	(FENCE_FOLLOWING_MOVNT): Return x86_mfence.
	* config/i386/i386.c (x86_mfence): New variable.
	(ix86_init_mmx_sse_builtins): Initialize x86_mfence.

	* tree-pretty-print.c (dump_generic_node): Mark nontemporal stores.
	* optabs.c (init_optabs): Initialize storent_optab.
	* optabs.h (enum optab_index): Add OTI_storent.
	(storent_optab): Declare.
	* genopinit.c (optabs): Add initialization for storent_optab.
	* tree.h (MOVE_NONTEMPORAL): New macro.
	* expr.c (expand_assignment, store_expr, store_constructor_field,
	store_constructor, store_field, expand_expr_real_1): Propagate
	nontemporality of the expanded store.
	(emit_storent_insn): New function.
	* expr.h (expand_assignment, store_expr): Declaration changed.
	* function.c (assign_parm_setup_reg): Pass false as nontemporality
	to expand_assignment.
	* stmt.c (expand_asm_expr): Ditto.
	* calls.c (initialize_argument_information): Pass false as
	nontemporality to store_expr.
	* config/i386/sse.md (storentv4sf, storentv2df, storentv2di,
	storentsi): New.

	* gcc.dg/tree-ssa/prefetch-7.c: New test.

From-SVN: r125604
2007-06-10 20:39:22 +00:00
Jan Hubicka a38e7aa544 gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER...
* gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	* ddg.c (create_ddg): LIkewise.
	* final.c (final): Remove hunk moving line numbernotes around since
	they are no longer present at this stage.
	(final_scan_insn): Use NOTE_KIND instead of
	NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(output_asm_label): Likewise.
	* reorg.c (dbr_schedule): Likewise.
	* haifa-sched.c (unlink_other_notes): Likewise.
	* mode-switching.c (optimize_mode_switching): Likewise.
	* graph.c (start_bb): Likewise.
	* rtl.def (NOTE): Update description.
	* jump.c (squeeze_notes): Delete.
	(mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use
	NOTE_INSN_BASIC_BLOCK_P when possible.
	* ifcvt.c (dead_or_predicable): Remove call of squeeze_notes.
	* dwarf2out.c (gen_label_die): Use NOTE_KIND instead of
        NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible.
	(dwarf2out_var_location): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(find_basic_blocks_1): Likewise.
	* function.c (reorder_blocks_1): Likewise.
	(epilogue_done): Likewise.
	(reposition_prologue_and_epilogue_notes): Likewise.
	* print-rtl.c (print_rtx): Likewise; drop code for printing line number
	notes.
	(print_rtl): Likewise.
	(print_rtl_single): Likewise.
	* gcse.c (insert_insn_start_bb): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	* calls.c (fixup_tail_calls): Likewise.
	* except.c (sjlj_emit_function_enter): Likewise.
	* emit-rtl.c (add_insn_after): Likeiwse.
	(emit_label_before): Likewise.
	(emit_label_after): Likewise.
	(emit_note_before, emit_note_after, emit_note): Update
	parameter to be enum insn_note; do not deal with source
	files.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps):
	Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P
	when possible.
	(merge_blocks_move_successor_nojumps): Simplify now when
	we don't have BLOCK notes.
	(try_optimize_cfg): Likewise.
	* cfglayout.c (skip_insns_after_block): Likewise.
	(record_effective_endpoints): Likewise.
	(duplicate_insn_chain): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.
	* sched-deps.c (sched_analyze): Likewise.
	* rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS):
	Exterminate.
	(note_insn_name): Simplify now when NOTE_INSN_BIAS is gone.
	* rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate.
	(SET_INSN_DELETED): Simplify.
	(NOTE_LINE_NUMBER): Exterminate.
	(NOTE_LINE_KIND): New.
	(NOTE_INSN_BASIC_BLOCK_P): Update.
	(enum insn_note): Simplify.
	(GET_NOTE_INSN_NAME) Simplify.
	(emit_note_before, emit_note_after, emit_note): Update prototype.
	(squeeze_notes): Remove.
	* sched-int.h (NOTE_NOT_BB_P): Update.
	* resource.c (mark_target_live_regs): Update.
	* sched-rgn.c (debug_dependencies): Update.
	* sched-vis.c (print_insn): Update.
	* config/alpha/alpha.c (alpha_handle_trap_shadows): Update.
	* config/i386/i386.c (ix86_output_function_epilogue): Update.
	* config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0.
	(TARGET_ADJUST_UNROLL_MAX): Likewise.
	(split_branches): Update.
	(sh_optimize_target_register_callee_saved): Remove hunk dead since gcc
	4.0.0.
	(sh_adjust_unroll_max): Exterminate.
	* config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED.
	* config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise.
	(m68hc11_reorg): Likewise.
	* config/ia64/ia64.c (emit_insn_group_barriers): Update.
	(emit_predicate_relation_info): Update.
	(process_for_unwind_directive): Update.
	* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update.
	(output_call): Update.
	* config/pa/pa.c (output_lbranch): Update.
	(output_millicode_call): Update.
	(output_call): Update.
	(pa_combine_instructions): Update.
	* config/mips/mips.c (mips16_gp_pseudo_reg): Update.
	* config/bfin/bfin.c (gen_one_bundle): Update.
	* cfgrtl.c (can_delete_note_p): Update.
	(delete_insn): Update.
	(rtl_merge_blocks): Update.
	(commit_one_edge_insertion): Update.
	(rtl_verify_flow_info): Update.
	* stmt.c (expand_case): Do not call squeeze_notes.

From-SVN: r124895
2007-05-21 06:19:50 +00:00
Kai Tietz ac294f0bbc defaults.h (OUTGOING_REG_PARM_STACK_SPACE): Provide default.
* defaults.h (OUTGOING_REG_PARM_STACK_SPACE): Provide default.
        * calls.c (compute_argument_block_size, expand_call,
        emit_library_call_value_1): Don't ifdef OUTGOING_REG_PARM_STACK_SPACE.
        * expr.c (block_move_libcall_safe_for_call_parm): Likewise.
        * function.c (STACK_DYNAMIC_OFFSET): Likewise.
        * doc/tm.texi (OUTGOING_REG_PARM_STACK_SPACE): Update.
        * config/alpha/unicosmk.h, config/bfin/bfin.h, config/iq2000/iq2000.h,
        config/mips/mips.h, config/mn10300/mn10300.h, config/mt/mt.h,
        config/pa/pa.h, config/rs6000/rs6000.h, config/score/score.h,
        config/spu/spu.h, config/v850/v850.h (OUTGOING_REG_PARM_STACK_SPACE):
        Set to 1.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r123135
2007-03-22 14:33:45 -07:00
Bernd Schmidt 3b1bf459a3 calls.c (emit_library_call_value_1): Handle partial registers correctly when building up CALL_INSN_FUNCTION_USAGE.
* calls.c (emit_library_call_value_1): Handle partial registers
	correctly when building up CALL_INSN_FUNCTION_USAGE.

From-SVN: r122396
2007-02-28 00:37:09 +00:00
Sandra Loosemore 078a18a423 calls.c (initialize_argument_information): Pass original EXP and STRUCT_VALUE_ADDR_VALUE instead of a list of arguments.
2007-02-18  Sandra Loosemore  <sandra@codesourcery.com>

	* calls.c (initialize_argument_information): Pass original EXP
	and STRUCT_VALUE_ADDR_VALUE instead of a list of arguments.  Move
	code to split complex arguments here, as part of initializing the
	ARGS array.
	(expand_call): Remove code that builds a list of arguments and
	inserts implicit arguments into it.  Instead, just count how many
	implicit arguments there will be so we can determine the size of
	the ARGS array, and let initialize_argument_information do the work.
	(split_complex_values): Delete unused function.

From-SVN: r122101
2007-02-18 14:34:28 -05:00
Eric Botcazou ae22dcff00 calls.c (mem_overlaps_already_clobbered_arg_p): Return true for arg pointer based indexed addressing.
* calls.c (mem_overlaps_already_clobbered_arg_p): Return true
	for arg pointer based indexed addressing.

From-SVN: r122095
2007-02-18 13:52:46 +00:00
Sandra Loosemore 5039610b96 tree.h (enum tree_code_class): Add tcc_vl_exp.
2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* tree.h (enum tree_code_class): Add tcc_vl_exp.
	(VL_EXP_CLASS_P): New.
	(TREE_OPERAND_CHECK): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(TREE_OPERAND_CHECK_CODE): Likewise.
	(GIMPLE_STMT_OPERAND_CHECK): Likewise.
	(TREE_RTL_OPERAND_CHECK): Likewise.
	(tree_operand_check_failed): Make second parameter the whole tree
	instead of its code.  Fixed callers.
	(VL_EXP_CHECK): New.
	(TREE_OPERAND_LENGTH): New.
	(VL_EXP_OPERAND_LENGTH): New.
	(CALL_EXPR_FN): New.
	(CALL_EXPR_STATIC_CHAIN): New.
	(CALL_EXPR_ARGS): New.
	(CALL_EXPR_ARG): New.
	(call_expr_nargs): New.
	(CALL_EXPR_ARGP): New.
	(build_nt_call_list): Declare.
	(build_vl_exp_stat): Declare.
	(build_vl_exp): New.
	(build_call_list): Declare.
	(build_call_nary): Declare.
	(build_call_valist): Declare.
	(build_call_array): Declare.
	(call_expr_arg): Declare.
	(call_expr_argp): Declare.
	(call_expr_arglist): Declare.
	(fold_build_call_list): Declare.
	(fold_build_call_list_initializer): Declare.
	(fold_call_expr): Declare to replace fold_builtin.
	(fold_builtin_fputs): Update to agree with modified definition.
	(fold_builtin_strcpy): Likewise.
	(fold_builtin_strncpy): Likewise.
	(fold_builtin_memory_chk): Likewise.
	(fold_builtin_stxcpy_chk): Likewise.
	(fold_builtin_strncpy_chk): Likewise.
	(fold_builtin_next_arg): Likewise.
	(fold_build_call_expr): Declare.
	(fold_builtin_call_list): Declare.
	(fold_builtin_call_valist): Declare.
	(build_call_expr): Declare.
	(validate_arglist): Update to agree with modified definition.
	(tree_operand_length): New.
	(call_expr_arg_iterator): New.
	(init_call_expr_arg_iterator): New.
	(next_call_expr_arg): New.
	(first_call_expr_arg): New.
	(more_call_expr_args_p): New.
	(FOR_EACH_CALL_EXPR_ARG): New.

	* tree.c (tree_code_class_string): Add entries for tcc_vl_exp
	and tcc_gimple_stmt.
	(tree_code_size): Update documentation.  Use sizeof (tree) rather
	than sizeof (char *).
	(tree_size): Likewise.  Add case for tcc_vl_exp.
	(tree_node_structure): Add case for tcc_vl_exp.
	(contains_placeholder_p): Likewise.
	(substitute_in_expr): Likewise.
	(substitute_placeholder_in_expr): Likewise.
	(stabilize_reference_1): Likewise.
	(build3_stat): Remove logic for CALL_EXPRs.  Replace with assertion
	to diagnose breakage of this interface for constructing CALL_EXPRs.
	(build_nt): Add similar assertion here.
	(build_nt_call_list): New.
	(simple_cst_equal) <CALL_EXPR>: Rewrite to use new accessors.
	(iterative_hash_expr): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(get_callee_fndecl): Use new CALL_EXPR accessors.
	(tree_operand_check_failed): Change parameters to pass entire node
	instead of its code, so that we can call TREE_OPERAND_LENGTH on it.
	(process_call_operands): New.
	(build_vl_exp_stat): New.
	(build_call_list): New.
	(build_call_nary): New.
	(build_call_valist): New.
	(build_call_array): New.
	(walk_tree): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(call_expr_arglist): New.

	* tree.def (CALL_EXPR): Change representation of CALL_EXPRs to use
	tcc_vl_exp instead of a fixed-size tcc_expression.

	* doc/c-tree.texi (CALL_EXPR): Document new representation and
	accessors for CALL_EXPRs.
	(AGGR_INIT_EXPR): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* builtins.c (c_strlen): Return NULL_TREE instead of 0.
	(expand_builtin_nonlocal_goto): Change parameter to be entire
	CALL_EXPR instead of an arglist.  Use new CALL_EXPR accessors.
	(expand_builtin_prefetch): Likewise.
	(expand_builtin_classify_type): Likewise.
	(mathfn_built_in): Return NULL_TREE instead of 0.
	(expand_errno_check): Use new CALL_EXPR accessors.
	(expand_builtin_mathfn): Use new CALL_EXPR accessors and constructors.
	Return NULL_RTX instead of 0.
	(expand_builtin_mathfn_2): Likewise.
	(expand_builtin_mathfn_3): Likewise.
	(expand_builtin_interclass_mathfn): Likewise.
	(expand_builtin_sincos): Likewise.
	(expand_builtin_cexpi): Likewise.
	(expand_builtin_int_roundingfn): Likewise.
	(expand_builtin_int_roundingfn_2): Likewise.
	(expand_builtin_pow): Likewise.
	(expand_builtin_powi): Likewise.
	(expand_builtin_strlen): Pass entire CALL_EXPR as parameter instead
	of arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_RTX instead of 0.
	(expand_builtin_strstr): Likewise.
	(expand_builtin_strchr): Likewise.
	(expand_builtin_strrchr): Likewise.
	(expand_builtin_strpbrk): Likewise.
	(expand_builtin_memcpy): Likewise.
	(expand_builtin_mempcpy): Likewise.
	(expand_builtin_mempcpy_args): New.
	(expand_builtin_memmove): Similarly to expand_builtin_mempcpy.
	(expand_builtin_memmove_args): New.
	(expand_builtin_bcopy): Similarly to expand_builtin_mempcpy.
	(expand_movstr): Likewise.
	(expand_builtin_strcpy): Likewise.
	(expand_builtin_strcpy_args): New.
	(expand_builtin_stpcpy): Similarly to expand_builtin_strcpy.
	(expand_builtin_strncpy): Likewise.
	(expand_builtin_memset): Likewise.
	(expand_builtin_memset_args): New.
	(expand_builtin_bzero): Similarly to expand_builtin_memset.
	(expand_builtin_memcmp): Likewise.
	(expand_builtin_strcmp): Likewise.
	(expand_builtin_strncmp): Likewise.
	(expand_builtin_strcat): Likewise.
	(expand_builtin_strncat): Likewise.
	(expand_builtin_strspn): Likewise.
	(expand_builtin_strcspn): Likewise.
	(expand_builtin_args_info): Likewise.
	(expand_builtin_va_start): Likewise.
	(gimplify_va_arg_expr): Likewise.
	(expand_builtin_va_end): Likewise.
	(expand_builtin_va_copy): Likewise.
	(expand_builtin_frame_address): Likewise.
	(expand_builtin_alloca): Likewise.
	(expand_builtin_bswap): Likewise.
	(expand_builtin_unop): Likewise.
	(expand_builtin_fputs): Likewise.
	(expand_builtin_expect): Likewise.
	(expand_builtin_fabs): Likewise.
	(expand_builtin_copysign): Likewise.
	(expand_builtin_printf): Likewise.
	(expand_builtin_fprintf): Likewise.
	(expand_builtin_sprintf): Likewise.
	(expand_builtin_init_trampoline): Likewise.
	(expand_builtin_signbit): Likewise.
	(expand_builtin_fork_or_exec): Likewise.
	(expand_builtin_sync_operation): Likewise.
	(expand_builtin_compare_and_swap): Likewise.
	(expand_builtin_lock_test_and_set): Likewise.
	(expand_builtin_lock_release): Likewise.
	(expand_builtin): Likewise.
	(builtin_mathfn_code): Likewise.

	(fold_builtin_constant_p): Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_expect): Likewise.
	(fold_builtin_classify_type): Likewise.
	(fold_builtin_strlen): Likewise.
	(fold_builtin_nan): Likewise.
	(integer_valued_real_p): Likewise.
	(fold_trunc_transparent_mathfn): Likewise.
	(fold_fixed_mathfn): Likewise.
	(fold_builtin_cabs): Likewise.
	(fold_builtin_sqrt): Likewise.
	(fold_builtin_cbrt): Likewise.
	(fold_builtin_cos): Likewise.
	(fold_builtin_cosh): Likewise.
	(fold_builtin_tan): Likewise.
	(fold_builtin_sincos): Likewise.
	(fold_builtin_cexp): Likewise.
	(fold_builtin_trunc): Likewise.
	(fold_builtin_floor): Likewise.
	(fold_builtin_ceil): Likewise.
	(fold_builtin_round): Likewise.
	(fold_builtin_int_roundingfn): Likewise.
	(fold_builtin_bitop): Likewise.
	(fold_builtin_bswap): Likewise.
	(fold_builtin_logarithm): Likewise.
	(fold_builtin_hypot): Likewise.
	(fold_builtin_pow): Likewise.
	(fold_builtin_powi): Likewise.
	(fold_builtin_exponent): Likewise.
	(fold_builtin_memset): Likewise.
	(fold_builtin_bzero): Likewise.
	(fold_builtin_memory_op): Likewise.
	(fold_builtin_bcopy): Deleted; call site changed to invoke
	fold_builtin_memory_op directly.
	(fold_builtin_strcpy): Similarly as for fold_builtin_memory_op.
	(fold_builtin_strncpy): Likewise.
	(fold_builtin_memcmp): Likewise.
	(fold_builtin_strcmp): Likewise.
	(fold_builtin_strncmp): Likewise.
	(fold_builtin_signbit): Likewise.
	(fold_builtin_copysign): Likewise.
	(fold_builtin_isascii): Likewise.
	(fold_builtin_toascii): Likewise.
	(fold_builtin_isdigit): Likewise.
	(fold_builtin_fabs): Likewise.
	(fold_builtin_abs): Likewise.
	(fold_builtin_fmin_fmax): Likewise.
	(fold_builtin_carg): Likewise.
	(fold_builtin_classify): Likewise.
	(fold_builtin_unordered_cmp): Likewise.

	(fold_builtin_0, fold_builtin_2, fold_builtin_3, fold_builtin_4):
	New functions split out from fold_builtin_1.
	(fold_builtin_n): New.
	(fold_builtin_varargs): New.
	(fold_builtin): Deleted.  Most callers changed to use fold_call_expr
	instead.
	(fold_call_expr): New.
	(build_function_call_expr): Rewrite to use new helper function.
	(fold_builtin_call_list): New.
	(build_call_expr): New.
	(fold_builtin_call_valist): New.
	(rewrite_call_expr): New.
	(validate_arg): New.
	(validate_arglist): Change parameter to be entire CALL_EXPR instead
	of an arglist.  Change return type to bool.  Use new CALL_EXPR
	accessors.

	(fold_builtin_strstr):  Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_strchr): Likewise.
	(fold_builtin_strrchr): Likewise.
	(fold_builtin_strpbrk): Likewise.
	(fold_builtin_strcat): Likewise.
	(fold_builtin_strncat): Likewise.
	(fold_builtin_strspn): Likewise.
	(fold_builtin_strcspn): Likewise.
	(fold_builtin_fputs): Likewise.
	(fold_builtin_next_arg): Likewise.
	(fold_builtin_sprintf): Likewise.

	(expand_builtin_object_size): Use new CALL_EXPR accessors.  Use
	NULL_RTX instead of 0.
	(expand_builtin_memory_chk): Likewise.
	(maybe_emit_chk_warning): Likewise.
	(maybe_emit_sprintf_chk_warning): Likewise.

	(fold_builtin_object_size): Pass call arguments individually instead
	of as an arglist, fixing callers appropriately.  Use new CALL_EXPR
	accessors and constructors.  Return NULL_TREE instead of 0.
	(fold_builtin_memory_chk): Likewise.
	(fold_builtin_stxcpy_chk): Likewise.
	(fold_builtin_strncpy_chk): Likewise.
	(fold_builtin_strcat_chk): Likewise.
	(fold_builtin_strcat_chk): Likewise.
	(fold_builtin_strncat_chk): Likewise.
	(fold_builtin_sprintf_chk): Likewise.
	(fold_builtin_snprintf_chk): Likewise.
	(fold_builtin_printf): Likewise.
	(fold_builtin_vprintf): Likewise.

	* fold-const.c (negate_expr_p): Use new CALL_EXPR accessors and
	constructors.
	(operand_equal_p): Add separate tcc_vl_exp/CALL_EXPR case.
	(make_range): Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(extract_muldiv_1): Add VL_EXP_CLASS_P case.
	(fold_mathfn_compare): Use new CALL_EXPR accessors and constructors.
	(fold_unary): Likewise.
	(fold_binary): Likewise.
	(fold_ternary): Remove CALL_EXPR case, since they are no longer
	ternary expressions.
	(fold): Add logic for tcc_vl_exp.
	(fold_checksum_tree):  Make it know about tcc_vl_exp.  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(fold_build3_stat): Add assertion to flag broken interface for
	constructing CALL_EXPRs.
	(fold_build_call_list): New.
	(fold_build_call_list_initializer): New.
	(tree_expr_nonnegative_p): Use new CALL_EXPR accessors and
	constructors.
	(fold_strip_sign_ops): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* tree-dump.c (dequeue_and_dump) <CALL_EXPR>: Use new CALL_EXPR
	accessors and dump arguments explicitly.

	* tree-pretty-print.c (do_niy): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(dump_generic_node): Use new CALL_EXPR accessors and walk arguments
	explicitly.
	(print_call_name): Use new CALL_EXPR accessors.

	* print-tree.c (print_node): Add case tcc_vl_exp.  Print
	CALL_EXPR arguments explicitly instead of as a list.  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* tree-vrp.c (stmt_interesting_for_vrp): Use new CALL_EXPR accessors.
	(vrp_visit_stmt): Likewise.

	* tree-ssa-loop-im.c (outermost_invariant_loop_expr):  Make it
	know about tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.
	(force_move_till_expr): Likewise.

	* targhooks.c (default_external_stack_protect_fail): Use
	build_call_expr instead of build_function_call_expr.
	(default_hidden_stack_protect_fail): Likewise.

	* tree-complex.c (expand_complex_libcall): Use build_call_expr to
	build the call.

	* cgraphbuild.c (build_cgraph_edges): Use new CALL_EXPR accessors
	and walk arguments explicitly.

	* tree-ssa-loop-niter.c (simplify_replace_tree): Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(expand_simple_operations): Likewise.
	(infer_loop_bounds_from_array): Use new CALL_EXPR accessors.

	* gengtype.c (adjust_field_tree_exp): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.
	(walk_type): Tweak walking of arrays not to blow up on CALL_EXPRs.

	* optabs.c (expand_widen_pattern-expr): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* value_prof.c (tree_ic): Use new CALL_EXPR accessors.
	(tree_ic_transform): Likewise.
	(interesting_stringop_to_profile_p): Pass entire CALL_EXPR as
	parameter instead of arglist.  Fix callers.
	(tree_stringop_fixed_value): Use new CALL_EXPR accessors.
	(tree_stringops_transform): Likewise.
	(tree_indirect_call_to_profile): Likewise.
	(tree_stringops_values_to_profile): Likewise.

	* tree-tailcall.c (find_tail_calls): Use new CALL_EXPR iterator.
	(eliminate_tail_call): Likewise.

	* ipa-cp.c (ipcp_update_callgraph): Use new CALL_EXPR accessors.

	* tree-scalar-evolution.c (chrec_contains_symbols_defined_in_loop):
	Use TREE_OPERAND_LENGTH and generalize to handle any number of
	operands.
	(instantiate_parameters_1): Can't handle tcc_vl_exp here.

	* omp-low.c (build_omp_barrier): Use build_call_expr.
	(lower_rec_input_clauses): Likewise.
	(lower_reduction_clauses): Likewise.
	(expand_parallel_call): Likewise.
	(maybe_catch_exception): Likewise.
	(expand_omp_for_generic): Likewise.
	(expand_omp_for_static_nochunk): Likewise.
	(expand_omp_sections): Likewise.
	(lower_omp_single_simple): Likewise.
	(lower_omp_single_copy): Likewise.
	(lower_omp_master): Likewise.
	(lower_omp_ordered): Likewise.
	(lower_omp_critical): Likewise.

	* ipa-reference.c (check-call): Use new CALL_EXPR iterator.
	(scan_for_static_refs): Create tcc_vl_exp case for CALL_EXPR.

	* tree-gimple.c (is_gimple_call_addr): Fix doc.
	(recalculate_side_effects): Use TREE_OPERAND_LENGTH instead of
	TREE_CODE_LENGTH.  Add tcc_vl_exp case.

	* tree-chrec.c (chrec_contains_symbols): Use TREE_OPERAND_LENGTH
	and generalize to handle any number of operands.
	(chrec_contains_undetermined): Likewise.
	(tree_contains_chrecs): Likewise.
	(evolution_function_is_invariant_rec_p): Use TREE_OPERAND_LENGTH.

	* cgraphunit.c (update_call_expr): Use new CALL_EXPR accessors.

	* tree-ssa-ccp.c (ccp_fold): Use new CALL_EXPR accessors.  Use
	fold_call_expr instead of fold_builtin.
	(ccp_fold_builtin): Likewise.  Update calls into builtins.c to
	match declarations there.
	(fold_stmt): Use new CALL_EXPR constructor and accessors.  Doc
	updates.

	* tree-ssa-loop-ivopts.c (expr_invariant_in_loop_p): Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* ipa-pure-const.c (check_call): Use new CALL_EXPR accessors.
	(scan_function): Add case tcc_vl_exp for CALL_EXPR.

	* tree-stdarg.c (execute_optimize_stdarg): Use new CALL_EXPR
	accessors.

	* tree-ssa-math-opts.c (execute_cse_sincos_1): Use build_call_expr.
	(execute_cse_sincos): Use new CALL_EXPR accessors.

	* tree-ssa-alias.c (find_used_portions): Use new CALL_EXPR iterator.

	* gimple-low.c (lower_function_body): Use build_call_expr.
	(lower_builtin_setjmp): Likewise.

	* expr.c (emit_block_move_via_libcall): Use build_call_expr.
	(set_storage_via_libcall): Likewise.
	(safe_from_p): Add tcc_vl_exp case.  Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.
	(expand_expr_real_1): Use new CALL_EXPR accessors.

	* tree-browser.c (store_child_info): Use TREE_OPERAND_LENGTH and
	generalize to handle any number of operands.
	(TB_parent_eq): Likewise.

	* predict.c (expr_expected_value): Use new CALL_EXPR accessors.
	(strip_builtin_expect): Likewise.

	* function.c (gimplify_parameters): Use build_call_expr.

	* tree-vectorizer.c (vect_is_simple_reduction): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* ipa-type-escape.c (check_call): Use new CALL_EXPR iterators.
	(scan_for_refs): Add case tcc_vl_exp for CALL_EXPR.

	* tree-data-ref.c (get_references_in_stmt): Use new CALL_EXPR
	iterators.

	* gimplify.c (build_stack_save_restore): Use build_call_expr.
	(gimplify_decl_expr): Likewise.
	(gimplify_call_expr): Use fold_call_expr instead of fold_builtin.
	Use new CALL_EXPR iterators.
	(gimplify_modify_expr_to_memcpy): Use build_call_expr.
	(gimplify_modify_expr_to_memset): Likewise.
	(gimplify_variable_sized_compare): Likewise.
	(gimplify_omp_atomic_fetch_op): Likewise.
	(gimplify_omp_atomic_pipeline): Likewise.
	(gimplify_omp_atomic_mutex): Likewise.
	(gimplify_function_tree): Likewise.

	* calls.c (alloca_call_p): Use new CALL_EXPR accessors.
	(call_expr_flags): Likewise.
	(expand_call): Likewise.

	* except.c (expand_builtin_eh_return_data_regno): Pass entire
	CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR 
        accessors.

	* coverage.c (create_coverage): Use build_call_expr.

	* tree-ssa-pre.c (expression_node_pool, list_node_pool): Delete.
	(temp_call_expr_obstack): New.
	(pool_copy_list): Delete.
	(temp_copy_call_expr): New.
	(phi_translate): Add case tcc_vl_exp for CALL_EXPR.  Use new
	CALL_EXPR accessors.  Get rid of special goo for copying argument
	lists and use temp_copy_call_expr instead.
	(valid_in_sets): Add case tcc_vl_exp for CALL_EXPR.  Use new
	CALL_EXPR accessors.
	(create_expression_by_pieces): Likewise.  Use build_call_array
	to construct the result instead of fold_build3.
	(create_value_expr_from): Add tcc_vl_exp.  Delete special goo for
	dealing with argument lists.
	(init_pre): Remove references to expression_node_pool and
	list_node_pool.  Init temp_call_expr_obstack instead.
	(fini_pre): Remove references to expression_node_pool and
	list_node_pool.

	* tree-sra.c (sra_walk_call_expr): Use new CALL_EXPR accessors
	and walk arguments explicitly instead of as a list.

	* tree-mudflap.c (mf_build_check_statement_for): Use build_call_expr.
	(mx_register_decls): Likewise.
	(mudflap_register_call): Likewise.
	(mudflap_finish_file): Likewise.

	* ipa-prop.c (ipa_callsite_compute_count): Use new CALL_EXPR accessors.
	(ipa_callsite_compute_param): Likewise.

	* tree-vect-patterns.c (vect_recog_pow_pattern): Use new CALL_EXPR
	accessors and constructor.

	* tree-nested.c (convert_nl_goto_reference): Use new CALL_EXPR
	accessors and constructor.
	(convert_tramp_reference): Likewise. 
	(convert_call_expr): Likewise.
	(finalize_nesting_tree_1): Likewise.

	* tree-ssa.c (tree_ssa_useless_type_conversion): Use new CALL_EXPR
	accessors.

	* tree-ssa-loop-prefetch.c (issue_prefetch_ref): Use build_call_expr.

	* tree-inline.c (initialize_inlined_parameters): Pass entire
	CALL_EXPR as parameter instead of arglist.  Use new CALL_EXPR
	accessors.
	(estimate_num_insns_1): Use new CALL_EXPR accessors.
	(expand_call_inline): Tidy up call to initialize_inlined_parameters.

	* tree-vect-transform.c (vect_create_epilog_for_reduction):  Use
	TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.
	(vectorizable_reduction): Likewise.
	(vectorizable_call): Use new CALL_EXPR iterators.
	(vectorizable_conversion): Use build_call_expr.
	(vectorizable_operation): Use TREE_OPERAND_LENGTH.
	(vect_gen_widened_results_half): Use build_call_expr.
	(vect_setup_realignment): Likewise.
	(vectorizable_live_operation): Use TREE_OPERAND_LENGTH.

	* tree-object-size.c (alloc_object_size): Use new CALL_EXPR accessors.
	(pass_through_call): Likewise.
	(compute_object_sizes): Likewise.  Use fold_call_expr instead of
	fold_builtin.

	* tree-profile.c (tree_gen_interval_profiler): Use build_call_expr.
	(tree_gen_pow2_profiler): Likewise.
	(tree_gen_one_value_profiler): Likewise.
	(tree_gen_ic_func_profiler): Likewise.
	(tree_gen_average_profiler): Likewise.
	(tree_gen_ior_profiler): Likewise.

	* tree-ssa-structalias.c (get_constraint_for): Add case tcc_vl_exp.
	(find_func_aliases): Use new CALL_EXPR accessors.  Add case
	tcc_vl_exp.  Use TREE_OPERAND_LENGTH instead of TREE_CODE_LENGTH.

	* tree-ssa-reassoc.c (get_rank): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.

	* stmt.c (warn_if_unused_value): Use TREE_OPERAND_LENGTH instead
	of TREE_CODE_LENGTH.

	* convert.c (convert_to_real): Use new CALL_EXPR accessors and
	constructor.
	(convert_to_integer): Likewise.

	* tree-ssa-operands.c (get_call_expr_operands): Use new CALL_EXPR
	accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* config/alpha/alpha.c (alpha_expand_builtin): Use new CALL_EXPR
	accessors.
	* config/frv/frv.c (frv_expand_builtin): Likewise.
	* config/s390/s390.c (s390_expand_builtin): Likewise.

	* config/sparc/sparc.c (sparc_gimplify_va_arg): Use build_call_expr.
	(sparc_expand_builtin): Use new CALL_EXPR accessors.

	* config/i386/i386.c (ix86_function_ok_for_sibcall): Likewise.
	(ix86_expand_binop_builtin): Pass entire CALL_EXPR as parameter
	instead of arglist.  Use new CALL_EXPR accessors on it.  Fix callers.
	(ix86_expand_store_builtin): Likewise.
	(ix86_expand_unop_builtin): Likewise.
	(ix86_expand_unop1_builtin): Likewise.
	(ix86_expand_sse_compare): Likewise.
	(ix86_expand_sse_comi): Likewise.
	(ix86_expand_vec_init_builtin): Likewise.
	(ix86_expand_vec_ext_builtin): Likewise.
	(ix86_expand_vec_set_builtin): Likewise.
	(ix86_expand_builtin): Use new CALL_EXPR accessors.

	* config/sh/sh.c (sh_expand_builtin): Use new CALL_EXPR accessors.
	* config/c4x/c4x.c (c4x_expand_builtin): Likewise.

	* config/iq2000/iq2000.c (expand_one_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(iq2000_expand_builtin): Use new CALL_EXPR accessors.

	* config/rs6000/rs6000-c.c (altivec_build_resolved_builtin): Use
	build_call_expr.
	* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise.
	(rs6000_expand_unop_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(altivec_expand_abs_builtin): Likewise.
	(rs6000_expand_binop_builtin): Likewise.
	(altivec_expand_predicate_builtin): Likewise.
	(altivec_expand_lv_builtin): Likewise.
	(spe_expand_stv_builtin): Likewise.
	(altivec_expand_stv_builtin): Likewise.
	(rs6000_expand_ternop_builtin): Likewise.
	(altivec_expand_ld_builtin): Use new CALL_EXPR accessors.
	(altivec_expand_st_builtin): Likewise.
	(altivec_expand_dst_builtin): Likewise.
	(altivec_expand_vec_init_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(altivec_expand_vec_set_builtin): Likewise.
	(altivec_expand_vec_ext_builtin): Likewise.
	(altivec_expand_builtin): Use new CALL_EXPR accessors.
	(spe_expand_builtin): Likewise.
	(spe_expand_predicate_builtin): Pass entire CALL_EXPR instead of
	arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(spe_expand_evsel_builtin): Likewise.
	(rs6000_expand_builtin): Use new CALL_EXPR accessors.  VCFUX and
	FCFSX cases must construct whole new CALL_EXPR, not just arglist.

	* config/arm/arm.c (arm_expand_binop_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(arm_expand_unop_builtin): Likewise.
	(arm_expand_builtin): Use new CALL_EXPR accessors.

	* config/mips/mips.c (mips_expand_builtin):  Use new CALL_EXPR
	accessors.

	* config/bfin/bfin.c (bfin_expand_binop_builtin): Pass entire CALL_EXPR
	instead of arglist.  Use new CALL_EXPR accessors.  Fix callers.
	(bfin_expand_unop_builtin): Likewise.
	(bfin_expand_builtin): Use new CALL_EXPR accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* c-semantics.c (build_stmt): Add internal diagnostic check.

	* c-pretty-print.c (pp_c_postfix_expression): Use new CALL_EXPR
	accessors.  Print arguments explicitly instead of as a list.

	* c-typeck.c (build_function_call): Use new CALL_EXPR constructors.

	* c-omp.c (c_finish_omp_barrier): Use build_call_expr.
	(c_finish_omp_flish): Likewise.

	* c-common.c (verify_tree): Use new CALL_EXPR accessors.  Traverse
	arguments explicitly instead of as a list.  Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.
	(check_function_arguments_recurse): Use new CALL_EXPR accessors.
	(c_warn_unused_result): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* cp-tree.def (AGGR_INIT_EXPR): Adjust documentation.
	Change class to tcc_vl_exp.

	* call.c (build_call): Use build_call_list instead 
	of build3. 
	(build_over_call): Likewise.
	(build_new_method_call): Use build_min_non_dep_call_list 
	instead of build_min_non_dep.

	* error.c (dump_call_expr_args): New function.
	(dump_aggr_init_expr_args): New function.
	(dump_expr) <AGGR_INIT_EXPR, CALL_EXPR, INDIRECT_REF>: Use them. 
	Update to use new CALL_EXPR and AGGR_INIT_EXPR accessor macros.

	* cvt.c (convert_to_void): Use build_call_array instead
	of build3; use new AGGR_INIT_EXPR accessor macros.

	* mangle.c (write_expression): Use TREE_OPERAND_LENGTH
	instead of TREE_CODE_LENGTH.

	* dump.c (cp_dump_tree) <AGGR_INIT_EXPR>: Update to use new
	AGGR_INIT_EXPR accessor macros.

	* cp-gimplify.c (cp_gimplify_init_expr): Use 
	AGGR_INIT_EXPR_SLOT to set the slot operand.

	* cp-tree.h (AGGR_INIT_EXPR_FN): New macro.
	(AGGR_INIT_EXPR_SLOT): New macro.
	(AGGR_INIT_EXPR_ARG): New macro.
	(aggr_init_expr_nargs): New macro.
	(AGGR_INIT_EXPR_ARGP): New macro.
	(aggr_init_expr_arg_iterator): New.
	(init_aggr_init_expr_arg_iterator): New.
	(next_aggr_init_expr_arg): New.
	(first_aggr_init_expr_arg): New.
	(more_aggr_init_expr_args_p): New.
	(FOR_EACH_AGGR_INIT_EXPR_ARG): New.
	(stabilize_aggr_init): New declaration.
	(build_min_non_dep_call_list): Likewise.

	* tree.c (process_aggr_init_operands): New function.
	(build_aggr_init_array) New function.
	(build_cplus_new): Update to use new CALL_EXPR and
	AGGR_INIT_EXPR accessor macros. Replace use of build3 with
	build_aggr_init_array.
	(build_min_non_dep_call_list) New function.
	(build_min_nt): Assert input code parameter is not a variable
	length expression class.
	(build_min, build_min_non_dep): Likewise.
	(cp_tree_equal) <CALL_EXPR>: Iterate through the arguments
	to check for equality instead of recursing. Handle tcc_vl_exp
	tree code classes.
	(stabilize_call): Update to only handle CALL_EXPRs, not 
	AGGR_INIT_EXPRs; use new CALL_EXPR accessor macros.
	(stabilize_aggr_init): New function.
	(stabilize_init): Use it.

	* cxx-pretty-print.c (pp_cxx_postfix_expression)
	<AGGR_INIT_EXPR, CALL_EXPR>: Update to use new CALL_EXPR and
	AGGR_INIT_EXPR accessor macros and argument iterators.
	
	* pt.c (tsubst_copy) <CALL_EXPR>: Replace build_nt with
	build_vl_exp. Iterate through the operands, recursively 
	processing each one.
	(tsubst_copy_and_build) <CALL_EXPR>: Update to use new
	CALL_EXPR accessor macros.
	(value_dependent_expression_p) <default>: Handle tcc_vl_exp
	tree code classes. Use TREE_OPERAND_LENGTH instead of 
	TREE_CODE_LENGTH.

	* semantics.c (finish_call_expr): Use build_nt_call_list
	instead of build_nt.
	(simplify_aggr_init_expr): Update to use new AGGR_INIT_EXPR 
	accessor macros. Use build_call_array to construct the 
	CALL_EXPR node instead of build3
	
	* decl2.c (build_offset_ref_call_from_tree): Use 
	build_nt_call_list and build_min_non_dep_call_list instead
	of build_min_nt and build_min_non_dep.

	* parser.c (cp_parser_postfix_expression) <CPP_OPEN_PAREN>:
	Use build_nt_call_list instead of build_min_nt.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* java-tree.h (BUILD_MONITOR_ENTER): Use build_call_nary instead
	of build3.
	(BUILD_MONITOR_EXIT): Likewise.

	* java-gimplify.c (java_gimplify_component_ref): Use build_call_expr.
	(java_gimplify_modify_expr): Likewise.

	* class.c (cache_this_class_ref): Use build_call_expr.
	(build_static_field_ref): Likewise.
	(emit_indirect_register_classes): Likewise.
	(emit_register_classes): Likewise.

	* resource.c (write_resource_constructor): Use build_call_expr.

	* builtins.c (builtin_creator_function): Change interpretation of
	the second parameter to be the whole CALL_EXPR instead of the arglist.
	(max_builtin): Tweak parameter list.  Use new CALL_EXPR accessors.
	(min_builtin): Likewise.
	(abs_builtin): Likewise.
	(java_build_function_call_expr): Likewise.
	(convert_real): Likewise.
	(UNMARSHAL3): Likewise.
	(UNMARSHAL4): Likewise.
	(UNMARSHAL5): Likewise.
	(build_arglist_for_builtin): Delete.  Fix callers to use
	build_call_expr instead.
	(putObject_builtin): Tweak parameter list.  Use new CALL_EXPR
	accessors.
	(compareAndSwapInt_builtin): Likewise.
	(compareAndSwapLong_builtin): Likewise.
	(compareAndSwapObject_builtin): Likewise.
	(putVolatile_builtin): Likewise.
	(getVolatile_builtin): Likewise.
	(VMSupportsCS8_builtin): Likewise.
	(check_for_builtin): Pass entire CALL_EXPR to builtin expander
	instead of arglist.

	* expr.c (build_java_athrow): Use build_call_nary instead of build3.
	(build_java_throw_out_of_bounds_exception): Likewise.
	(java_check_reference): Likewise.
	(build_java_arraystore_check): Likewise.
	(build_newarray): Likewise.
	(build_anewarray): Likewise.
	(expand_java_multinewarray): Use build_call_list instead of build3.
	(build_java_monitor): Use build_call_nary instead of build3.
	(java_create_object): Likewise.
	(expand_java_NEW): Likewise.
	(build_instanceof): Likewise.
	(expand_java_CHECKCAST): Likewise.
	(build_java_soft_divmod): Likewise.
	(build_java_binop): Likewise.
	(build_field_ref): Likewise.
	(build_class_init): Likewise.
	(rewrite_arglist_getcaller): Use build_call_expr.
	(build_invokeinterface):  Use build_call_nary instead of build3.
	(expand_invoke): Use build_call_list instead of build3.
	(build_jni_stub): Use build_call_nary, build_call_list, or
	build_call_expr instead	of build3.
	(expand_java_field_op): Use build_call_expr instead of build3.
	(force_evaluation_order): Use new CALL_EXPR accessors.

	* lang.c (java_get_callee_fndecl): Use new CALL_EXPR accessors.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
	(objc_get_callee_fndecl): Likewise.

2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
	    Brooks Moses  <brooks.moses@codesourcery.com>
	    Lee Millward  <lee.millward@codesourcery.com>

	* trans-expr.c (gfc_conv_power_op): Use build_call_expr.
	(gfc_conv_string_tmp): Likewise.
	(gfc_conv_concat_op): Likewise.
	(gfc_build_compare_string): Likewise.
	(gfc_conv_function_call): Use build_call_list instead of build3.

	* trans-array.c (gfc_trans_allocate_array_storage): Use
	build_call_expr.
	(gfc_grow_array): Likewise.
	(gfc_trans_array_ctor_element): Likewise.
	(gfc_trans_array_constructor_value): Likewise.
	(gfc_array_allocate): Likewise.
	(gfc_array_deallocate): Likewise.
	(gfc_trans_auto_array_allocation): Likewise.
	(gfc_trans_dummy_array_bias): Likewise.
	(gfc_conv_array_parameter): Likewise.
	(gfc_trans_dealloc_allocated): Likewise.
	(gfc_duplicate_allocatable): Likewise.

	* trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
	(gfc_trans_omp_flush): Likewise.

	* trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
	(gfc_trans_pause): Likewise.
	(gfc_trans_stop): Likewise.
	(gfc_trans_character_select): Likewise.
	(gfc_do_allocate): Likewise.
	(gfc_trans_assign_need_temp): Likewise.
	(gfc_trans_pointer_assign_need_temp): Likewise.
	(gfc_trans_forall_1): Likewise.
	(gfc_trans_where_2): Likewise.
	(gfc_trans_allocate): Likewise.
	(gfc_trans_deallocate): Likewise.

	* trans.c (gfc_trans_runtime_check): Use build_call_expr.

	* trans-io.c (gfc_trans_open): Use build_call_expr.
	(gfc_trans_close): Likewise.
	(build_filepos): Likewise.
	(gfc_trans_inquire): Likewise.
	(NML_FIRST_ARG): Delete.
	(NML_ADD_ARG): Delete.
	(transfer_namelist_element): Use build_call_expr.
	(build_dt): Likewise.
	(gfc_trans_dt_end): Likewise.
	(transfer_expr): Likewise.
	(transfer_array-desc): Likewise.

	* trans-decl.c (gfc_generate_function_code): Use build_call_expr.
	(gfc_generate_constructors): Likewise.

	* trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
	(gfc_conv_intrinsic_fdate): Likewise.
	(gfc_conv_intrinsic_ttynam): Likewise.
	(gfc_conv_intrinsic_array_transfer): Likewise.
	(gfc_conv_associated): Likewise.
	(gfc_conv_intrinsic_si_kind): Likewise.
	(gfc_conv_intrinsic_trim): Likewise.
	(gfc_conv_intrinsic_repeat: Likewise.
	(gfc_conv_intrinsic_iargc): Likewise.

Co-Authored-By: Brooks Moses <brooks.moses@codesourcery.com>
Co-Authored-By: Lee Millward <lee.millward@codesourcery.com>

From-SVN: r122018
2007-02-15 18:50:49 -05:00
Richard Henderson 7ab0aca2fe calls.c (emit_library_call_value_1): If PROMOTE_MODE modifed the result mode of the libcall, convert back to outmode.
* calls.c (emit_library_call_value_1): If PROMOTE_MODE modifed the
        result mode of the libcall, convert back to outmode.

From-SVN: r121852
2007-02-12 10:46:16 -08:00
Steven Bosscher a31830a7ca fwprop.c (try_fwprop_subst): Use set_unique_reg_note to add the REG_EQ* note.
* fwprop.c (try_fwprop_subst): Use set_unique_reg_note
	to add the REG_EQ* note.
	* see.c (see_merge_one_use_extension): Likewise.
	* local-alloc.c (update_equiv_regs): Likewise.  Also don't
	turn REG_EQUAL notes into REG_EQUIV notes if the target
	register may have more than one set.
	* function.c (assign_parm_setup_reg): Use set_unique_reg_note.
	* gcse.c (try_replace_reg): Likewise.
	* alias.c (init_alias_analysis): Use find_reg_equal_equiv_note.
	* calls.c (fixup_tail_calls): Likewise.  Abort if there is
	more than one REG_EQUIV note.
	* reload1.c (gen_reload): Use set_unique_reg_note.

From-SVN: r121821
2007-02-11 19:53:11 +00:00
Joseph Myers 46bd2beed4 calls.c (store_one_arg): Pass correct alignment to emit_push_insn for non-BLKmode values.
* calls.c (store_one_arg): Pass correct alignment to
	emit_push_insn for non-BLKmode values.
	* expr.c (emit_push_insn): If STRICT_ALIGNMENT, copy to an
	unaligned stack slot via a suitably aligned slot.

From-SVN: r121736
2007-02-09 01:11:18 +00:00
Kazu Hirata 576c9028f0 200x-xx-xx Kazu Hirata <kazu@codesourcery.com> Richard Sandiford <richard@codesourcery.com>
gcc/
200x-xx-xx  Kazu Hirata  <kazu@codesourcery.com>
	    Richard Sandiford  <richard@codesourcery.com>

	* doc/tm.texi (TARGET_FUNCTION_VALUE): Expand documentation of
	parallels.
	* calls.c (expand_call): If the return value is a PARALLEL,
	extract its first member.
	* config/m68k/linux.h (FUNCTION_EXTRA_EPILOGUE): Remove.
	* config/m68k/m68k.c (m68k_output_function_epilogue): Don't
	use FUNCTION_EXTRA_EPILOGUE.
	(m68k_function_value): Return a PARALLEL if the return value
	is of a pointer type.
	* config/m68k/netbsd-elf.h (current_function_returns_pointer)
	(FUNCTION_EXTRA_EPILOGUE): Remove.
	* config/m68k/m68k.md (D0_REG): New constant.

Co-Authored-By: Richard Sandiford <richard@codesourcery.com>

From-SVN: r120929
2007-01-18 19:54:44 +00:00
Josh Conner 7816b87eb1 re PR middle-end/29683 (Arg split between stack/regs can cause stack corruption)
2007-03-01  Josh Conner  <jconner@apple.com>

	PR middle-end/29683
	* calls.c (compute_argument_addresses): Set stack and stack_slot
	for partial args, too.
	(store_one_arg): Use locate.size.constant for the size when
	generating a save_area.

2007-03-01  Josh Conner  <jconner@apple.com>

	PR middle-end/29683
	* gcc.dg/pr29683.c: New.

From-SVN: r120425
2007-01-04 01:37:15 +00:00
Dirk Mueller b9eae1a974 tree-vrp.c (get_value_range): Use XCNEW instead of XNEW and memset.
2006-11-16  Dirk Mueller  <dmueller@suse.de>

       * tree-vrp.c (get_value_range): Use XCNEW instead
       of XNEW and memset.
       (insert_range_assertions): Use XCNEWVEC instead
       of XNEWVEC and memset.
       (vrp_initialize): Same.
       (vrp_finalize): Same.
       * tree-ssa-ccp.c (ccp_initialize): Same.
       * predict.c (tree_bb_level_predictions): Same.
       * calls.c (expand_call): Same.
       * tree-ssa-copy.c (init_copy_prop): Same.
       (fini_copy_prop): Same.
       * tree-ssa-alias.c (get_ptr_info): Use GGC_CNEW instead
       of GGC_NEW and memset.

       * name-lookup.c (begin_scope): Use GGC_CNEW instead of
       GGC_NEW and memset.

From-SVN: r118903
2006-11-16 22:07:30 +00:00
Josh Conner 1186ec8cd6 re PR middle-end/25505 (gcc uses way too much stack space for this code)
2006-09-20  Josh Conner  <jconner@apple.com>

	PR middle-end/25505
	* calls.c (expand_call): Allow reuse of structure return stack
	temp.

From-SVN: r117091
2006-09-20 18:57:46 +00:00
Mike Stump c22cacf346 Whitespace fixups
From-SVN: r113893
2006-05-18 22:16:23 +00:00
Marcin Dalecki 5ed6ace578 tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
2006-01-31  Marcin Dalecki  <martin@dalecki.de>

	* tree-vrp.c: Use XNEW/XCNEW allocation wrappers.
	* regrename.c: Ditto.
	* tree-ssa-loop-im.c: Ditto.
	* tree-dump.c: Ditto.
	* tree-complex.c: Ditto.
	* genrecog.c: Ditto.
	* tree-ssa-threadupdate.c: Ditto.
	* tracer.c: Ditto.
	* java/class.c: Ditto.
	* java/jcf-parse.c: Ditto.
	* java/resource.c: Ditto.
	* java/except.c: Ditto.
	* java/jvspec.c: Ditto.
	* java/jcf-write.c: Ditto.
	* java/jcf-path.c: Ditto.
	* java/gjavah.c: Ditto.
	* java/zextract.c: Ditto.
	* java/jcf-io.c: Ditto.
	* java/jcf.h: Ditto.
	* java/buffer.c: Ditto.
	* java/lang.c: Ditto.
	* java/parse-scan.y: Ditto.
	* java/lex.c: Ditto.
	* java/lex.h: Ditto.
	* cfgloopmanip.c: Ditto.
	* postreload-gcse.c: Ditto.
	* tree-ssa-loop-manip.c: Ditto.
	* postreload.c: Ditto.
	* tree-ssa-loop-ch.c: Ditto.
	* loop.c: Ditto.
	* ipa-cp.c: Ditto.
	* cppspec.c: Ditto.
	* diagnostic.c: Ditto.
	* final.c: Ditto.
	* genoutput.c: Ditto.
	* gcc.c: Ditto.
	* cfghooks.c: Ditto.
	* cfgloopanal.c: Ditto.
	* objc/objc-act.c: Ditto.
	* gcov.c: Ditto.
	* genextract.c: Ditto.
	* genautomata.c: Ditto.
	* pretty-print.c: Ditto.
	* genemit.c: Ditto.
	* cgraphunit.c: Ditto.
	* flow.c: Ditto.
	* df-scan.c: Ditto.
	* haifa-sched.c: Ditto.
	* dominance.c: Ditto.
	* dbxout.c: Ditto.
	* tree-ssa-loop-ivopts.c: Ditto.
	* df-core.c: Ditto.
	* mode-switching.c: Ditto.
	* modulo-sched.c: Ditto.
	* graph.c: Ditto.
	* ipa-pure-const.c: Ditto.
	* cse.c: Ditto.
	* fix-header.c: Ditto.
	* web.c: Ditto.
	* tree-stdarg.c: Ditto.
	* ipa-utils.c: Ditto.
	* loop-init.c: Ditto.
	* ipa-inline.c: Ditto.
	* cfganal.c: Ditto.
	* global.c: Ditto.
	* alloc-pool.c: Ditto.
	* dwarf2out.c: Ditto.
	* opts.c: Ditto.
	* genattrtab.c: Ditto.
	* tree-ssa-loop-ivcanon.c: Ditto.
	* predict.c: Ditto.
	* timevar.c: Ditto.
	* lcm.c: Ditto.
	* fortran/gfortranspec.c: Ditto.
	* regmove.c: Ditto.
	* local-alloc.c: Ditto.
	* langhooks.c: Ditto.
	* function.c: Ditto.
	* tree-vectorizer.c: Ditto.
	* gcse.c: Ditto.
	* ipa-type-escape.c: Ditto.
	* alias.c: Ditto.
	* tree-if-conv.c: Ditto.
	* profile.c: Ditto.
	* ipa.c: Ditto.
	* tree-data-ref.c: Ditto.
	* loop-unroll.c: Ditto.
	* treelang/treetree.c: Ditto.
	* calls.c: Ditto.
	* bt-load.c: Ditto.
	* ggc-common.c: Ditto.
	* except.c: Ditto.
	* coverage.c: Ditto.
	* cselib.c: Ditto.
	* tree-cfgcleanup.c: Ditto.
	* tree-ssa-pre.c: Ditto.
	* cfgcleanup.c: Ditto.
	* loop-invariant.c: Ditto.
	* loop-iv.c: Ditto.
	* ipa-prop.c: Ditto.
	* print-tree.c: Ditto.
	* conflict.c: Ditto.
	* ggc-page.c: Ditto.
	* sched-deps.c: Ditto.
	* regclass.c: Ditto.
	* tree-object-size.c: Ditto.
	* combine.c: Ditto.
	* bb-reorder.c: Ditto.
	* resource.c: Ditto.
	* var-tracking.c: Ditto.
	* cfgloop.c: Ditto.
	* df-problems.c: Ditto.
	* reg-stack.c: Ditto.
	* tlink.c: Ditto.
	* gccspec.c: Ditto.
	* sched-rgn.c: Ditto.
	* tree-ssa-structalias.c: Ditto.
	* tree-ssa-reassoc.c: Ditto.
	* config/darwin-c.c: Ditto.
	* config/darwin.c: Ditto.
	* config/arm/arm.c: Ditto.
	* cfgrtl.c: Ditto.
	* collect2.c: Ditto.
	* reload1.c: Ditto.

From-SVN: r110446
2006-01-31 20:56:55 +01:00
Marcin Dalecki 842173466d expr.h (expand_normal): new inline function.
2006-01-30  Marcin Dalecki  <martin@dalecki.de>

	* expr.h (expand_normal): new inline function.
	* builtins.c: use it, use EXPAND_NORMAL explicitely.
	* dojump.c: use it.
	* dwarf2out.c: use it.
	* expr.c: use it.
	* calls.c: use it.
	* expmed.c: use it.
	* except.c: use it.
	* config/sparc/sparc.c: use it.
	* config/i386/i386.c: use it.
	* config/rs6000/rs6000.c: use it.
	* config/arm/arm.c: use it.
	* config/mips/mips.c: use it.
	* stmt.c: use it, use EXPAND_NORMAL explicitely.

From-SVN: r110428
2006-01-31 05:44:14 +01:00
Eric Botcazou 51caaefe17 re PR middle-end/24003 (17 ACATS regressions (fixed point or decimal artihmetic))
PR middle-end/24003
	* calls.c (expand_call): If TARGET is a MEM and some part of the
	argument area has been saved, force TARGET to a register.


Co-Authored-By: Ian Lance Taylor <ian@airs.com>

From-SVN: r106860
2005-11-13 09:55:11 +00:00
Kaz Kojima f2d186905a re PR target/24445 ("unable to find a register to spill in class 'R0_REGS")
PR target/24445
	* calls.c (expand_call): Copy a return value to a plain register
	if needed.

	* gcc.dg/pr24445.c: New test.

From-SVN: r106774
2005-11-11 02:12:42 +00:00
Eric Botcazou cd9ed4b4eb re PR middle-end/22127 (register window not preserved after getcontext call)
PR middle-end/22127
	* calls.c (special_function_p): Set ECF_RETURNS_TWICE for getcontext.

From-SVN: r106739
2005-11-10 16:58:56 +00:00
Kazu Hirata 07eef8164a re PR middle-end/23150 (20050713-1.c fails on arm-none-eabi with -O2 or -Os.)
PR middle-end/23150
	* calls.c (mem_overlaps_already_clobbered_arg_p): New.
	(load_register_parameters): Call it.
	(check_sibcall_argument_overlap_1): Likewise.
	(store_one_arg): Likewise.

From-SVN: r105114
2005-10-08 03:33:46 +00:00
Jan Hubicka e238ccac47 * calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK.
From-SVN: r104405
2005-09-18 17:14:24 +00:00
Alan Modra 40b0345dda calls.c (load_register_parameters): Fix comment typo.
* calls.c (load_register_parameters): Fix comment typo.
	* expr.c (emit_push_insn): Comment formatting.

From-SVN: r103656
2005-08-31 13:03:23 +09:30
Richard Henderson b755446cef re PR middle-end/23221 (-fstack-protector does not protect tail call functions)
PR 23221
        * function.c (stack_protect_epilogue): Export.
        * tree.h (stack_protect_epilogue): Declare.
        * calls.c (expand_call): Call it.

From-SVN: r102731
2005-08-03 20:57:41 -07:00
Kazu Hirata a4174ebf41 calls.c, [...]: Fix comment typos.
* calls.c, fold-const.c, ipa-reference.c, ipa-type-escape.c,
	tree-ssa-reassoc.c, tree-ssa-structalias.c, vec.h,
	config/crx/crx.c, config/m32c/m32c.c, config/m32c/m32c.h: Fix
	comment typos.
	* doc/c-tree.texi, doc/tree-ssa.texi: Fix typos.

From-SVN: r102385
2005-07-26 13:53:54 +00:00
Manfred Hollstein 1490f93a3c * calls.c (store_one_arg): Fix unsigned comparison warning.
From-SVN: r102363
2005-07-25 16:17:01 +00:00
Jakub Jelinek 0dc42b03d3 calls.c (store_one_arg): Check for sibling call MEM arguments from already clobbered incoming argument area.
* calls.c (store_one_arg): Check for sibling call MEM arguments
	from already clobbered incoming argument area.

	* gcc.c-torture/execute/20050713-1.c: New test.

From-SVN: r102350
2005-07-25 09:54:07 +02:00
J"orn Rennecke 475a3eef78 re PR rtl-optimization/21848 (load_mems / replace_loop_mems bug causes miscompilation of jcf-io.c / SEGV while processing java/lang/AbstractMethodError)
PR rtl-optimization/21848
	* calls.c (emit_library_call_value_1): For const functions, add
	USEs of the stack slots to CALL_INSN_FUNCTION_USAGE.

From-SVN: r102281
2005-07-22 13:15:37 +01:00
Daniel Berlin ea900239f4 Makefile.in: Added rules for ipa-pure-const.c...
2005-07-16  Danny Berlin <dberlin@dberlin.org>
	    Kenneth Zadeck <zadeck@naturalbridge.com>

	* Makefile.in: Added rules for ipa-pure-const.c, ipa-reference.c,
	ipa-reference.h, ipa-utils.c, ipa-utils.h, ipa-type-escape.c,
	ipa-type-escape.h, tree-promote-statics.c
	* ipa-pure-const.c, ipa-reference.c, ipa-reference.h, ipa-utils.c,
	ipa-utils.h, ipa-type-escape.c, ipa-type-escape.h,
	tree-promote-statics.c: new files.
	* alias.c: (nonlocal_mentioned_p_1, nonlocal_mentioned_p,
	nonlocal_referenced_p_1, nonlocal_referenced_p, nonlocal_set_p_1,
	int nonlocal_set_p, mark_constant_function): Deleted.
	(rest_of_handle_cfg): Removed call to mark_constant_function.
        (nonoverlapping_component_refs_p): Added calls to support
	type based aliasing.
        * tree-ssa-alias.c (may_alias_p,
	compute_flow_insensitive_aliasing): Ditto.
	* calls.c (flags_from_decl_or_type): Removed reference to
	cgraph_rtl_info.
	(flags_from_decl_or_type): Support ECF_POINTER_NO_CAPTURE attribute.
	* c-common.c (handle_pointer_no_capture_attribute): New function
	and added pointer_no_capture attribute.
      	* c-typeck.c (convert_arguments): Make builtins tolerant of having
	too many arguments.  This is necessary for Spec 2000.
	* cgraph.h (const_function, pure_function): Removed.
	* common.opt: Added "fipa-pure-const", "fipa-reference",
	"fipa-type-escape", and "ftree-promote-static".
	* opts.c: Ditto.
	* passes.c: Added ipa and tree-promote-statics passes.
	* timevar.def: Added TV_IPA_PURE_CONST, TV_IPA_REFERENCE,
	TV_IPA_TYPE_ESCAPE, and TV_PROMOTE_STATICS.
	* tree.h: Support ECF_POINTER_NO_CAPTURE attribute.
	* tree-dfa.c (referenced_var_lookup_if_exists): New function.
	* tree-flow.h: Added exposed sra calls and addition of
	reference_vars_info field for FUNCTION_DECLS.
	* tree-pass.h: Added passes.
	* tree-sra.c: (sra_init_cache): New function.
	(sra_insert_before, sra_insert_after) Made public.
	(type_can_be_decomposed_p): Renamed from type_can_be_decomposed_p
	and made public.
	* tree-ssa-alias.c (dump_alias_stats): Added stats for type based
	aliasing. (may_alias_p): Added code to use type escape analysis to
	improve alias sets.
	* tree-ssa-operands.c (add_call_clobber_ops): Added parameter and
	code to prune clobbers of static variables based on information
	produced in ipa-reference pass.  Changed call clobbering so that
	statics are not marked as clobbered if the call does not clobber
	them.


2005-07-16  Danny Berlin <dberlin@dberlin.org>
	    Kenneth Zadeck <zadeck@naturalbridge.com>

	* gcc.dg/tree-ssa/ssa-dce-2.c: Changed dg-options to run at -O2
	since pure const detection cannot run at -O1 in c compiler.
	* gcc.dg/tree-ssa/20030714-1.c Changed scanning patterns because we
	can now optimize this case properly.
	* gcc.dg/tree-ssa/sra-2.c: Changed to -O3 and removed xfail
	because we now pass.
	* gcc.dg/vect/vect-92.c: Removed out of bounds array access.

Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com>

From-SVN: r102098
2005-07-16 18:56:53 +00:00
Richard Guenther 1d636cc69f Makefile.in (explow.o, [...]): Depend on target.h.
2005-07-14  Richard Guenther  <rguenther@suse.de>

	* Makefile.in (explow.o, reg-stack.o): Depend on target.h.
	* calls.c (expand_call): Pass fntype to hard_function_value.
	(emit_library_call_value_1): Likewise.
	* explow.c: Include target.h.
	(hard_function_value): Take extra argument, the fntype.
	Use new target hook for function_value.
	* expr.h (hard_function_value): Change prototype.
	* function.c (aggregate_value_p): Pass 0 as fntype to
	hard_function_value.
	(assign_parms): Use new target hook for function_value.
	Pass 0 as fntype to hard_function_value.
	(expand_function_end): Likewise.
	* reg-stack.c: Include target.h.
	(stack_result): Use new target hook for function_value.
	* target-def.h: New target hook function_value.
	* target.h: Likewise.
	* targhooks.c (default_function_value): New function.
	* targhooks.h (default_function_value): Declare.

From-SVN: r102013
2005-07-14 07:39:56 +00:00
Jakub Jelinek d9725c411c re PR middle-end/17965 (ice in expand_call)
PR middle-end/17965
	* calls.c (expand_call, emit_library_call_value_1): Use xmalloc/free
	instead of alloca for really big argument sizes.

	* gcc.c-torture/compile/20050622-1.c: New test.

From-SVN: r101333
2005-06-26 07:27:14 +02:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Jason Merrill fa47911c56 re PR c++/19317 (removing a temporary return value when we cannot)
PR c++/19317
        Leave the return slot target in the MODIFY_EXPR rather than making
        it an argument, but only use it if the CALL_EXPR has a flag set.
        * tree.h (CALL_EXPR_HAS_RETURN_SLOT_ADDR): Rename to
        CALL_EXPR_RETURN_SLOT_OPT.
        * calls.c (expand_call): Adjust.
        * tree-inline.c (expand_call_inline): Adjust.
        * tree-pretty-print.c (dump_generic_node): Adjust.

        And set the flag as appropriate.
        * gimplify.c (gimplify_modify_expr_rhs): Set
        CALL_EXPR_HAS_RETURN_SLOT_ADDR where the LHS is obviously safe.
        * tree-nrv.c (execute_return_slot_opt): Set
        CALL_EXPR_HAS_RETURN_SLOT_ADDR based on escape analysis.
        * tree-pass.h: Declare pass_return_slot.
        * tree-optimize.c (init_tree_optimization_passes): Add it.

        * cp/semantics.c (simplify_aggr_init_expr): Use
        CALL_EXPR_RETURN_SLOT_OPT, not CALL_EXPR_HAS_RETURN_SLOT_ADDR.

From-SVN: r101269
2005-06-23 10:44:21 -04:00
Steven Bosscher 29d51cdb20 calls.c (purge_reg_equiv_notes): Remove, fold into...
* calls.c (purge_reg_equiv_notes): Remove, fold into...
	(fixup_tail_calls): ...here.  Only look at insns between the
	start of the function and the FUNCTION_BEG insn note.

	* gcse.c (one_cprop_pass): Fix typos in dumps.

	* tree-ssa-operands.h (FOR_EACH_PHI_ARG): Fix typos.

From-SVN: r99461
2005-05-09 17:52:20 +00:00
DJ Delorie ccf08a6ed7 c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery decide if the warning will be printed.
* c-decl.c (store_parm_decls_oldstyle): Let diagnostic machinery
decide if the warning will be printed.
* calls.c (expand_call): Likewise.
* function.c (init-function_start): Likewise.

* common.opt (-fdiagnostics-show-option): New.
* opts.c (option_enabled): Accept the option index instead of a
pointer to the option descriptor.
* opts.h (option_enabled): Likewise.
* toplev.c (print_switch_values): Pass option index, not option
descriptor.
* diagnostic.h (diagnostic_info): Add option_index.
* diagnostic.c: Include opts.h.
(diagnostic_set_info): Initialize option_index.
(diagnostic_report_diagnostic): Amend option name if appropriate.
(warning): Check to see if the specified warning is enabled.
Store option index.
* doc/invoke.texi (-fdiagnostics-show-options): Document.

From-SVN: r99169
2005-05-03 13:55:46 -04:00
Daniel Jacobowitz ff7f012ac0 calls.c (expand_call): Handle current_function_pretend_args_size when checking for sibcalls.
* calls.c (expand_call): Handle current_function_pretend_args_size
	when checking for sibcalls.

From-SVN: r99113
2005-05-02 18:18:37 +00:00
DJ Delorie d4ee4d2525 diagnostic.c (warning): Accept parameter to classify warning option.
* diagnostic.c (warning): Accept parameter to classify warning option.
(warning0): New, for when a pointer to an error() like function is needed.
* errors.c (warning): Likewise.
* errors.h (warning, warning0): Adjust prototypes.
* toplev.h (warning, warning0): Likewise.

* attribs.c, builtins.c, c-common.c, c-decl.c, c-format.c,
c-gimplify.c, c-lex.c, c-objc-common.c, c-opts.c, c-parser.c,
c-pragma.c, c-typeck.c, calls.c, cgraph.c, coverage.c, emit-rtl.c,
fold-const.c, fortran/trans-decl.c, function.c, gcse.c,
genautomata.c, haifa-sched.c, opts.c, passes.c, regclass.c,
reload1.c, stmt.c, stor-layout.c, toplev.c, tree-cfg.c,
tree-dump.c, tree-inline.c, tree-mudflap.c, tree-optimize.c,
tree-ssa.c, tree.c, varasm.c: Adjust warning() callers.

* config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
config/avr/avr.c, config/bfin/bfin.c, config/c4x/c4x-c.c,
config/c4x/c4x.c, config/cris/cris.c, config/darwin-c.c,
config/darwin.c, config/darwin.h, config/h8300/h8300.c,
config/i386/cygming.h, config/i386/djgpp.h, config/i386/i386.c,
config/i386/winnt.c, config/ia64/ia64-c.c, config/ia64/ia64.c,
config/ip2k/ip2k.c, config/m32r/m32r.c, config/m68hc11/m68hc11.c,
config/m68k/m68k.c, config/mcore/mcore.c, config/mips/mips.c,
config/mmix/mmix.c, config/ns32k/ns32k.c, config/pa/pa-hpux11.h,
config/pa/pa.c, config/rs6000/aix43.h, config/rs6000/aix51.h,
config/rs6000/aix52.h, config/rs6000/darwin.h,
config/rs6000/rs6000-c.c, config/rs6000/rs6000.c,
config/s390/s390.c, config/sh/sh.c, config/sh/sh.h,
config/sh/symbian.c, config/sol2-c.c, config/sol2.c,
config/stormy16/stormy16.c, config/v850/v850-c.c,
config/v850/v850.c, config/xtensa/xtensa.c: Adjust warning()
callers.

* ada/misc.c: Adjust warning() callers.

* cp/call.c, cp/class.c, cp/cvt.c, cp/decl.c, cp/decl2.c,
cp/except.c, cp/friend.c, cp/init.c, cp/lex.c, cp/mangle.c,
cp/method.c, cp/name-lookup.c, cp/parser.c, cp/repo.c, cp/rtti.c,
cp/tree.c, cp/typeck.c, cp/typeck2.c: Adjust warning() callers.

* fortran/trans-decl.c: Adjust warning() callers.

* java/class.c, java/decl.c, java/expr.c, java/jcf-io.c,
java/jcf-parse.c, java/jv-scan.c, java/parse.y: Adjust warning()
callers.

* objc/objc-act.c: Adjust warning() callers.

* treelang/parse.y: Adjust warning() callers.

From-SVN: r98633
2005-04-23 17:29:07 -04:00
Dale Johannesen 63579539f1 re PR middle-end/19225 (g++.dg/eh/omit-frame-pointer2.C fails with -fpic/-fPIC on i686-pc-linux-gnu)
2005-03-30  Dale Johannesen  <dalej@apple.com>

        PR middle-end/19225
        * calls.c (expand_call):  Flush pending deferrals before
        throwing call.

From-SVN: r97277
2005-03-30 20:21:37 +00:00
Alan Modra f0078f8689 calls.c (struct arg_data): Update "partial" comment.
* calls.c (struct arg_data): Update "partial" comment.
	(load_register_parameters): Update "nregs" comment.

From-SVN: r97241
2005-03-30 16:11:01 +09:30
Alexey Neyman bae802f98b Paolo Bonzini <gcc.gnu.org>
2005-03-18  Alexey Neyman  <alex.neyman@auriga.ru>
	    Paolo Bonzini  <gcc.gnu.org>

	* calls.c (setjmp_call_p, special_function_p): Update comments
	at the head of the functions.

From-SVN: r96656
2005-03-18 10:42:16 +00:00
Zdenek Dvorak dcd6de6d69 builtin-attrs.def (ATTR_NOVOPS, [...]): New.
* builtin-attrs.def (ATTR_NOVOPS, ATTR_NOVOPS_LIST,
	ATTR_PURE_NOTHROW_NOVOPS_LIST): New.
	* builtins.def (ATTR_MATHFN_FPROUNDING): Use NOVOPS.
	(BUILT_IN_PREFETCH): Set the NOVOPS attribute.
	* c-common.c (handle_novops_attribute): New function.
	(c_common_attribute_table): Add "no vops" entry.
	* c-decl.c (merge_decls): Copy DECL_IS_NOVOPS.
	* calls.c (flags_from_decl_or_type): Set ECF_NOVOPS.
	* tree-ssa-operands.c (get_call_expr_operands): Do not
	create virtual operands for calls with ECF_NOVOPS flag.
	* tree.h (DECL_IS_NOVOPS): New macro.
	(struct tree_decl): Add novops_flag.
	(ECF_NOVOPS): New constant.

From-SVN: r96438
2005-03-14 16:21:16 +00:00
Alexey Neyman 6e9a32219b re PR c/14411 (Request for setjmp/longjmp attributes)
PR c/14411
        * calls.c (flags_from_decl_or_type): Handle eturns_twice' attribute.
        * c-common.c (handle_returns_twice): New function.
        (c_common_attribute_table): Declare eturns_twice' attribute.
        * doc/extend.texi: Document eturns_twice' attribute.
        * tree.h (DECL_IS_RETURNS_TWICE): New macro.
        (struct tree_decl): Add returns_twice_flag.

From-SVN: r96101
2005-03-08 05:19:40 -08:00
Kazu Hirata 0405cc0e8d * calls (stack_arg_under_construction): Make it static.
From-SVN: r96012
2005-03-07 13:45:38 +00:00
Kazu Hirata 321cf1f25e calls.c (emit_call_1): Don't use REG_ALWAYS_RETURN.
* calls.c (emit_call_1): Don't use  REG_ALWAYS_RETURN.
	(emit_library_call_value_1): Don't use LCT_ALWAYS_RETURN and
	REG_ALWAYS_RETURN.
	* cfgrtl.c (need_fake_edge_p): Likewise.
	* combine.c (distribute_notes): Likewise.
	* emit-rtl.c (try_split): Likewise.
	* recog.c (peephole2_opimize): Likewise.
	* reg-notes.def (ALWAYS_RETURN): Remove.
	* rtl.h (LCT_ALWAYS_RETURN): Remove.
	* tree-cfg.c (need_fake_edge_p): Don't use ECF_ALWAYS_RETURN.
	* tree.h (ECF_ALWAYS_RETURN): Remove.

From-SVN: r95690
2005-02-28 18:18:26 +00:00
Steven Bosscher ead553a1d9 re PR middle-end/19616 (missed tail call)
PR middle-end/19616
	* tree.h (CALL_EXPR_TAILCALL): Add comment.
	* calls.c (check_sibcall_argument_overlap_1): Revert the change
	to this function from 2004-07-10.
	* tree-tailcall.c (suitable_for_tail_opt_p): Do not consider the
	the current function for tail call optimizations if the address
	of one of it its arguments is taken.

From-SVN: r94265
2005-01-26 15:08:50 +00:00
Eric Botcazou 8c96cd51c7 calls.c (expand_call): Check DECL_BUILT_IN_CLASS before accessing DECL_FUNCTION_CODE.
* calls.c (expand_call): Check DECL_BUILT_IN_CLASS before
	accessing DECL_FUNCTION_CODE.
	* dojump.c (do_jump): Likewise.
	* gimplify.c (gimplify_call_expr): Likewise.
	* predict.c (expr_expected_value): Likewise.
	(strip_builtin_expect): Likewise.
	* tree-inline.c (estimate_num_insns_1): Likewise.
	* tree-ssa-loop-im.c (stmt_cost): Likewise
	* fold-const.c (fold): Test for BUILT_IN_NORMAL.
	(tree_expr_nonnegative_p): Likewise.

From-SVN: r93864
2005-01-18 23:06:59 +00:00
Alan Modra bfc45551d5 re PR target/18916 (mis-aligned vector code with copy memory (-maltivec))
PR target/18916
	* builtins.c (std_gimplify_va_arg_expr): Adjust alignment of *ap.
	* expr.h (struct locate_and_pad_arg_data): Add "boundary".
	* function.c (locate_and_pad_parm): Set new field.
	(assign_parm_find_stack_rtl): Use it instead of FUNCTION_ARG_BOUNDARY.
	Tweak where_pad test to include "none".  Always set mem align for
	stack_parm.
	(assign_parm_adjust_stack_rtl): Discard stack_parm if alignment
	not sufficient for type.
	(assign_parm_setup_block): If stack_parm is zero on entry, always
	make a new stack local.  Block move old stack parm if necessary
	to new aligned stack local.
	(assign_parm_setup_stack): Use a block move to handle
	potentially misaligned entry_parm.
	(assign_parms_unsplit_complex): Specify required alignment when
	creating stack local.
	* calls.c (compute_argument_addresses): Override alignment of stack
	arg calculated from its type with the alignment given by
	FUNCTION_ARG_BOUNDARY.
	(store_one_arg): Likewise.

From-SVN: r93179
2005-01-11 20:21:17 +10:30
Richard Henderson 78a52f1158 target.h (targetm.calls.arg_partial_bytes): New.
* target.h (targetm.calls.arg_partial_bytes): New.
	* target-def.h (TARGET_ARG_PARTIAL_BYTES): New.
	* calls.c (store_unaligned_arguments_into_pseudos): Update for
	partial in bytes.
	(load_register_parameters): Likewise.
	(store_one_arg): Likewise.
	(initialize_argument_information): Use targetm.calls.arg_partial_bytes.
	(emit_library_call_value_1): Likewise.
	* expr.c (block_move_libcall_safe_for_call_parm): Likewise.
	(emit_push_insn): Update for partial in bytes.
	* expr.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* function.c (assign_parm_find_entry_rtl): Use
	targetm.calls.arg_partial_bytes.  Update for result in bytes.
	(locate_and_pad_parm): Update for partial in bytes.
	* system.h (FUNCTION_ARG_PARTIAL_NREGS): Poison.
	* targhooks.c (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): New.
	* targhooks.h (hook_int_CUMULATIVE_ARGS_mode_tree_bool_0): Declare.
	* doc/tm.texi (TARGET_ARG_PARTIAL_BYTES): Rename and update from
	FUNCTION_ARG_PARTIAL_NREGS.

	* config/arc/arc.h, config/c4x/c4x.h, config/i386/i386.h,
	config/i860/i860.h, config/m68hc11/m68hc11.h, config/m68k/m68k.h,
	config/pdp11/pdp11.h, config/s390/s390.h, config/stormy16/stormy16.h,
	config/xtensa/xtensa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.

	* config/alpha/alpha.c (alpha_arg_partial_bytes): New.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/alpha/alpha.h, config/alpha/unicosmk.h,
	config/alpha/vms.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.

	* config/arm/arm.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
	* config/arm/arm.c (arm_arg_partial_bytes): ... here.
	(TARGET_ARG_PARTIAL_BYTES): New.

	* config/cris/cris.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
	* config/cris/cris.c (cris_arg_partial_bytes): ... here.
	(TARGET_ARG_PARTIAL_BYTES): New.

	* config/fr30/fr30.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/fr30/fr30.c (fr30_arg_partial_bytes): Rename from
	fr30_function_arg_partial_nregs.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/fr30/fr30-protos.h: Update.

	* config/frv/frv.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/frv/frv.c (frv_arg_partial_bytes): Rename from
	frv_function_arg_partial_nregs.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/frv/frv-protos.h: Update.

	* config/ia64/ia64.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/ia64/ia64.c (ia64_arg_partial_bytes): Rename from
	ia64_function_arg_partial_nregs.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/ia64/ia64-protos.h: Update.

	* config/iq2000/iq2000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/iq2000/iq2000.c (iq2000_arg_partial_bytes): Rename from
	function_arg_partial_nregs.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/iq2000/iq2000-protos.h: Update.

	* config/m32r/m32r.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/m32r/m32r.c (m32r_arg_partial_bytes): Rename from
	function_arg_partial_nregs.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/m32r/m32r-protos.h: Update.

	* config/mcore/mcore.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/mcore/mcore.c (mcore_arg_partial_bytes): Rename from
	mcore_function_arg_partial_nregs.  Adjust to return bytes.
        (TARGET_ARG_PARTIAL_BYTES): New.
	* config/mcore/mcore-protos.h: Update.

	* config/mips/mips.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/mips/mips.c (mips_arg_partial_bytes): Rename from
	function_arg_partial_nregs.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/mips/mips-protos.h: Update.

	* config/mn10300/mn10300.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/mn10300/mn10300.c (mn10300_arg_partial_bytes): Rename from
	function_arg_partial_nregs.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/mn10300/mn10300-protos.h: Update.

	* config/ns32k/ns32k.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
	* config/ns32k/ns32k.c (ns32k_arg_partial_bytes): ... here.
	(TARGET_ARG_PARTIAL_BYTES): New.

	* config/pa/pa.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/pa/pa.c (pa_arg_partial_bytes): Rename from
	function_arg_partial_nregs.  Handle 32-bit.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/pa/pa-protos.h: Update.

	* config/rs6000/rs6000.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/rs6000/rs6000.c (rs6000_arg_partial_bytes): Rename from
	function_arg_partial_nregs.  Adjust to return bytes.
	(TARGET_ARG_PARTIAL_BYTES): New.
	* config/rs6000/rs6000-protos.h: Update.

	* config/sh/sh.h (FUNCTION_ARG_PARTIAL_NREGS): Move ...
	* config/sh/sh.c (sh_arg_partial_bytes): ... here.
	(TARGET_ARG_PARTIAL_BYTES): New.

	* config/sparc/sparc.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/sparc/sparc.c (sparc_arg_partial_bytes): Rename from
	function_arg_partial_nregs.  Adjust to return bytes.
        (TARGET_ARG_PARTIAL_BYTES): New.
	* config/sparc/sparc-protos.h: Update.

	* config/v850/v850.h (FUNCTION_ARG_PARTIAL_NREGS): Remove.
	* config/v850/v850.c (v850_arg_partial_bytes): Rename from
        function_arg_partial_nregs.  Adjust to return bytes.
        (TARGET_ARG_PARTIAL_BYTES): New.
	* config/v850/v850-protos.h: Update.

From-SVN: r92726
2004-12-29 19:08:18 -08:00
Alexandre Oliva faa003343e re PR target/16819 (ICE with empty struct as arg)
gcc/ChangeLog:
PR target/16819
* calls.c (load_register_parameters): Don't call use_regs when
nregs is zero.
gcc/testsuite/ChangeLog:
PR target/16891
* gcc.dg/empty2.c: New.

From-SVN: r92551
2004-12-23 16:09:01 +00:00
Richard Sandiford bef5d8b61f optabs.h (force_expand_binop): Declare.
* optabs.h (force_expand_binop): Declare.
	* optabs.c (force_expand_binop): Export.
	* stmt.c (shift_return_value): Delete.
	(expand_return): Don't call it.
	* expr.h (shift_return_value): Declare.
	* calls.c (shift_returned_value): Delete in favor of...
	(shift_return_value): ...this new function.  Leave the caller to check
	for non-BLKmode values passed in the msb of a register.  Take said mode
	and a shift direction as argument.  Operate on the hard function value,
	not a pseudo.
	(expand_call): Adjust accordingly.
	* function.c (expand_function_start): If a non-BLKmode return value
	is padded at the last significant end of the return register, use the
	return value's natural mode for the DECL_RESULT, not the mode of the
	padded register.
	(expand_function_end): Shift the same sort of return values left by
	the appropriate amount.

From-SVN: r91187
2004-11-24 18:50:26 +00:00
Zack Weinberg 6e14af161c function.h (struct function): Remove calls_longjmp.
* function.h (struct function): Remove calls_longjmp.
	(current_function_calls_longjmp): Delete.
	* tree.h (ECF_LONGJMP): Delete.
	(ECF_SIBCALL, ECF_PURE, ECF_SP_DEPRESSED, ECF_ALWAYS_RETURN)
	(ECF_LIBCALL_BLOCK): Everybody slide down one.
	(ECF_CONST, ECF_NORETURN, ECF_SIBCALL): Clarify comments.
	* builtins.c (expand_builtin_longjmp): Don't set
	current_function_calls_longjmp.
	* calls.c (special_function_p): Mark longjmp and siglongjmp
	with ECF_NORETURN, not ECF_LONGJMP.
	(emit_call_1, expand_call, emit_library_call_value_1):
	Don't check for ECF_LONGJMP.
	* tree-cfg.c (make_exit_edges, is_ctrl_altering_stmt)
	(need_fake_edge_p): Likewise.

	* config/avr/avr.h, config/ip2k/ip2k.h: Don't define NON_SAVING_SETJMP.
	* system.h: Poison NON_SAVING_SETJMP.
	* function.c (use_register_for_decl)
	* gcse.c (compute_hash_table_work, compute_store_table)
	* postreload-gcse.c (record_opr_changes)
	* reload.c (find_equiv_reg)
	* reload1.c (reload)
	* config/i386/i386.c (ix86_can_use_return_insn_p):
	Remove code conditional on NON_SAVING_SETJMP.
	* doc/tm.texi: Delete documentation of NON_SAVING_SETJMP.

	* config/i386/sysv3.h: Delete file.
	* config/i386/i386.c (ix86_svr3_asm_out_constructor): Delete.

From-SVN: r91101
2004-11-23 19:55:24 +00:00
Dale Johannesen 5628fde184 calls.c (expand_call): Do not call preserve_temp_slots.
2004-11-22  Dale Johannesen  <dalej@apple.com>

        * calls.c (expand_call): Do not call preserve_temp_slots.

From-SVN: r91038
2004-11-22 22:11:30 +00:00
Richard Henderson 8df3dbb75b re PR middle-end/18480 (ICE in emit_group_move with recent change)
PR 18480
        * calls.c (struct arg_data): Add parallel_value.
        (precompute_register_parameters): Set it.
        (load_register_parameters): Use it.
        (store_one_arg): Also set it here.

From-SVN: r90649
2004-11-14 20:04:03 -08:00
Richard Henderson 27e29549a0 calls.c (precompute_register_parameters): Force all PARALLELs into pseudo registers.
* calls.c (precompute_register_parameters): Force all PARALLELs
        into pseudo registers.
        (load_register_parameters): Copy PARALLELs into hard registers.
        * function.c (assign_parm_setup_block): Copy PARALLELS into
        pseudo registers.  Do emit_group_store in conversion_insns.
        * expr.c (emit_group_load_1): Rename from emit_group_load, take
        tmps as an argument.  Move final copy loop ...
        (emit_group_load): ... here.  New function.
        (emit_group_load_into_temps, emit_group_move_into_temps): New.
        * expr.h: Declare them.

From-SVN: r90613
2004-11-13 22:22:56 -08:00
Kazu Hirata 2f2b4a02c7 calls.c (split_complex_values, [...]): Make them static.
* calls.c (split_complex_values, split_complex_types): Make
	them static.
	* expr.h: Remove the corresponding prototypes.

From-SVN: r90281
2004-11-08 19:03:17 +00:00
Richard Henderson 6cdd56724a function.c (reference_callee_copied): New.
* function.c (reference_callee_copied): New.
        (assign_parm_setup_reg): Use it.
        * calls.c (initialize_argument_information): Likewise.
        (emit_library_call_value_1): Likewise.
        * function.h (reference_callee_copied): Declare.

        * target.h (struct gcc_target): Add callee_copies.
        * target-def.h (TARGET_CALLEE_COPIES): New.
        (TARGET_PASS_BY_REFERENCE): Update default.
        * expr.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * targhooks.c (hook_callee_copies_named): New.
        (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_false): Rename from
        hook_pass_by_reference_false.
        (hook_bool_CUMULATIVE_ARGS_mode_tree_bool_true): New.
        * targhooks.h: Update decls.
        * config/arc/arc.c (TARGET_CALLEE_COPIES): New.
        * config/arc/arc.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/frv/frv-protos.h (frv_function_arg_callee_copies): Remove.
        * config/frv/frv.c (frv_function_arg_callee_copies): Remove.
        * config/frv/frv.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/iq2000/iq2000.c (TARGET_CALLEE_COPIES): New.
        * config/iq2000/iq2000.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/m68hc11/m68hc11.c (TARGET_CALLEE_COPIES): New.
        * config/m68hc11/m68hc11.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/mips/mips.c (TARGET_CALLEE_COPIES): New.
        (mips_callee_copies): New.
        * config/mips/mips.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/mmix/mmix.c (TARGET_CALLEE_COPIES): New.
        * config/mmix/mmix.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/mn10300/mn10300.c (TARGET_CALLEE_COPIES): New.
        * config/mn10300/mn10300.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/pa/pa.c (TARGET_CALLEE_COPIES): New.
        * config/pa/pa.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/sh/sh.c (sh_callee_copies): New.
        (TARGET_CALLEE_COPIES): New.
        * config/sh/sh.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * config/v850/v850.c (TARGET_CALLEE_COPIES): New.
        * config/v850/v850.h (FUNCTION_ARG_CALLEE_COPIES): Remove.
        * doc/tm.texi (TARGET_CALLEE_COPIES): Replace documentation
        for FUNCTION_ARG_CALLEE_COPIES.
        * doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Update.

From-SVN: r87195
2004-09-08 11:45:21 -07:00
Nathan Sidwell 366de0ce7d c-aux-info.c (gen_type): Use gcc_assert or gcc_unreachable.
* c-aux-info.c (gen_type): Use gcc_assert or gcc_unreachable.
	* c-common.c (c_type_hash, c_common_nodes_and_builtins,
	c_expand_expr, boolean_increment, nonnull_check_p,
	check_function_arguments_recurse, fold_offsetof_1): Likewise.
	* c-cppbuiltin.c (define__GNUC__, builtin_define_stdint_macros,
	builtin_define_type_max): Likewise.
	* c-decl.c (bind, pop_scope, merge_decls, pushdecl_top_level,
	implicit_decl_warning, builtin_function, build_compound_literal,
	complete_array_type, grokdeclarator, get_parm_info,
	start_function, store_parm_decls_oldstyle,
	c_write_global_declarations): Likewise.
	* c-format.c (get_constant, decode_format_attr,
	maybe_read_dollar_number, get_flag_spec, check_format_arg,
	check_format_types, format_type_warning,
	find_char_info_specifier_index, init_dynamic_asm_fprintf_info,
	init_dynamic_diag_info, handle_format_attribute): Likewise.
	* c-gimplify.c (push_context, pop_context, finish_bc_block):
	* c-lex.c (c_lex_with_flags, lex_string): Likewise.
	* c-objc-common.c (c_tree_printer): Likewise.
	* c-pch.c (pch_init): Likewise.
	* c-pragma.c (maybe_apply_pragma_weak): Likewise.
	* c-pretty-print.c (pp_c_tree_decl_identifier): Likewise.
	* c-typeck.c (c_incomplete_type_error, composite_type,
	common_pointer_type, common_type, same_translation_unit_p,
	tagged_types_tu_compatible_p, finish_init, pop_init_level,
	set_designator, set_nonincremental_init_from_string,
	process_init_element, c_finish_if_stmt): Likewise.
	* caller-save.c (init_caller_save, save_call_clobbered_regs,
	insert_restore, insert_save, insert_one_insn): Likewise.
	* calls.c (emit_call_1, compute_argument_block_size,
	precompute_arguments, expand_call, emit_library_call_value_1,
	store_one_arg): Likewise.

From-SVN: r87140
2004-09-07 10:19:00 +00:00
Richard Henderson 9969aaf67e re PR middle-end/17258 (gcc.c-torture/compile/20030224-1.c:16: internal compiler error: in expand_expr_addr_expr, at expr.c:6157)
PR middle-end/17258
        * calls.c (initialize_argument_information): Tighten pass-through
        conditions for pass-by-reference.  Remove dead TARGET_EXPR code.
        Use build_fold_addr_expr.
        (emit_library_call_value_1): Use build_fold_addr_expr.  Remove code
        that assumes ADDR_EXPR allocates stack space.
        * fold-const.c (build_fold_addr_expr_with_type): Look through
        WITH_SIZE_EXPR.

From-SVN: r86957
2004-09-01 23:47:01 -07:00
Nathan Sidwell 7d60be94d6 tree.h (build_int_cst): New, sign extended constant.
* tree.h  (build_int_cst): New, sign extended constant.
	(build_int_cstu): New, zero extended constant.
	(build_int_cst_wide): Renamed from build_int_cst.
	* tree.c (build_int_cst, build_int_cstu): New.
	(build_int_cst_wide): Renamed from build_int_cst.
	(make_vector_type, build_common_tree_nodes,
	build_common_tree_nodes_2): Adjust build_int_cst calls.
	* builtins.c (expand_builtin_prefetch, expand_builtin_strstr,
	expand_builtin_strpbrk, expand_builtin_fputs,
	build_string_literal, expand_builtin_printf,
	expand_builtin_sprintf, fold_builtin_classify_type,
	fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii,
	fold_builtin_toascii, fold_builtin_isdigit,
	simplify_builtin_strstr, simplify_builtin_strpbrk,
	fold_builtin_fputs, simplify_builtin_sprintf): Likewise.
	* c-common.c (start_fname_decls, fix_string_type, shorten_compare,
	DEF_ATTR_INT): Likewise.
	* c-decl.c (complete_array_type, check_bitfield_type_and_width):
	Likewise.
	* c-lex.c (interpret_integer, lex_charconst): Likewise.
	* c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise.
	* c-pretty-print.c (pp_c_integer_constant): Likewise.
	* c-typeck.c (really_start_incremental_init, push_init_level,
	set_nonincremental_init_from_string): Likewise.
	* calls.c (load_register_parameters): Likewise.
	convert.c (convert_to_pointer): Likewise.
	coverage.c (coverage_counter_alloc, tree_coverage_counter_ref,
	build_fn_info_type, build_fn_info_value, build_ctr_info_value,
	build_gcov_info): Likewise.
	* except.c (init_eh, assign_filter_values): Likewise.
	* expmed.c (store_fixed_bit_field, extract_bit_field,
	extract_fixed_bit_field, extract_split_bit_field, expand_shift,
	expand_mult_const, expand_mult_highpart_adjust, extract_high_half,
	expand_sdiv_pow2, expand_divmod, make_tree): Likewise.
	* expr.c (convert_move, emit_group_load, emit_group_store,
	expand_assignment, store_constructor, store_field,
	expand_expr_real_1, reduce_to_bit_field_precision): Likewise.
	fold-const.c (force_fit_type, int_const_binop, fold_convert_const,
	invert_truthvalue, optimize_bit_field_compare,
	decode_field_reference, all_ones_mask_p, constant_boolean_node,
	fold_div_compare, fold, fold_read_from_constant_string,
	fold_negate_const, fold_abs_const, fold_not_const, round_up,
	round_down): Likewise.
	* function.c (assign_parm_setup_block): Likewise.
	* stmt.c (shift_return_value, expand_case, estimate_case_costs):
	Likewise.
	* stor-layout.c (layout_type, initialize_sizetypes,
	set_min_and_max_values_for_integral_type): Likewise.
	* tree-chrec.c (chrec_fold_multiply_poly_poly,
	reset_evolution_in_loop): Likewise.
	* tree-chrec.h (build_polynomial_chrec): Likewise.
	* tree-complex.c (build_replicated_const): Likewise.
	* tree-eh.c (honor_protect_cleanup_actions,
	lower_try_finally_onedest, lower_try_finally_copy,
	lower_try_finally_switch): Likewise.
	* tree-mudflap.c (mf_build_string, mx_register_decls,
	mudflap_register_call, mudflap_enqueue_constant): Likewise.
	* tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref):
	Likewise.
	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
	* tree-ssa-loop-niter.c (number_of_iterations_cond,
	loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type):
	Likewise.
	* tree-ssa-loop-ivcanon.c (create_canonical_iv,
	canonicalize_loop_induction_variables): Likewise.
	* tree-vectorizer.c (vect_create_index_for_array_ref,
	vect_transform_loop_bound, vect_compute_data_ref_alignment):
	Likewise.

	* config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start,
	alpha_gimplify_va_arg_1): Likewise.
	* config/arm/arm.c (arm_get_cookie_size): Likewise.
	* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
	* config/mips/mips.c (mips_build_builtin_va_list, mips_va_start,
	mips_gimplify_va_arg_expr): Likewise.
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg,
	add_compiler_branch_island): Likewise.
	* config/s390/s390.c (s390_va_start): Likewise.
	* config/sh/sh.c (sh_va_start): Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
	Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start,
	xtensa_gimplify_va_arg_expr): Likewise.

	* objc/objc-act.c (build_objc_string_object,
	build_objc_symtab_template, init_def_list, init_objc_symtab,
	init_module_descriptor, generate_static_references,
	build_selector_translation_table, get_proto_encoding,
	build_typed_selector_reference, build_selector_reference,
	build_next_objc_exception_stuff,
	build_method_prototype_list_template, generate_descriptor_table,
	generate_protocols, build_protocol_initializer,
	build_ivar_list_template, build_method_list_template,
	build_ivar_list_initializer, generate_ivars_list,
	generate_dispatch_table, generate_protocol_list,
	build_category_initializer, build_shared_structure_initializer,
	generate_shared_structures, handle_impent,
	generate_objc_image_info): Likewise.

2004-04-25  Paolo Bonzini  <bonzini@gnu.org>

	* cfglayout.c (duplicate_insn_chain): Remove references to
	NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT.
	* cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator.
	* cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT.
	* final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP
	and NOTE_INSN_LOOP_CONT.
	* insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove.
	* jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP
	and NOTE_INSN_LOOP_CONT.
	* loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop,
	check_dbra_loop, loop_dump_aux): Remove references to removed notes
	and fields.
	* reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs.
	* unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove
	references to removed notes and fields.
	(subtract_reg_term, ujump_to_loop_cont): Remove.

From-SVN: r86544
2004-08-25 09:52:54 +00:00
Richard Henderson 389fdba06a rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
* rtl.h (MEM_READONLY_P): Replace RTX_UNCHANGING_P.
	* alias.c (true_dependence): Update to match new semantics.
	(canon_true_dependence, write_dependence_p): Likewise.
	(anti_dependence, output_dependence): Update write_dependence_p args.
	(unchanging_anti_dependence): Remove.
	* calls.c (purge_mem_unchanging_flag): Remove.
	(fixup_tail_calls): Don't call it.
	(expand_call): Don't add unchanging memory to function usage.
	* expr.c (emit_block_move_via_libcall): Likewise.
	(clear_storage_via_libcall): Don't clobber RTX_UNCHANGING_P mems.
	(get_subtarget): Don't use RTX_UNCHANGING_P.
	(expand_assignment, store_constructor, expand_expr_real_1): Likewise.
	(do_tablejump): Set MEM_READONLY_P, not RTX_UNCHANGING_P.
	* combine.c (get_last_value_validate): Use MEM_READONLY_P.
	* cse.c (insert): Don't use RTX_UNCHANGING_P.
	(cse_insn, canon_hash): Use MEM_READONLY_P.
	* emit-rtl.c (set_mem_attributes_minus_bitpos): Use MEM_READONLY_P
	instead of RTX_UNCHANGING_P.
	* explow.c (maybe_set_unchanging): Remove.
	* expr.h (maybe_set_unchanging): Remove.
	* flow.c (insn_dead_p, mark_used_regs): Use anti_dependence.
	* function.c (assign_stack_temp_for_type): Don't use RTX_UNCHANGING_P.
	(assign_parm_setup_reg, expand_function_start): Likewise.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	* ra-rewrite.c (emit_colors): Likewise.
	* regmove.c (copy_src_to_dest, regmove_optimize): Likewise.
	(fixup_match_1): Likewise.
	* reload1.c (reload, alter_reg): Likewise.
	* local-alloc.c (validate_equiv_mem): Check MEM_READONLY_P,
	not RTX_UNCHANGING_P.
	(equiv_init_varies_p): Likewise.
	* loop-invariant.c (check_maybe_invariant): Likewise.
	* resource.c (mark_referenced_resources, mark_set_resources): Likewise.
	* loop.c (note_addr_stored): Likewise.
	(prescan_loop): Likewise. Don't check function usage for clobbered
	unchanging memory.
	* rtlanal.c (rtx_unstable_p): Check MEM_READONLY_P,
        not RTX_UNCHANGING_P.
	(rtx_varies_p, modified_between_p, modified_in_p): Likewise.
	* varasm.c (force_const_mem): Likewise.
	* stmt.c (expand_decl): Don't set RTX_UNCHANGING_P.
	* web.c (entry_register): Likewise.
	* tree-gimple.h (get_base_address): Move decl ...
	* tree.h: ... here.
	* doc/rtl.texi (MEM_READONLY_P): Replace RTX_UNCHANGING_P.

	* config/alpha/alpha.c (alpha_set_memflags_1): Rewrite to be
	called via for_each_rtx.  Copy MEM_SCALAR_P, MEM_NOTRAP_P too.
	(alpha_set_memflags): Update to match.

	* config/darwin.c (machopic_indirect_data_reference): Set
	MEM_READONLY_P instead of RTX_UNCHANGING_P.
	(machopic_indirect_call_target): Likewise.
	(machopic_legitimize_pic_address): Likewise.
	* config/arm/arm.c (legitimize_pic_address, arm_gen_load_multiple,
	arm_gen_store_multiple, arm_gen_movmemqi): Likewise.
	* config/arm/arm.md (load_multiple, store_multiple): Likewise.
	* config/frv/frv.md (symGOT2reg): Likewise.
	* config/i386/i386.c (legitimize_pic_address,
	legitimize_tls_address, ix86_split_to_parts): Likewise.
	* config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
	* config/ia64/ia64.md (load_fptr): Likewise.
	* config/m32r/m32r.c (m32r_legitimize_pic_address): Likewise.
	* config/m68k/m68k.c (legitimize_pic_address): Likewise.
	* config/mcore/mcore.c (block_move_sequence): Likewise.
	* config/mn10300/mn10300.md (symGOT2reg): Likewise.
	* config/pa/pa.c (legitimize_pic_address): Likewise.
	* config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
	(rs6000_emit_move): Likewise.
	* config/s390/s390.c (legitimize_pic_address): Likewise.
	(legitimize_tls_address): Likewise.
	* config/s390/s390.md (casesi): Likewise.
	* config/sh/sh.c (prepare_move_operands, sh_reorg): Likewise.
	* config/sh/sh.md (symGOT2reg): Likewise.
	* config/sparc/sparc.c (legitimize_pic_address): Likewise.
	* config/v850/v850.md (casesi): Likewise.

	* config/ia64/ia64.c (gen_thread_pointer): Don't set RTX_UNCHANGING_P.
	* config/iq2000/iq2000.c (save_restore_insns): Likewise.
	* config/mips/mips.c (mips_restore_gp): Likewise.
	(mips_save_restore_reg, mips16_gp_pseudo_reg): Likewise.
	* config/sh/sh.c (sh_reorg): Likewise.

From-SVN: r86178
2004-08-18 01:25:01 -07:00
Paolo Bonzini 7c27e184c8 Makefile.in: Regenerate.
2004-08-17  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in: Regenerate.
	* configure: Regenerate.

	* Makefile.def (bootstrap-stage): Rename extra_*_flags to
	stage_*_flags.
	* Makefile.tpl (configure-[+module+], all-[+module+]): Exit
	for bootstrapped modules if toplevel bootstrap is going.
	(GCC bootstrap): Generate per-stage targets for all bootstrapped
	modules.  Adjust for changes in Makefile.def.  Enable several
	rules even in non-bootstrap mode, just to avoid peppering the
	template with unnecessary "@if/@endif gcc-bootstrap" pairs.
	(stage-[+prev+]-bubble): Remove.

	* Makefile.def (Dependencies): Depend on all-build-bison,
	all-build-flex, all-build-byacc, all-build-texinfo, rather
	than the host variations.
	* Makefile.tpl (BUILD_DIR_PREFIX): Remove.  Replace throughout
	with BUILD_SUBDIR.
	(BISON): Update for recent Bisons.
	(YACC): Fix typo.
	(cross): Depend on all-build.
	(all): Do not depend on all-build.
	(prebootstrap): Remove.
	(dep-kind): Accept separate prefixes for MODULE and ON variables.
	(Prebootstrap dependencies): Add them to the per-stage targets
	and to all-prebootstrap.
	* configure.in (build_configdirs): Always enable build_tools.
	(BUILD_DIR_PREFIX): Remove.

	* Makefile.def (gcc): Add target variable.
	(gdb, expect, guile, tk, tix): Replace with_x with extra_make_flags.
	* Makefile.tpl (Autogenerated `all-*' targets): Invoke $(TARGET-*)
	in the recursive `make', instead of hardwiring `all'.
	(Autogenerated TARGET-* variables): New.

gcc/ChangeLog:
2004-08-17  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Trust toplevel's notion of BISON/FLEX/MAKEINFO.
	No need to check if in a cross configuration.
	* configure: Regenerate.

	* calls.c (precompute_register_parameters):
	Inline preserve_subexpressions_p ().
	* expmed.c (expand_mult_const, emit_store_flag): Likewise.
	* optabs.c (expand_binop, expand_twoval_binop, prepare_cmp_insn):
	Likewise.
	* expr.c (get_subtarget): Likewise.
	* rtl.h (preserve_subexpressions_p): Remove.
	* stmt.c (preserve_subexpressions_p): Remove.

	* dojump.c (do_jump) <COND_EXPR, EQ_EXPR, NE_EXPR,
	TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, COMPOUND_EXPR>:
	Abort on gimplified cases.

From-SVN: r86111
2004-08-17 07:27:16 +00:00
Nathan Sidwell 16e9be4c09 calls.c (load_register_parameters): Remove spurious FIXME token.
From-SVN: r86048
2004-08-16 08:02:26 +00:00
Nathan Sidwell 4a90aeeb51 tree.h (build_int_cst): New.
.:	* tree.h (build_int_cst): New.
	(build_int_2): Remove.
	* tree.c (build_int_2): Remove.
	(build_int_cst): New.
	(make_vector_type, build_common_tree_nodes,
	build_common_tree_nodes_2): Use build_int_cst.
	* builtins.c (expand_builtin_prefetch, expand_builtin_strstr,
	expand_builtin_strpbrk, expand_builtin_fputs,
	build_string_literal, expand_builtin_printf,
	expand_builtin_sprintf, fold_builtin_lround, fold_builtin_bitop,
	fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii,
	fold_builtin_isdigit, simplify_builtin_strstr,
	simplify_builtin_strpbrk, fold_builtin_fputs,
	simplify_builtin_sprintf): Use build_int_cst.
	* c-common.c (start_fname_decls, fix_string_type,
	c_common_nodes_and_builtins, c_init_attributes,
	shorten_compare): Likewise.
	* c-decl.c (complete_array_type,
	check_bitfield_type_and_width): Likewise.
	* c-lex.c (interpret_integer, lex_charconst): Likewise.
	* c-parse.in (primary): <TYPES_COMPATIBLE_P> Likewise.
	* c-pretty-print.c (pp_c_integer_constant): Likewise.
	* c-typeck.c (really_start_incremental_init, push_init_level,
	set_nonincremental_init_from_string): Likewise.
	* calls.c (load_register_parameters): Likewise.
	* convert.c (convert_to_pointer): Likewise.
	* coverage.c (coverage_counter_alloc, tree_coverage_counter_ref,
	build_fn_info_type, build_ctr_info_value, build_gcov_info):
	Likewise.
	* except.c (init_eh, assign_filter_values, assign_filter_values):
	Likewise.
	* expmed.c (store_fixed_bit_field, extract_bit_field,
	extract_fixed_bit_field, extract_split_bit_field, expand_shift,
	expand_mult_const, expand_mult_highpart_adjust, extract_high_half,
	expand_sdiv_pow2, expand_divmod, make_tree): Likewise.
	* expr.c (convert_move, emit_group_load, emit_group_store,
	expand_assignment, store_constructor, store_field,
	expand_expr_real_1, reduce_to_bit_field_precision): Likewise.
	* fold-const.c (force_fit_type, int_const_binop, fold_convert_const,
	invert_truthvalue, optimize_bit_field_compare,
	decode_field_reference, all_ones_mask_p, constant_boolean_node,
	fold_div_compare, fold, fold_read_from_constant_string,
	fold_negate_const, fold_abs_const, fold_not_const): Likewise.
	* function.c (assign_parm_setup_block): Likewise.
	* stmt.c (shift_return_value, expand_end_case_type,
	estimate_case_costs): Likewise.
	* stor-layout.c (layout_type, initialize_sizetypes,
	set_min_and_max_values_for_integral_type): Likewise.
	* tree-chrec.c (chrec_fold_multiply_poly_poly,
	reset_evolution_in_loop): Likewise.
	* tree-chrec.h (build_polynomial_chrec): Likewise.
	* tree-complex.c (build_replicated_const): Likewise.
	* tree-eh.c (honor_protect_cleanup_actions,
	lower_try_finally_onedest, lower_try_finally_copy,
	lower_try_finally_switch): Likewise.
	* tree-mudflap.c (mf_build_string, mx_register_decls,
	mudflap_register_call, mudflap_enqueue_constant): Likewise.
	* tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise.
	* tree-pretty-print.c (dump_generic_node): Likewise.
	* tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref):
	Likewise.
	* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
	* tree-ssa-loop-niter.c (number_of_iterations_cond,
	loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type):
	Likewise.

	* config/alpha/alpha.c (alpha_initialize_trampoline,
	alpha_va_start, alpha_gimplify_va_arg_1): Use build_int_cst.
	* config/arm/arm.c (arm_get_cookie_size): Likewise.
	* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
	* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
	* config/i860/i860.c (i860_va_start): Likewise.
	* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
	* config/mips/mips.c (mips_build_builtin_va_list, mips_va_start,
	mips_gimplify_va_arg_expr): Likewise.
	* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
	* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg,
	add_compiler_branch_island): Likewise.
	* config/s390/s390.c (s390_va_start): Likewise.
	* config/sh/sh.c (sh_va_start): Likewise.
	* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
	Likewise.
	* config/xtensa/xtensa.c (xtensa_va_start,
	xtensa_gimplify_va_arg_expr): Likewise.

	* objc/objc-act.c (build_objc_string_object,
	build_objc_symtab_template, init_def_list, init_objc_symtab,
	init_module_descriptor, generate_static_references,
	build_selector_translation_table, get_proto_encoding,
	build_typed_selector_reference, build_selector_reference,
	build_next_objc_exception_stuff,
	build_method_prototype_list_template, generate_descriptor_table,
	generate_protocols, build_protocol_initializer,
	build_ivar_list_template, build_method_list_template,
	build_ivar_list_initializer, generate_ivars_list,
	generate_dispatch_table, generate_protocol_list,
	build_category_initializer, build_shared_structure_initializer,
	generate_shared_structures, handle_impent,
	generate_objc_image_info): Use build_int_cst.
ada:
	* cuintp.c (UI_To_gnu): Use build_int_cst..
	* trans.c (Exception_Handler_to_gnu_sjlj, gnat_to_gnu): Likewise.
	* utils.c (init_gigi_decls): Likewise.
	* utils2.c (build_call_raise): Likewise.
cp:
	* call.c (convert_class_to_reference,
	build_user_type_conversion_1, convert_like_real,
	build_java_interface_fn_ref, build_special_member_call): Use
	build_int_cst.
	* class.c (build_vtbl_initializer): Likewise.
	* cp-gimplify.c (cp_gimplify_expr): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	* decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
	* decl2.c (start_static_initialization_or_destruction,
	generate_ctor_or_dtor_function): Likewise.
	* except.c (build_throw): Likewise.
	* lex.c (cxx_init): Likewise.
	* mangle.c (write_integer_cst): Likewise.
	* rtti.c (build_headof, get_tinfo_decl_dynamic,
	build_dynamic_cast_1, ptr_initializer, ptm_initializer,
	get_pseudo_ti_init): Likewise.
	* search.c (get_dynamic_cast_base_type): Likewise.
	* tree.c (build_shared_int_cst): Likewise.
fortran:
	* trans-array.c (gfc_trans_array_constructor_value): Use
	build_int_cst.
	* trans-const.c (gfc_build_string_const,
	gfc_init_constants, gfc_conv_mpz_to_tree,
	gfc_conv_constant_to_tree): Likewise.
	* trans-decl.c (gfc_get_symbol_decl): Likewise.
	* trans-intrinsic.c (gfc_conv_intrinsic_ibits,
	gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
	* trans-io.c (add_case, set_error_locus, build_dt,
	transfer_expr): Likewise.
	* trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
	gfc_trans_stop, gfc_trans_character_select): Likewise.
	* trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
	* trans.c (gfc_trans_runtime_check): Likewise.
java:
	* boehm.c (get_boehm_type_descriptor): Use build_int_cst.
	* class.c (build_utf8_ref, build_static_field_ref,
	make_field_value, make_method_value, get_dispatch_table,
	make_class_data, emit_symbol_table, emit_catch_table): Likewise.
	* constants.c (get_tag_node,  build_ref_from_constant_pool,
	build_constants_constructor): Likewise.
	* decl.c (java_init_decl_processing): Likewise.
	* expr.c (build_java_array_length_access, build_newarray,
	expand_java_multianewarray, expand_java_pushc, expand_iinc,
	build_java_binop, build_field_ref, expand_java_add_case,
	expand_java_call, build_known_method_ref, build_invokevirtual,
	build_invokeinterface, build_jni_stub): Likewise.
	* java-gimplify.c (java_gimplify_new_array_init): Likewise.
	* jcf-parse.c (get_constant): Likewise.
	* lex.c (do_java_lex): Likewise.
	* parse.y (patch_binop, patch_unaryop, patch_cast,
	build_null_of_type, patch_newarray): Likewise.
	* resource.c (compile_resource_data): Likewise.
	* typeck.c (build_prim_array_type): Likewise.

From-SVN: r86022
2004-08-15 15:45:33 +00:00
Eric Christopher 9f63daea37 c-common.c (c_common_unsafe_for_reeval): Delete.
2004-07-28  Eric Christopher  <echristo@redhat.com>

	* c-common.c (c_common_unsafe_for_reeval): Delete.
	* c-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete use.
	* c-pretty-print.c (pp_c_expression): Delete UNSAVE_EXPR case.
	* calls.c (fix_unsafe_tree): Delete.
	(expand_call): Delete code which used above.
	* dojump.c (do_jump): Delete UNSAVE_EXPR case.
	* expr.c (expand_expr_real_1): Ditto.
	* fold-const.c (non_lvalue): Ditto.
	* langhooks-def.h (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
	(lhd_unsafe_for_reeval): Ditto.
	* langhooks.c (lhd_unsafe_for_reeval): Ditto.
	* langhooks.h (unsafe_for_reeval): Ditto.
	(unsave_expr_now): Adjust comment.
	* tree-inline.c (copy_body_r): Delete UNSAVE_EXPR bits.
	(estimate_num_insns_1): Ditto.
	* tree-pretty-print.c (dump_generic_node): Ditto.
	* tree.c (expr_align): Ditto.
	(unsave_expr): Delete.
	(unsafe_for_reeval): Ditto.
	* tree.h (unsafe_for_reeval, unsave_expr): Ditto.
	* tree.def (UNSAVE_EXPR): Delete.
	* objc/objc-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.

2004-07-28  Eric Christopher  <echristo@redhat.com>

	* cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.

2004-07-28  Eric Christopher  <echristo@redhat.com>

	* lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Delete.
	(java_unsafe_for_reeval): Ditto.

From-SVN: r85276
2004-07-28 23:44:56 +00:00
Steven Bosscher 3fbd86b1a8 cfgexpand.c (tree_expand_cfg): Fix comment.
* cfgexpand.c (tree_expand_cfg): Fix comment.

	* calls.c (expand_call): Ignore rtx_equal_function_value_matters.
	* function.c (purge_single_hard_subreg_set, purge_hard_subreg_sets):
	Remove.
	(prepare_function_start): Don't set rtx_equal_function_value_matters.
	* integrate.c (copy_rtx_and_substitute): Don't test for it.
	* passes.c (rest_of_compilation): Don't call purge_hard_subreg_sets.
	Don't set rtx_equal_function_value_matters.  Don't register RTL hooks
	here again.  Update leading comment.
	* rtl.c (rtx_equal_function_value_matters): Remove.
	(rtx_equal_p): Don't test for it.
	* simplify-rtx.c (simplify_binary_operation, simplify_subreg):
	Likewise.

	* rtl.h (enum insn_note): Remove NOTE_INSN_LOOP_END_TOP_COND.
	* rtl.c (note_insn_name): Likewise.
	* emit-rtl.c (remove_unnecessary_notes): Don't handle it.
	* final.c (final_scan_insn): Likewise.

	* except.c (finish_eh_generation): Don't call cfg_cleanup from here.
	* passes.c (rest_of_handle_eh): Do it here.

	* stmt.c (struct nesting): Remove struct nesting block member.
	(struct stmt_status): Remove x_block_start_count field.
	(current_block_start_count): Remove.

From-SVN: r85228
2004-07-27 19:09:32 +00:00
Richard Henderson 95899b3495 calls.c (combine_pending_stack_adjustment_and_call): Make preferred_unit_stack_boundary argument unsigned.
* calls.c (combine_pending_stack_adjustment_and_call): Make
        preferred_unit_stack_boundary argument unsigned.  Make
        unadjusted_alignment unsigned.
        (expand_call): Make preferred_stack_boundary and
        preferred_unit_stack_boundary variables unsigned.
        * function.c (assign_stack_local_1): Make alignment unsigned.
        * function.h (struct function): Make stack_alignment_needed,
        preferred_stack_boundary unsigned.
        * config/i386/i386.c (ix86_preferred_stack_boundary): Make unsigned.
        (ix86_compute_frame_layout): Make stack_alignment_needed,
        preferred_alignment variables unsigned.
        * config/i386/i386.h (ix86_preferred_stack_boundary): Make unsigned.

From-SVN: r85196
2004-07-26 10:51:21 -07:00
Eric Christopher caf93cb0d5 builtins.c (expand_builtin_setjmp_receiver): Fix comment for code removal.
2004-07-21  Eric Christopher  <echristo@redhat.com>

	* builtins.c (expand_builtin_setjmp_receiver): Fix comment for code
	removal.
	* c-decl.c (pop_scope): Ditto.
	* calls.c (expand_call): Remove call to current_nesting_level,
	update comment accordingly. Remove calls to expand_start_target_temps
	and expand_end_target_temps.
	* cfgexpand.c (construct_init_block): Remove call to
	expand_start_bindings_and_block.
	(construct_exit_block): Remove call to expand_end_bindings.
	* expr.c (safe_from_p): Remove BIND_EXPR handling.
	(expand_expr_real_1): Ditto. Fix formatting.
	(expand_vars): Delete.
	* stmt.c (POPSTACK): Remove block_stack.
	(stmt_status): Remove x_block_stack.
	(block_stack): Delete.
	(expand_start_bindings_and_block): Ditto.
	(expand_start_target_temps): Ditto.
	(expand_end_target_temps): Ditto.
	(current_nesting_level): Ditto.
	(warn_about_unused_variables): Ditto.
	(expand_end_bindings): Ditto.
	* tree.h: Remove declarations for above.

2004-07-21  Eric Christopher  <echristo@redhat.com>

	* decl.c (poplevel): Inline unused variable checking.
	Change formatting.

From-SVN: r85019
2004-07-21 19:23:03 +00:00
Richard Henderson d25cee4d2b tree-def (WITH_SIZE_EXPR): New.
* tree-def (WITH_SIZE_EXPR): New.
        * explow.c (expr_size, int_expr_size): Handle WITH_SIZE_EXPR.
        * expr.c (expand_expr_real_1): Likewise.
        * gimplify.c (maybe_with_size_expr): New.
        (gimplify_arg, gimplify_modify_expr): Use it.
        (gimplify_modify_expr_to_memcpy): Take size parameter.
        (gimplify_modify_expr_to_memset): Likewise.
        (gimplify_expr): Handle WITH_SIZE_EXPR.
        * tree-alias-common.c (find_func_aliases): Likewise.
        * tree-eh.c (tree_could_trap_p): Likewise.
        (tree_could_throw_p): Likewise.
        * tree-gimple.c (is_gimple_lvalue): Likewise.
        (get_call_expr_in): Likewise.
        * tree-inline.c (estimate_num_insns_1): Likewise.
        (expand_calls_inline): Likewise.
        * tree-nested.c (convert_call_expr): Likewise.
        * tree-pretty-print.c (dump_generic_node): Likewise.
        * tree-sra.c (sra_walk_expr): Likewise.
        * tree-ssa-alias.c (add_pointed_to_expr): Likewise.
        * tree-ssa-ccp.c (get_rhs, set_rhs): Likewise.
        * tree-ssa-operands.c (get_expr_operands): Likewise.
        * tree-tailcall.c (find_tail_calls): Likewise.

        * calls.c (expand_call): Reset old_stack_allocated after
        calling emit_stack_restore.

        * gcc.c-torture/compile/20020210-1.c: Remove XFAIL.

From-SVN: r84833
2004-07-16 14:13:08 -07:00
Eric Christopher 7ae4ad2898 calls.c (expand_call): Fix typo in comment.
2004-07-14  Eric Christopher  <echristo@redhat.com>

	* calls.c (expand_call): Fix typo in comment.

From-SVN: r84719
2004-07-14 23:50:30 +00:00
Paolo Bonzini ad76cef84c expr.c (enqueue_insn, [...]): Remove.
2004-07-14  Paolo Bonzini  <bonzini@gnu.org>

	* expr.c (enqueue_insn, finish_expr_for_function,
	protect_from_queue, queued_subexp_p, mark_queue,
	emit_insns_enqueued_after_mark, emit_queue,
	expand_increment): Remove.
	(store_constructor): Expand increment as an assignment.
	(expand_expr_real_1 <case PREINCREMENT_EXPR,
	case PREDECREMENT_EXPR, case POSTINCREMENT_EXPR,
	case POSTDECREMENT_EXPR>): Abort.
	* expr.h (QUEUED_VAR, QUEUED_INSN, QUEUED_COPY,
	QUEUED_BODY, QUEUED_NEXT, finish_expr_for_function,
	protect_from_queue, emit_queue, queued_subexp_p): Remove.
	* function.h (pending_chain, x_pending_chain): Remove.
	* rtl.def (QUEUED): Remove.

	* emit-rtl.c (copy_insn_1, copy_most_rtx,
	set_used_flags, verify_rtx_sharing): Remove references to QUEUED.
	* genattrtab.c (attr_copy_rtx, clear_struct_flag,
	encode_units_mask): Likewise.
	* local-alloc.c (equiv_init_varies_p): Likewise.
	* rtl.c (copy_rtx): Likewise.
	* rtlanal.c (rtx_unstable_p, rtx_varies_p): Likewise.
	* simplify-rtx.c (simplify_gen_subreg): Likewise.
	* config/mn10300/mn10300.c (legitimate_pic_operand_p): Likewise.

	* builtins.c (expand_builtin, expand_builtin_apply,
	expand_builtin_mathfn, expand_builtin_mathfn_2,
	expand_builtin_mathfn_3, expand_builtin_setjmp_setup):
	Remove calls to emit_queue and protect_from_queue.
	* calls.c (expand_call, precompute_arguments,
	precompute_register_parameters, rtx_for_function_call,
	store_one_arg): Likewise.
	* dojump.c (do_compare_and_jump, do_jump): Likewise.
	* explow.c (memory_address): Likewise.
	* expmed.c (clear_by_pieces_1, clear_storage,
	clear_storage_via_libcall, emit_group_load,
	emit_group_store, emit_store_flag,
	expand_expr_real_1, store_by_pieces,
	store_constructor, store_expr, try_casesi,
	try_tablejump): Likewise.
	* function.c (expand_pending_sizes): Likewise.
	* optabs.c (emit_cmp_and_jump_insns,
	emit_conditional_add, emit_conditional_move,
	expand_fix, expand_float, prepare_cmp_insn): Likewise.
	* stmt.c (emit_case_bit_tests,
	expand_asm_expr, expand_computed_goto,
	expand_decl_init, expand_end_case_type,
	expand_end_stmt_expr, expand_expr_stmt_value,
	expand_return, expand_start_case,
	optimize_tail_recursion): Likewise.
	* config/c4x/c4x.c (c4x_expand_builtin): Likewise.
	* config/s390/s390.c (s390_expand_cmpmem): Likewise.

From-SVN: r84675
2004-07-14 07:30:23 +00:00
Richard Henderson 0976078c73 function.c (pass_by_reference): New.
* function.c (pass_by_reference): New.
        (assign_parm_find_data_types): Use it.
        * calls.c (initialize_argument_information): Likewise.
        (emit_library_call_value_1): Likewise.
        * expr.h (FUNCTION_ARG_PASS_BY_REFERENCE): Remove.
        * function.h (pass_by_reference): Declare.
ada/
        * misc.c (default_pass_by_ref): Use pass_by_reference.

From-SVN: r84607
2004-07-13 01:22:03 -07:00
Richard Henderson fe9841365e target-def.h (TARGET_MUST_PASS_IN_STACK): New.
* target-def.h (TARGET_MUST_PASS_IN_STACK): New.
	* target.h (struct gcc_target): Add calls.must_pass_in_stack.
	* expr.h (MUST_PASS_IN_STACK): Remove.
	* system.h (MUST_PASS_IN_STACK): Poison.
	* tree.h (must_pass_in_stack_var_size): Declare.
	(must_pass_in_stack_var_size_or_pad): Declare.
	* calls.c (must_pass_in_stack_var_size): New.
	(must_pass_in_stack_var_size_or_pad): Rename from
	default_must_pass_in_stack.
	* config/alpha/alpha.c (unicosmk_must_pass_in_stack): New.
	(TARGET_MUST_PASS_IN_STACK): New.
	* config/alpha/unicosmk.h (MUST_PASS_IN_STACK): Remove.
	* config/fr30/fr30.c (fr30_must_pass_in_stack): New.
	(TARGET_MUST_PASS_IN_STACK): New.
	* config/fr30/fr30.h (MUST_PASS_IN_STACK): Remove.
	* config/frv/frv.c (frv_must_pass_in_stack): New.
	(TARGET_MUST_PASS_IN_STACK): New.
	* config/frv/frv.h (MUST_PASS_IN_STACK): Remove.
	* config/i386/i386-protos.h (ix86_must_pass_in_stack): Remove.
	* config/i386/i386.c (TARGET_MUST_PASS_IN_STACK): New.
	(ix86_must_pass_in_stack): Make static.
	* config/i386/i386.h (MUST_PASS_IN_STACK): Remove.
	* config/ia64/ia64.c (TARGET_MUST_PASS_IN_STACK): New.
	* config/ia64/ia64.h (MUST_PASS_IN_STACK): Remove.
	* config/m32r/m32r.c (TARGET_MUST_PASS_IN_STACK): New.
	* config/m32r/m32r.h (MUST_PASS_IN_STACK): Remove.
	* config/mcore/mcore-protos.h (mcore_must_pass_on_stack): Remove.
	* config/mcore/mcore.c (TARGET_MUST_PASS_IN_STACK): New.
	(mcore_must_pass_on_stack): Remove.
	* config/mcore/mcore.h (MUST_PASS_IN_STACK): Remove.
	* config/mips/mips.c (TARGET_MUST_PASS_IN_STACK): New.
	* config/mips/mips.h (MUST_PASS_IN_STACK): Remove.
	* config/pa/pa.c (TARGET_MUST_PASS_IN_STACK): New.
	* config/pa/pa.h (MUST_PASS_IN_STACK): Remove.
	* config/rs6000/aix.h (MUST_PASS_IN_STACK): Remove.
	* config/rs6000/linux64.h (MUST_PASS_IN_STACK): Remove.
	* config/rs6000/rs6000.c (rs6000_must_pass_in_stack): New.
	(TARGET_MUST_PASS_IN_STACK): New.
	* config/sh/sh.c (TARGET_MUST_PASS_IN_STACK): New.
	* config/sh/sh.h (MUST_PASS_IN_STACK): Remove.
	* config/sparc/sparc.c (TARGET_MUST_PASS_IN_STACK): New.
	* config/sparc/sparc.h (MUST_PASS_IN_STACK): Remove.
	* config/xtensa/xtensa.c (TARGET_MUST_PASS_IN_STACK): New.
	* config/xtensa/xtensa.h (MUST_PASS_IN_STACK): Remove.
	* doc/tm.texi (TARGET_MUST_PASS_IN_STACK): Update from
	MUST_PASS_IN_STACK.

	* calls.c, function.c, config/alpha/alpha.c, config/alpha/alpha.h,
	config/alpha/unicosmk.h, config/alpha/vms.h, config/c4x/c4x.c,
	config/cris/cris.h, config/fr30/fr30.c, config/fr30/fr30.h,
	config/frv/frv.c, config/i386/i386.c, config/iq2000/iq2000.c,
	config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c,
	config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c,
	config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c,
	config/xtensa/xtensa.c: Use target hook.

From-SVN: r84606
2004-07-13 00:45:09 -07:00
Steve Ellcey 5e89a381f9 function.c (expand_function_start): Ensure r_save is in Pmode.
* function.c (expand_function_start): Ensure r_save is in Pmode.
	* calls.c (prepare_call_address): Ensure static_chain_value is
	  in Pmode.
	* builtins.c (expand_builtin_nonlocal_goto): Ensure r_label and
          r_save_area are in Pmode.
	* config/ia64/ia64.c (ia64_initialize_trampoline): Ensure addr,
	  fnaddr, and static_chain are in Pmode.

From-SVN: r84584
2004-07-12 22:45:14 +00:00
Zdenek Dvorak 01606a5aeb calls.c (check_sibcall_argument_overlap_1): Handle pointers to incoming args space correctly.
* calls.c (check_sibcall_argument_overlap_1): Handle pointers
	to incoming args space correctly.

From-SVN: r84472
2004-07-10 20:35:47 +00:00
Jakub Jelinek b352098021 expr.h (store_bit_field, [...]): Remove last argument.
* expr.h (store_bit_field, extract_bit_field): Remove last argument.
	* expmed.c (store_bit_field, extract_bit_field): Remove last
	argument.
	* builtins.c (expand_builtin_signbit): Adjust callers.
	* optabs.c (expand_vector_binop, expand_vector_unop): Likewise.
	* calls.c (store_unaligned_arguments_into_pseudos): Likewise.
	* ifcvt.c (noce_emit_move_insn): Likewise.
	* stmt.c (expand_return): Likewise.
	* expr.c (emit_group_load, emit_group_store, copy_blkmode_from_reg,
	store_field, expand_expr_real_1): Likewise.

From-SVN: r84447
2004-07-10 10:04:58 +02:00
Jerry Quinn 4b4bf9414f alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
2004-07-08  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (nonlocal_mentioned_p, nonlocal_referenced_p,
	nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P,
	NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
	* bb-reorder.c (mark_bb_for_unlikely_executed_section,
	add_labels_and_missing_jumps, find_jump_block,
	fix_crossing_unconditional_branches, add_reg_crossing_jump_notes):
	Likewise.
	* bt-load.c (btr_referenced_p, compute_defs_uses_and_gen,
	link_btr_uses, move_btr_def): Likewise.
	* builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto,
	expand_builtin_expect_jump): Likewise.
	* caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise.
	* calls.c (expand_call, emit_library_call_value_1): Likewise.
	* cfganal.c (forwarder_block_p): Likewise.
	* cfgbuild.c (inside_basic_block_p, count_basic_blocks,
	make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1,
	find_bb_boundaries): Likewise.
	* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
	merge_blocks_move_predecessor_nojumps,
	merge_blocks_move_successor_nojumps, insns_match_p,
	flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge,
	try_optimize_cfg): Likewise.
	* cfgexpand.c (expand_block, construct_exit_block): Likewise.
	* cfglayout.c (skip_insns_after_block, label_for_bb,
	record_effective_endpoints, insn_locators_initialize,
	fixup_reorder_chain, update_unlikely_executed_notes): Likewise.
	* cfgmainloop.c (create_loop_notes): Likewise.
	* cfgrtl.c (delete_insn, delete_insn_chain,
	create_basic_block_structure, rtl_delete_block, free_bb_for_insn,
	update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks,
	block_label, try_redirect_by_replacing_jump, last_loop_beg_note,
	redirect_branch_edge, force_nonfallthru_and_redirect,
	rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p,
	rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb,
	update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info,
	purge_dead_edges, cfg_layout_redirect_edge_and_branch,
	cfg_layout_delete_block, cfg_layout_can_merge_blocks_p,
	cfg_layout_merge_blocks, rtl_block_ends_with_call_p,
	need_fake_edge_p, rtl_flow_call_edges_add): Likewise.
	* combine.c (combine_instructions, can_combine_p, try_combine,
	find_split_point, record_dead_and_set_regs, reg_dead_at_p,
	distribute_notes, distribute_links, insn_cuid): Likewise.
	* cse.c (fold_rtx, cse_insn, cse_around_loop,
	invalidate_skipped_block, cse_set_around_loop,
	cse_end_of_basic_block, cse_main, cse_basic_block,
	cse_condition_code_reg): Likewise.
	* cselib.c (cselib_process_insn): Likewise.
	* ddg.c (create_ddg): Likewise.
	* df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify):
	Likewise.
	* dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug,
	gen_label_die, dwarf2out_var_location): Likewise.
	* emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn,
	next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn,
	last_call_insn, active_insn_p, next_label, prev_label,
	link_cc0_insns, next_cc0_user, try_split, add_insn_after,
	add_insn_before, remove_insn, add_function_usage_to,
	reorder_insns, find_line_note, remove_unnecessary_notes,
	emit_insn_after_1, classify_insn): Likewise.
	* except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before,
	connect_post_landing_pads, sjlj_mark_call_sites,
	sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers,
	can_throw_internal, can_throw_external, set_nothrow_function_flags,
	convert_to_eh_region_ranges): Likewise.
	* explow.c (optimize_save_area_alloca): Likewise.
	* expr.c (expand_expr_real): Likewise.
	* final.c (insn_current_reference_address, compute_alignments,
	shorten_branches, final, scan_ahead_for_unlikely_executed_note,
	final_scan_insn, output_asm_label, leaf_function_p): Likewise.
	* flow.c (first_insn_after_basic_block_note, delete_dead_jumptables,
	propagate_block_delete_insn, propagate_one_insn,
	init_propagate_block_info, propagate_block, libcall_dead_p,
	mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment):
	Likewise.
	* function.c (instantiate_virtual_regs,	reorder_blocks_1,
	expand_function_start, expand_function_end, contains,
	thread_prologue_and_epilogue_insns,
	reposition_prologue_and_epilogue_notes): Likewise.
	* gcse.c (constprop_register, bypass_conditional_jumps,
	insert_insn_end_bb, gcse_after_reload): Likewise.
	* genemit.c (gen_expand, gen_split): Likewise.
	* genpeep.c (gen_peephole, main): Likewise.
	* global.c (build_insn_chain): Likewise.
	* graph.c (node_data, print_rtl_graph_with_bb): Likewise.
	* haifa-sched.c (unlink_other_notes, unlink_line_notes,
	get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes,
	restore_line_notes, rm_redundant_line_notes, rm_other_notes,
	ok_for_early_queue_removal, set_priorities, sched_init): Likewise.
	* ifcvt.c (count_bb_insns, first_active_insn, last_active_insn,
	cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block,
	merge_if_block, block_jumps_and_fallthru_p, find_if_block,
	dead_or_predicable): Likewise.
	* integrate.c (try_constants): Likewise.
	* jump.c (rebuild_jump_labels, cleanup_barriers,
	purge_line_number_notes, init_label_info, mark_all_labels,
	squeeze_notes, get_label_before, get_label_after,
	reversed_comparison_code_parts, simplejump_p, pc_set,
	returnjump_p, onlyjump_p, follow_jumps, mark_jump_label,
	delete_barrier, delete_prior_computation, delete_computation,
	delete_related_insns, delete_for_peephole, redirect_jump):
	Likewise.
	* lcm.c (optimize_mode_switching): Likewise.
	* local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc):
	Likewise.
	* loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise.
	* loop-invariant.c (find_exits, find_invariants_bb): Likewise.
	* loop-iv.c (simplify_using_assignment): Likewise.
	* loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg,
	libcall_benefit, skip_consec_insns, move_movables, prescan_loop,
	find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop,
	loop_bivs_init_find, strength_reduce, check_insn_for_bivs,
	check_insn_for_givs, check_final_value, update_giv_derive,
	basic_induction_var, product_cheap_p, check_dbra_loop,
	loop_insn_first_p, last_use_this_basic_block,
	canonicalize_condition, get_condition, loop_regs_scan, load_mems,
	try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise.
	* modulo-sched.c (doloop_register_get, find_line_note, sms_schedule,
	sms_schedule_by_order): Likewise.
	* optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise.
	* postreload.c (reload_cse_simplify_operands, reload_combine,
	reload_cse_move2add): Likewise.
	* predict.c (can_predict_insn_p, estimate_probability,
	expected_value_to_br_prob, process_note_predictions): Likewise.
	* print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise.
	* profile.c (branch_prob): Likewise.
	* ra-build.c (live_out_1, livethrough_conflicts_bb,
	detect_webs_set_in_cond_jump): Likewise.
	* ra-debug.c (ra_print_rtx_object, ra_debug_insns,
	ra_print_rtl_with_bb): Likewise.
	* ra-rewrite.c (insert_stores, rewrite_program2): Likewise.
	* recog.c (next_insn_tests_no_inequality, find_single_use,
	split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise.
	* reg-stack.c (next_flags_user, record_label_references,
	emit_swap_insn, swap_rtx_condition, subst_stack_regs,
	compensate_edge, convert_regs_1): Likewise.
	* regclass.c (scan_one_insn): Likewise.
	* regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2,
	regmove_optimize, fixup_match_1, single_set_for_csa,
	combine_stack_adjustments_for_block): Likewise.
	* regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise.
	* reload.c (find_reloads, find_reloads_address_1, subst_reloads,
	find_equiv_reg): Likewise.
	* reload1.c (reload, calculate_needs_all_insns, set_label_offsets,
	reload_as_needed, emit_input_reload_insns, do_output_reload,
	delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges):
	Likewise.
	* reorg.c (find_end_label, emit_delay_sequence,
	delete_from_delay_slot, delete_scheduled_jump, optimize_skip,
	get_jump_flags, rare_destination, mostly_true_jump,
	try_merge_delay_insns, redundant_insn, own_thread_p,
	fill_simple_delay_slots, fill_slots_from_thread,
	fill_eager_delay_slots, relax_delay_slots, make_return_insns,
	dbr_schedule): Likewise.
	* resource.c (find_basic_block, next_insn_no_annul,
	find_dead_or_set_registers, mark_target_live_regs): Likewise.
	* rtl.h (RTX_PREV): Likewise.
	* rtlanal.c (global_reg_mentioned_p, no_labels_between_p,
	no_jumps_between_p, reg_used_between_p, reg_referenced_between_p,
	reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage,
	find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1,
	tablejump_p, computed_jump_p, insns_safe_to_move_p,
	find_first_parameter_load, can_hoist_insn_p): Likewise.
	* sched-deps.c (get_condition, add_dependence, sched_analyze_2,
	sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise.
	* sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns,
	schedule_ebbs): Likewise.
	* sched-rgn.c (is_cfg_nonregular, find_conditional_protection,
	is_conditionally_protected, can_schedule_ready_p,
	add_branch_dependences, debug_dependencies): Likewise.
	* stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable):
	Likewise.
	* unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p,
	reg_dead_after_loop, loop_find_equiv_value, loop_iterations,
	set_dominates_use, ujump_to_loop_cont): Likewise.
	* var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.

From-SVN: r84341
2004-07-09 03:29:35 +00:00
Alexandre Oliva 652eb7440c expr.h (FUNCTION_ARG_PARTIAL_NREGS): Default to 0.
* expr.h (FUNCTION_ARG_PARTIAL_NREGS): Default to 0.
(FUNCTION_ARG_PASS_BY_REFERENCE): Likewise.
(FUNCTION_ARG_CALLEE_COPIES): Likewise.
* calls.c: Remove ifdefs of macros above.
* functions.c: Likewise.
* expr.c: Likewise.

From-SVN: r84300
2004-07-08 16:57:48 +00:00
Richard Henderson ac45df5dba except.c (expand_eh_region_start, [...]): Remove.
* except.c (expand_eh_region_start, expand_eh_region_end,
	expand_eh_handler, expand_eh_region_end_cleanup,
	expand_start_all_catch, expand_start_catch, expand_end_catch,
	expand_end_all_catch, expand_eh_region_end_allowed,
	expand_eh_region_end_must_not_throw, expand_eh_region_end_throw,
	expand_eh_region_end_fixup): Remove.
	* stmt.c (struct nesting): Remove stack_level, innermost_stack_block,
	cleanups, outer_cleanups, label_chain, exception_region.
	(struct goto_fixup): Remove stack_level, cleanup_list_list.
	(struct label_chain): Remove.
	(struct stmt_status): Remove x_stack_block_stack.
	(stack_block_stack, expand_goto_internal, expand_fixup, expand_fixups,
	fixup_gotos, save_stack_pointer, expand_decl_cleanup,
	expand_decl_cleanup_eh, expand_cleanups, start_cleanup_deferral,
	end_cleanup_deferral, last_cleanup_this_contour,
	containing_blocks_have_cleanups_or_stack_level,
	any_pending_cleanups): Remove.
	(expand_null_return_1): Take no arguments.
	(expand_label, expand_naked_return, expand_return,
	expand_start_bindings_and_block, expand_end_bindings, expand_decl,
	expand_anon_union_decl, expand_start_case, pushcase, pushcase_range,
	expand_end_case_type): Don't use any of them.
	* calls.c (expand_call): Likewise.
	* dojump.c (do_jump): Likewise.
	* function.c (expand_function_end): Likewise.
	* expr.c (store_expr, expand_expr_real_1): Likewise.
	(safe_from_p): Don't handle WITH_CLEANUP_EXPR, CLEANUP_POINT_EXPR.
	(expand_expr_real_1): Don't handle WITH_CLEANUP_EXPR,
	CLEANUP_POINT_EXPR, TARGET_EXPR, TRY_CATCH_EXPR, CATCH_EXPR,
	EH_FILTER_EXPR, TRY_FINALLY_EXPR, GOTO_SUBROUTINE_EXPR.
	* fold-const.c (fold_checksum_tree): Use first_rtl_op.
	* gengtype.c (adjust_field_tree_exp): Remove rtl op handling.
	* gimplify.c (gimplify_cleanup_point_expr): Renumber operands
	for WITH_CLEANUP_EXPR.
	(gimple_push_cleanup): Likewise.
	* integrate.c (copy_decl_for_inlining): Don't DECL_TOO_LATE.
	* print-tree.c (print_node): Likewise.
	* tree-pretty-print.c (dump_generic_node): Remove GOTO_SUBROUTINE_EXPR.
	* tree.c (first_rtl_op): Always just TREE_CODE_LENGTH.
	(has_cleanups): Remove GOTO_SUBROUTINE_EXPR.
	* tree.def (WITH_CLEANUP_EXPR): Remove op1 and op2.
	(GOTO_SUBROUTINE_EXPR): Remove.
	* tree.h (WITH_CLEANUP_EXPR_RTL): Remove.
	(DECL_TOO_LATE): Remove.
	* except.h, tree.h: Update decls.
ada/
	* trans.c (gnat_to_gnu <N_Handled_Sequence_Of_Statements>): Update
	commentary.
cp/
	* cp-tree.h (expand_eh_spec_block): Remove.
java/
	* expr.c (case_identity, get_primitive_array_vtable,
	java_expand_expr, emit_init_test_initialization): Remove.
	* java-tree.h (java_expand_expr): Remove.
	* lang.c (LANG_HOOKS_EXPAND_EXPR): Remove.

From-SVN: r84275
2004-07-08 00:46:07 -07:00
Jan Beulich ff15c351ed calls.c (emit_library_call_value_1): Use mode of function parameter rather than that of argument since constants...
* calls.c (emit_library_call_value_1): Use mode of function parameter
        rather than that of argument since constants have none.

From-SVN: r84267
2004-07-07 22:58:35 -07:00
Roger Sayle 09b5267035 calls.c (load_register_parameters): Call expand_shift instead of expand_binop with ashl_optab (or other shift...
* calls.c (load_register_parameters): Call expand_shift instead
	of expand_binop with ashl_optab (or other shift optab) directly.
	* expr.c (emit_group_load, emit_group_store): Likewise.
	* function.c (assign_parm_setup_block): Likewise.
	* stmt.c (shift_return_value): Likewise.

From-SVN: r84134
2004-07-05 21:57:44 +00:00
Richard Henderson 82c8274320 c-decl.c (grokdeclarator): Don't frob current_function_decl around variable_size.
* c-decl.c (grokdeclarator): Don't frob current_function_decl
        around variable_size.
        (set_decl_nonlocal): Remove.
        (store_parm_decls): Add stmts for pending sizes.
        * calls.c (calls_function, calls_function_1): Remove.
        (precompute_arguments): Don't call it.
        * cfgexpand.c (set_save_expr_context): Remove.
        (tree_expand_cfg): Don't call it.
        * dwarf2out.c (add_bound_info): Don't handle SAVE_EXPR.
        (dwarf2out_finish): Likewise.
        * expr.c (emit_block_move): Adjust addresses to BLKmode.
        (store_constructor): Don't pre-evaluate SAVE_EXPR.
        (safe_from_p): Don't queue SAVE_EXPRs.
        (expand_expr_real_1 <case SAVE_EXPR>): Rewrite to expect,
        or build plain VAR_DECLs.
        * fold-const.c (twoval_comparison_p): Don't look at SAVE_EXPR_RTL.
        (fold): Likewise.
        (fold_checksum_tree): Don't special-case SAVE_EXPR.
        * function.c (free_after_compilation): Don't clear x_save_expr_regs.
        (put_var_into_stack): Don't handle SAVE_EXPR.
        (gen_mem_addressof): Likewise.
        * function.h (struct function): Remove x_save_expr_regs.
        (save_expr_regs): Remove.
        * gengtype.c (adjust_field_tree_exp): Don't special-case SAVE_EXPR.
        * print-tree.c (print_node): Don't dump SAVE_EXPR_NOPLACEHOLDER.
        * stor-layout.c (variable_size): Don't set it.
        (force_type_save_exprs, force_type_save_exprs_1): Remove.
        * tree-inline.c (remap_save_expr): Remove fn argument.  Update
        all callers.  Don't set SAVE_EXPR_CONTEXT.
        * tree-inline.h (remap_save_expr): Update decl.
        * tree.c (save_expr): Update build size.
        (first_rtl_op): Don't handle SAVE_EXPR.
        (unsave_expr_1, contains_placeholder_p): Likewise.
        (decl_function_context): Likewise.
        * tree.def (SAVE_EXPR): Remove args 1 and 2.
        * tree.h (SAVE_EXPR_CONTEXT, SAVE_EXPR_RTL): Remove.
        (SAVE_EXPR_NOPLACEHOLDER, SAVE_EXPR_PERSISTENT_P): Remove.
cp/
        * tree.c (cp_unsave_r): Update remap_save_expr call.
java/
        * jcf-write.c (generate_bytecode_insns <case SAVE_EXPR>): Rewrite.

From-SVN: r84036
2004-07-02 17:15:50 -07:00
Jerry Quinn 3c0cb5de6a alias.c (get_alias_set, [...]): Use MEM_P.
2004-07-01  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (get_alias_set, canon_rtx, get_addr,
	nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1):
	Use MEM_P.
	* builtins.c (expand_builtin_prefetch, expand_builtin_profile_func,
	expand_builtin): Likewise.
	* calls.c (expand_call, emit_library_call_value_1, store_one_arg):
	Likewise.
	* combine.c (can_combine_p, combinable_i3pat, try_combine,
	find_split_point, combine_simplify_rtx, simplify_set, make_extraction,
	rtx_equal_for_field_assignment_p, gen_lowpart_for_combine,
	record_dead_and_set_regs_1, get_last_value_validate,
	mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise.
	* cse.c (check_dependence, canon_hash, equiv_constant,
	gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers,
	cse_around_loop, cse_check_loop_start, cse_set_around_loop,
	count_reg_usage): Likewise.
	* cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup,
	cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set,
	cselib_record_sets): Likewise.
	* dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol,
	dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise.
	* ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise.
	* df.c (df_uses_record): Likewise.
	* dojump (do_jump): Likewise.
	* dwarf2out.c (stack_adjust_offset, mem_loc_descriptor,
	loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info,
	decl_start_label): Likewise.
	* emit-rtl.c (gen_complex_constant_part, gen_highpart,
	operand_subword, change_address_1, make_safe_from): Likewise.
	* explow.c (break_out_memory_refs, copy_all_regs, validize_mem,
	stabilize, force_not_mem): Likewise.
	* expmed.c (store_bit_field, store_split_bit_field, extract_bit_field,
	expand_mult_const, expand_divmod, emit_store_flag): Likewise.
	* expr.c (convert_move, convert_modes, emit_block_move,
	emit_group_load, emit_group_store, clear_storage, emit_move_insn,
	emit_move_insn_1, expand_assignment, store_expr,
	store_constructor_field, store_constructor, store_field,
	force_operand, safe_from_p, expand_expr_real_1, expand_increment):
	Likewise.
	* final.c (cleanup_subreg_operands, alter_subreg,
	get_mem_expr_from_op): Likewise.
	* flow.c (notice_stack_pointer_modification_1,
	init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs):
	Likewise.
	* function.c (mark_temp_addr_taken, preserve_temp_slots,
	preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1,
	optimize_bit_field, flush_addressof, purge_addressof_1,
	instantiate_decl, instantiate_virtual_regs_1, assign_parms,
	setjmp_protect, setjmp_protect_args, fix_lexical_addr,
	keep_stack_depressed): Likewise.
	* ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok,
	noce_process_if_block, find_memory): Likewise.
	* integrate.c (subst_constants, allocate_initial_values): Likewise.
	* local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p,
	update_equiv_regs): Likewise.
	* loop.c (scan_loop, prescan_loop, note_addr_stored, check_store,
	maybe_eliminate_biv_1, find_mem_in_note_1): Likewise.
	* optabs.c (expand_abs, emit_unop_insn): Likewise.
	* passes.c (rest_of_handle_final): Likewise.
	* postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands,
	move2add_note_store): Likewise.
	* ra-build.c (detect_remat_webs): Likewise.
	* ra-debug.c (dump_static_insn_cost): Likewise.
	* ra-rewrite.c (slots_overlap_p, insert_stores): Likewise.
	* recog.c (validate_change, apply_change_group, cancel_changes,
	validate_replace_rtx_1, general_operand, register_operand,
	nonmemory_operand, push_operand, pop_operand, memory_operand,
	indirect_operand, asm_operand_ok, offsettable_memref_p,
	offsettable_nonstrict_memref_p, constrain_operands,
	store_data_bypass_p): Likewise.
	* reg-stack.c (subst_stack_regs_pat): Likewise.
	* regclass.c (record_operand_costs, scan_one_insn, record_reg_classes,
	copy_cost, reg_scan_mark_refs): Likewise.
	* regmove.c (optimize_reg_copy_3, stack_memref_p,
	combine_stack_adjustments_for_block): Likewise.
	* regrename.c (copyprop_hardreg_forward_1): Likewise.
	* reload.c (can_reload_into, push_reload, decompose, immune_p,
	find_reloads, find_reloads_address, find_reloads_address_1,
	reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p,
	find_equiv_reg): Likewise.
	* reload1.c (reload, eliminate_regs, eliminate_regs_in_insn,
	reload_as_needed, choose_reload_regs, emit_input_reload_insns,
	do_input_reload, emit_reload_insns, gen_reload, delete_output_reload,
	delete_address_reloads): Likewise.
	* resource.c (mark_referenced_resources): Likewise.
	* rtlanal.c (get_jump_table_offset, count_occurrences,
	reg_referenced_p, reg_set_p, set_of_1, set_noop_p,
	reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1,
	num_sign_bit_copies1): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	* sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise.
	* sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol,
	sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms,
	sdbout_global_decl): Likewise.
	* simplify-rtx.c (simplify_subreg): Likewise.
	* stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl,
	expand_anon_union_decl, expand_end_case_type): Likewise.
	* unroll.c (calculate_giv_inc): Likewise.
	* var-tracking.c (stack_adjust_offset_pre_post,
	bb_stack_adjust_offset, track_expr_p, count_uses, add_uses,
	add_stores, compute_bb_dataflow, vt_get_decl_and_offset,
	vt_add_function_parameters): Likewise.
	* varasm.c (make_var_volatile, notice_global_symbol,
	assemble_external, decode_addr_const, mark_weak,
	default_encode_section_info): Likewise.

From-SVN: r83980
2004-07-01 12:52:53 +00:00
Richard Henderson b79c52841b function.h (struct function): Remove x_function_call_count.
* function.h (struct function): Remove x_function_call_count.
        (function_call_count): Remove.
        * calls.c (expand_call): Don't set it.
        * integrate.c (copy_rtx_and_substitute): Likewise.

        * function.h (struct function): Remove x_cleanup_label.
        (cleanup_label): Remove.
        * stmt.c (expand_value_return): Don't use it.
        * function.c (free_after_compilation): Don't set it.
        (expand_function_start): Likewise.  Remove parms_have_cleanups arg.
        * cfgexpand.c (tree_expand_cfg): Update call.
        * tree.h (expand_function_start): Update decl.

From-SVN: r83966
2004-07-01 02:54:20 -07:00
Richard Sandiford 5a1f395394 calls.c (shift_returned_value): Fix handling of non-integer TYPE_MODEs.
* calls.c (shift_returned_value): Fix handling of non-integer
	TYPE_MODEs.

From-SVN: r83595
2004-06-24 15:30:07 +00:00
Alan Modra 3a4d587b32 calls.c (expand_call): Call INIT_CUMULATIVE_ARGS earlier, and pass raw n_named_args to it.
* calls.c (expand_call): Call INIT_CUMULATIVE_ARGS earlier, and
	pass raw n_named_args to it.
	* targhooks.c: Formatting.
	(hook_bool_CUMULATIVE_ARGS_false): Correct comment.

From-SVN: r83583
2004-06-24 15:40:35 +09:30
Jerry Quinn f8cfc6aa07 alias.c (record_set, [...]): Use REG_P.
2004-06-15  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (record_set, record_base_value, canon_rtx, get_addr,
	nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P.
	* bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set):
	Likewise.
	* builtins.c (expand_builtin_setjmp, expand_builtin_apply,
	expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp,
	expand_builtin_strcmp, expand_builtin_strncmp,
	expand_builtin_frame_address): Likewise.
	* caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs,
	insert_one_insn): Likewise.
	* calls.c (prepare_call_address, precompute_register_parameters,
	precompute_arguments, expand_call, emit_library_call_value_1): Likewise.
	* cfganal.c (flow_active_insn_p): Likewise.
	* combine.c (set_nonzero_bits_and_sign_copies, can_combine_p,
	combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P,
	subst, combine_simplify_rtx, simplify_if_then_else, simplify_set,
	make_extraction, recog_for_combine, gen_lowpart_for_combine,
	simplify_comparison, record_dead_and_set_regs_1,
	record_dead_and_set_regs, record_promoted_value,
	check_promoted_subreg, get_last_value_validate, get_last_value,
	reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes,
	unmentioned_reg_p_1): Likewise.
	* conflict.c (mark_reg): Likewise.
	* cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost,
	mention_regs, insert_regs, lookup, lookup_for_remove, insert,
	merge_equiv_classes, flush_hash_table, invalidate,
	remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg,
	invalidate_for_call, use_related_value, canon_hash, exp_equiv_p,
	cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant,
	record_jump_cond, cse_insn, addr_affects_sp_p,
	invalidate_from_clobbers, cse_process_notes, cse_around_loop,
	cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode,
	cse_cc_succs, cse_condition_code_reg): Likewise.
	* cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p,
	cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx,
	cselib_record_set, cselib_record_sets): Likewise.
	* dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms,
	dbxout_block): Likewise.
	* df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise.
	* dojump.c (do_jump): Likewise.
	* dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg,
	is_based_loc, rtl_for_decl_location): Likewise.
	* emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl,
	set_decl_incoming_rtl, mark_user_reg): Likewise.
	* explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg,
	copy_to_suggested_reg, allocate_dynamic_stack_space,
	probe_stack_range, hard_function_value): Likewise.
	* expmed.c (store_bit_field, store_fixed_bit_field,
	store_split_bit_field, extract_bit_field, extract_fixed_bit_field,
	extract_split_bit_field, expand_divmod, emit_store_flag_force):
	Likewise.
	* expr.c (convert_move, convert_modes,
	block_move_libcall_safe_for_call_parm, emit_group_load, use_reg,
	use_group_regs, emit_move_insn, emit_move_insn_1,
	compress_float_constant, push_block, emit_single_push_insn,
	emit_push_insn, get_subtarget, expand_assignment, store_expr,
	store_constructor, store_field, force_operand, safe_from_p,
	expand_expr_real_1, expand_increment, do_store_flag, do_tablejump):
	Likewise.
	* final.c (profile_function, final_scan_insn, alter_subreg,
	get_mem_expr_from_op, output_asm_operand_names, output_operand,
	only_leaf_regs_used, leaf_renumber_regs_insn): Likewise.
	* flow.c (verify_wide_reg_1, mark_regs_live_at_end,
	find_regno_partial, propagate_one_insn, init_propagate_block_info,
	insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond,
	attempt_auto_inc, find_auto_inc, mark_used_regs,
	count_or_remove_death_notes_bb): Likewise.
	* function.c (find_temp_slot_from_address, update_temp_slot_address,
	preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn,
	fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof,
	put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk,
	purge_single_hard_subreg_set, instantiate_decl,
	instantiate_virtual_regs_1, aggregate_value_p, assign_parms,
	promoted_input_arg, setjmp_vars_warning, setjmp_args_warning,
	setjmp_protect, setjmp_protect_args, fix_lexical_addr,
	expand_function_start, diddle_return_value, clobber_return_register,
	expand_function_end, keep_stack_depressed, handle_epilogue_set,
	update_epilogue_consts): Likewise.
	* genemit.c (gen_exp, gen_insn): Likewise.
	* genrecog.c (make_insn_sequence): Likewise.
	* global.c (global_conflicts, expand_preferences, mark_reg_store,
	mark_reg_conflicts, set_preference, reg_becomes_live,
	build_insn_chain, mark_reg_change): Likewise.
	* haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight):
	Likewise.
	* ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block):
	Likewise.
	* integrate.c (copy_rtx_and_substitute, try_constants,
	subst_constants, mark_stores, allocate_initial_values): Likewise.
	* jump.c (reversed_comparison_code_parts, delete_prior_computation,
	delete_computation, rtx_renumbered_equal_p, true_regnum,
	reg_or_subregno): Likewise.
	* lcm.c (reg_dies, reg_becomes_live): Likewise.
	* local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem,
	update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set,
	wipe_dead_reg, no_conflict_p): Likewise.
	* loop-iv.c (simple_reg_p, simple_set_p, kill_sets,
	iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered,
	simple_rhs_p, simplify_using_assignment, implies_p): Likewise.
	* loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p,
	move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p,
	find_single_use_in_loop, count_one_set, loop_bivs_init_find,
	loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs,
	valid_initial_value_p, simplify_giv_expr, consec_sets_giv,
	loop_regs_update, check_dbra_loop, maybe_eliminate_biv,
	maybe_eliminate_biv_1, record_initial, update_reg_last_use,
	canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop,
	try_swap_copy_prop): Likewise.
	* optabs.c (expand_binop, expand_vector_binop, expand_vector_unop,
	expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float):
	Likewise.
	* postreload.c (reload_cse_simplify, reload_cse_simplify_set,
	reload_cse_simplify_operands, reload_combine,
	reload_combine_note_store, reload_combine_note_use,
	reload_cse_move2add, move2add_note_store): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* ra-build.c (copy_insn_p, remember_move, init_one_web_common,
	contains_pseudo, handle_asm_insn): Likewise.
	* ra-debug.c (ra_print_rtx_object, dump_constraints,
	dump_static_insn_cost): Likewise.
	* ra-rewrite.c (slots_overlap_p, emit_colors,
	remove_suspicious_death_notes): Likewise.
	* recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use,
	register_operand, scratch_operand, nonmemory_operand,
	constrain_operands): Likewise.
	* reg-stack (check_asm_stack_operands, remove_regno_note,
	emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat,
	subst_asm_stack_regs): Likewise.
	* regclass.c (scan_one_insn, record_reg_classes, copy_cost,
	record_address_regs, reg_scan_mark_refs): Likewise.
	* regmove.c (discover_flags_reg, replacement_quality,
	copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize,
	fixup_match_1): Likewise.
	* regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value,
	kill_set_value, copyprop_hardreg_forward_1): Likewise.
	* reload.c (MATCHES, push_secondary_reload, find_reusable_reload,
	reload_inner_reg_of_subreg, can_reload_into, push_reload,
	combine_reloads, find_dummy_reload, hard_reg_set_here_p,
	operands_match_p, decompose, find_reloads, find_reloads_toplev,
	find_reloads_address, subst_indexed_address, find_reloads_address_1,
	find_reloads_subreg_address, find_replacement,
	refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p,
	refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise.
	* reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns,
	find_reg, delete_dead_insn, alter_reg, eliminate_regs,
	elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs,
	forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs,
	emit_input_reload_insns, emit_output_reload_insns, do_input_reload,
	do_output_reload, emit_reload_insns, gen_reload,
	delete_address_reloads_1, inc_for_reload): Likewise.
	* reorg.c (update_reg_dead_notes, fix_reg_dead_note,
	update_reg_unused_notes, fill_slots_from_thread): Likewise.
	* resource.c (update_live_status, mark_referenced_resources,
	mark_set_resources, mark_target_live_regs): Likewise.
	* rtlanal.c (nonzero_address_p, get_jump_table_offset,
	global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p,
	reg_set_p, set_noop_p, find_last_value, refers_to_regno_p,
	note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note,
	find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in,
	parms_set, find_first_parameter_load, keep_with_call_p,
	hoist_test_store, hoist_update_store, address_cost, nonzero_bits1,
	num_sign_bit_copies1): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	* sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn,
	sched_analyze): Likewise.
	* sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1):
	Likewise.
	* sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise.
	* simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation,
	simplify_binary_operation, simplify_const_relational_operation,
	simplify_subreg): Likewise.
	* stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands,
	expand_end_stmt_expr, expand_return, expand_decl,
	expand_anon_union_decl): Likewise.
	* unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body,
	find_splittable_regs, find_splittable_givs, find_common_reg_term,
	loop_iterations): Likewise.
	* var-tracking.c (variable_union, variable_part_different_p,
	variable_different_p, count_uses, add_uses, add_stores,
	compute_bb_dataflow, set_variable_part, delete_variable_part,
	emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters):
	Likewise.
	* varasm.c (assemble_variable): Likewise.

From-SVN: r83195
2004-06-15 18:02:40 +00:00
Kazu Hirata 1ea7e6ad84 c-common.c, [...]: Fix comment typos.
* c-common.c, calls.c, cfgcleanup.c, cgraph.c, cgraphunit.c,
	ddg.c, ddg.h, df.c, df.h, except.c, expr.c, flags.h,
	fold-const.c, gcc.c, gimplify.c, haifa-sched.c,
	modulo-sched.c, tree-inline.c, tree-into-ssa.c, tree-nested.c,
	tree-nrv.c, tree-ssa-ccp.c, tree-ssa-dom.c, tree-ssa-live.c,
	tree-ssa-loop.c, tree-ssa-pre.c, tree-tailcall.c, tree.h: Fix
	comment typos.  Follow spelling conventions.

From-SVN: r82439
2004-05-30 07:12:58 +00:00
Richard Sandiford 9fd4743509 calls.c (initialize_argument_information): Forbid sibcalls if a callee-copied argument is stored in the current function's...
* calls.c (initialize_argument_information): Forbid sibcalls if a
	callee-copied argument is stored in the current function's frame.

From-SVN: r82129
2004-05-22 10:43:56 +00:00
Ian Lance Taylor 082a099ce4 system.h: Poison NO_RECURSIVE_FUNCTION_CSE.
* system.h: Poison NO_RECURSIVE_FUNCTION_CSE.
	* calls.c (prepare_call_address): Don't test
	NO_RECURSIVE_FUNCTION_CSE.
	* config/arc/arc.h (NO_RECURSIVE_FUNCTION_CSE): Don't define.
	* config/arm/arm.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/avr/avr.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/frv/frv.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/i386/i386.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/ip2k/ip2k.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/iq2000/iq2000.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/m32r/m32r.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/m68k/m68k.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/mcore/mcore.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/mips/mips.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/stormy16/stormy16.h (NO_RECURSIVE_FUNCTION_CSE):
	Likewise.
	* config/xtensa/xtensa.h (NO_RECURSIVE_FUNCTION_CSE): Likewise.
	* config/sh/sh.h: Remove NO_RECURSIVE_FUNCTION_CSE comment.
	* doc/tm.texi (Costs): Remove documentation for
	NO_RECURSIVE_FUNCTION_CSE.

From-SVN: r82084
2004-05-21 01:03:20 +00:00
Zack Weinberg 90afe2c9f5 tree.def (documentation): Remove mention of class 'b'.
* tree.def (documentation): Remove mention of class 'b'.
	(BLOCK): Now in class 'x'.
	* c-common.c (verify_tree): Remove case 'b'.
	* c-typeck.c (same_translation_unit_p): Change 'b' to 'x'.
	* calls.c (calls_function_1): Control cannot get past the switch
	when exp is a BLOCK.
	* print-tree.c (print_node): Move code for class 'b' to the class
	'c'/'x' switch, as case BLOCK.
	* tree.c (tree_size, make_node_stat, tree_node_structure): Likewise.
	(unsafe_for_reeval, substitute_placeholder_in_expr)
	(stabilize_reference_1): Remove case 'b'.
	* tree-browser.c (browse_tree): Change all tests for TREE_CODE_CLASS
	of something being 'b' to tests for TREE_CODE of something being
	BLOCK.
	* tree-ssa-operands.c (get_expr_operands): Likewise.
ada:
	* trans.c (gnat_stabilize_reference_1): Remove case 'b'.

From-SVN: r81831
2004-05-14 02:33:00 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Paul Brook 9e1622ed25 calls.c (precompute_arguments): Remove PROMOTE_FOR_CALL_ONLY.
* calls.c (precompute_arguments): Remove PROMOTE_FOR_CALL_ONLY.
	* function.c (assign_temp): Ditto.
	* system.h (PROMOTE_FOR_CALL_ONLY): Poison.

From-SVN: r81247
2004-04-28 13:25:59 +00:00
Zdenek Dvorak d1c3882392 Makefile.in (LIBGCOV): Add _gcov_fork...
* Makefile.in (LIBGCOV): Add _gcov_fork, _gcov_execl, _gcov_execlp,
	_gcov_execle, _gcov_execv, _gcov_execvp, _gcov_execve.
	* builtin-types.def (BT_PID, BT_PTR_CONST_STRING, BT_FN_PID,
	BT_FN_INT_CONST_STRING_PTR_CONST_STRING,
	BT_FN_INT_CONST_STRING_PTR_CONST_STRING_PTR_CONST_STRING): New.
	* builtins.c (expand_builtin_fork_or_exec): New.
	(expand_builtin): Call it.
	* builtins.def (BUILT_IN_EXECL, BUILT_IN_EXECLP,BUILT_IN_EXECLE,
	BUILT_IN_EXECV, BUILT_IN_EXECVP, BUILT_IN_EXECVE, BUILT_IN_FORK): New.
	* c-common.c (PID_TYPE): New macro.
	(c_common_nodes_and_builtins): Initialize pid_type_node.
	* calls.c (special_function_p): Do not handle fork and exec.
	(expand_call): Do not handle ECF_FORK_OR_EXEC.
	* gcov-io.h (__gcov_fork, __gcov_execl, __gcov_execlp, __gcov_execle,
	__gcov_execv, __gcov_execvp, __gcov_execve): Declare.
	* libgcov.c (__gcov_fork, __gcov_execl, __gcov_execlp, __gcov_execle,
	__gcov_execv, __gcov_execvp, __gcov_execve): New.
	* tree.h (enum tree_index): Add TI_PID_TYPE.
	(pid_type_node): New macro.
	(ECF_FORK_OR_EXEC): Removed.

From-SVN: r81118
2004-04-23 22:50:16 +00:00
Richard Kenner 4f976745b7 c-decl.c (build_compound_literal): Use TYPE_READONLY.
* c-decl.c (build_compound_literal): Use TYPE_READONLY.
	* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
	* objc/objc-act.c (adorn_decl, gen_declspecs): Likewise.
	* c-typeck.c (decl_constant_value): Don't access DECL_INITIAL of a
	PARM_DECL.
	* calls.c (flags_from_decl_or_type): Use TYPE_READONLY and do so only
	for a type.
	* print-tree.c (print_node): Properly handle side-effects, readonly,
	and constant flags.
	* tree.c (build1_stat, build_expr_wfl): Only look at TREE_SIDE_EFFECTS
	and TREE_CONSTANT if not a type.
	* tree.h (IS_NON_TYPE_CODE_CLASS): New macro.
	(IS_EXPR_CODE_CLASS): Write 'E', not 'e'.
	(NON_TYPE_CHECK): New macro.
	(TREE_SIDE_EFFECT, TREE_READONLY, TREE_CONSTANT: Add check.

	* cp/init.c (decl_constant_value): Don't look at DECL_INITIAL
	of PARM_DECL.
	* cp/tree.c (bot_manip, build_min): Don't look at TREE_CONSTANT
	or TREE_SIDE_EFFECTS of a type.

	* ada/decl.c (gnat_to_gnu_entity): Use TYPE_READONLY.
	* ada/utils.c (create_field_decl): Likewise.
	* ada/utils2.c (build_unary_op, gnat_build_constructor): Likewise.

From-SVN: r80430
2004-04-05 08:25:26 -04:00
Richard Kenner 8df83eae1e builtins.c, [...]: Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED.
* builtins.c, c-aux-info.c, c-common.c, c-cppbuiltin.c, c-decl.c:
	Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED.
	* c-format.c, c-opts.c, c-pretty-print.c, c-typeck.c: Likewise.
	* calls.c, convert.c, dbxout.c, dojump.c, dwarf2out.c: Likewise.
	* expmed.c, expr.c, fold-const.c, function.c, integrate.c: Likewise.
	* optabs.c, sdbout.c, stmt.c, stor-layout.c, tree-dump.c: Likewise.
	* tree.c, config/iq2000/iq2000.c, config/m32r/m32r.c: Likewise.
	* config/mips/mips.c, config/rs6000/rs6000.c: Likewise.
	* config/s390/s390.c, config/sparc/sparc.c, objc/objc-act.c: Likewise.
	* stor-layout.c (layout_type, case COMPLEX_TYPE): Test for
	REAL_TYPE, not INTEGER_TYPE.
	(layout_type, case VECTOR_TYPE): Simplify code.
	* tree.c (build_vector_type_for_mode): Remove dup unsigned setting.
	* tree.h: Update comments.
	(STRIP_NOPS): Use TYPE_UNSIGNED.
	(TYPE_UNSIGNED): New macro.
	(TYPE_TRAP_SIGNED): Remove now redundant check.
	(SAVE_EXPR_NOPLACEHOLDER): Don't use TREE_UNSIGNED.

	* cp/call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
	* cp/class.c (check_bitfield_decl): Likewise.
	* cp/cvt.c (type_promotes_to): Likewise.
	* cp/decl.c (finish_enum): Likewise.
	* cp/mangle.c (write_builtin_type): Likewise.
	* cp/semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
	* cp/typeck.c (type_after_usual_arithmetic_conversions): Likewise.
	(build_binary_op): Likewise.

	* f/com.c (ffecom_arrayref_): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
	(ffecom_expr_): Likewise.

	* java/jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.

	* treelang/treetree.c (tree_lang_signed_or_unsigned_type):
	Use TYPE_UNSIGNED, not TREE_UNSIGNED.

	* ada/decl.c (gnat_to_gnu_entity, make_type_from_size):
	Use TYPE_UNSIGNED, not TREE_UNSIGNED.
	* ada/trans.c (tree_transform, convert_with_check): Likewise.
	* ada/utils.c (gnat_signed_or_unsigned_type): Likewise.
	(build_vms_descriptor, unchecked_convert): Likewise.
	* ada/utils2.c (nonbinary_modular_operation): Likewise.

From-SVN: r80287
2004-03-31 22:50:43 -05:00
Kazu Hirata 5fd9b17875 alias.c, [...]: Replace calls via (*targetm.foo) () with targetm.foo ().
* alias.c, attribs.c, bt-load.c, builtins.c, c-common.c,
	c-decl.c, c-objc-common.c, c-typeck.c, calls.c, cfglayout.c,
	cse.c, dbxout.c, dwarf2out.c, except.c, final.c,
	haifa-sched.c, integrate.c, passes.c, rtlanal.c, sched-rgn.c,
	sched-vis.c, simplify-rtx.c, stor-layout.c, tree.c, varasm.c,
	vmsdbgout.c: Replace calls via (*targetm.foo) () with
	targetm.foo ().

From-SVN: r79729
2004-03-20 04:52:59 +00:00
Roger Sayle ae2bcd98fa alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) () with lang_hooks.foo ().
* alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) ()
	with lang_hooks.foo ().
	* builtins.c (expand_builtin_va_arg): Likewise.
	* c-common.c (fname_as_string, c_common_truthvalue_conversion,
	c_common_type_for_mode, c_common_nodes_and_builtins,
	handle_mode_attribute, handle_vector_size_attribute): Likewise.
	* c-convert.c (convert): Likewise.
	* c-format.c (check_format_types): Likewise.
	* c-objc-common.c (c_tree_printer): Likewise.
	* c-typeck.c (build_unary_op, build_conditional_expr,
	build_binary_op): Likewise.
	* calls.c (try_to_integrate, expand_call,
	emit_library_call_value_1): Likewise.
	* cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p):
	Likewise.
	* cgraphunit.c (record_call_1, cgraph_analyze_function,
	cgraph_expand_function): Likewise.
	* convert.c (convert_to_pointer, convert_to_integer): Likewise.
	* coverage.c (build_fn_info_type, build_ctr_info_type,
	build_gcov_info, create_coverage): Likewise.
	* dbxout.c (dbxout_init): Likewise.
	* diagnostic.c (diagnostic_report_current_function): Likewise.
	* dojump.c (do_jump): Likewise.
	* dwarf2out.c (dwarf2_name): Likewise.
	* except.c (init_eh): Likewise.
	* explow.c (expr_size, int_expr_size): Likewise.
	* expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add):
	Likewise.
	* expr.c (store_expr, store_constructor, safe_from_p,
	expand_expr_real, do_store_flag, try_casesi): Likewise.
	* function.c (push_function_context_to, pop_function_context_from,
	free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type,
	put_var_into_stack, allocate_struct_function, current_function_name):
	Likewise.
	* integrate.c (copy_decl_for_inlining, expand_inline_function):
	Likewise.
	* langhooks.c (lhd_clear_binding_stack, write_global_declarations,
	lhd_print_error_function): Likewise.
	* opts.c (handle_option, decode_options): Likewise.
	* passes.c (open_dump_file): Likewise.
	* print-tree.c (print_node): Likewise.
	* stmt.c (expand_fixup, fixup_gotos, expand_asm_operands,
	expand_decl_cleanup, emit_case_nodes): Likewise.
	* stor-layout.c (variable_size): Likewise.
	* toplev.c (announce_function, wrapup_global_declarations,
	check_global_declarations, compile_file, default_tree_printer,
	process_options, lang_dependent_init, finalize): Likewise.
	* tree-dump.c (dequeue_and_dump): Likewise.
	* tree-inline.c (remap_decl, remap_block, copy_body_r,
	initialize_inlined_parameters, declare_return_variable,
	inlinable_function_p, expand_call_inline, optimize_inline_calls,
	walk_tree, copy_tree_r): Likewise.
	* tree-optimize.c (tree_rest_of_compilation): Likewise.
	* tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp,
	unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl,
	variably_modified_type_p, dump_tree_statistics): Likewise.
	* varasm.c (assemble_variable, compare_constant, copy_constant,
	force_const_mem, compute_reloc_for_constant, output_constant,
	output_addressed_constants, initializer_constant_valid_p): Likewise.

From-SVN: r79481
2004-03-14 22:26:14 +00:00
Richard Henderson 42ba513004 re PR target/14547 (Passing _Complex long double does not follow the ABI)
PR target/14547
        * target.h (struct gcc_target): Move calls substructure before
        booleans.  Add split_complex_arg.
        * function.c (assign_parms, split_complex_args): Use it.
        * calls.c (expand_call): Likewise.
        (split_complex_values): Likewise.  Check for splittable types
        before allocating memory.
        (split_complex_types): Likewise.
        * system.h (SPLIT_COMPLEX_ARGS): Poison.
        * expr.h (SPLIT_COMPLEX_ARGS): Remove.
        * target-def.h (TARGET_SPLIT_COMPLEX_ARG): New.
        * config/alpha/alpha.c (alpha_split_complex_arg): New.
        (TARGET_SPLIT_COMPLEX_ARG): New.
        * config/alpha/alpha.h (SPLIT_COMPLEX_ARGS): Remove.
        * config/rs6000/rs6000.c (TARGET_SPLIT_COMPLEX_ARG): New.
        (rs6000_override_options): Zap it for non-AIX.
        (rs6000_function_value): Use targetm.calls.split_complex_arg.
        * config/rs6000/rs6000.h (SPLIT_COMPLEX_ARGS): Remove.
        * config/xtensa/xtensa.c (TARGET_SPLIT_COMPLEX_ARG): New.
        * config/xtensa/xtensa.h (SPLIT_COMPLEX_ARGS): Remove.
        * doc/tm.texi (TARGET_SPLIT_COMPLEX_ARG): Modify from old
        SPLIT_COMPLEX_ARGS entry.

From-SVN: r79376
2004-03-12 02:03:32 -08:00
Ulrich Weigand 03ca1672e4 re PR target/14262 (Structure size computed wrong)
PR target/14262
	* calls.c (load_register_parameters): If BLOCK_REG_PADDING is not
	defined, pass small BLKmode values in registers in the low-order part.

	* gcc.dg/20040305-2.c: New test.

From-SVN: r79348
2004-03-11 22:53:52 +00:00
Kazu Hirata 6c5caf00a8 calls.c: Don't reference FINAL_REG_PARM_STACK_SPACE or MAYBE_REG_PARM_STACK_SPACE.
* calls.c: Don't reference FINAL_REG_PARM_STACK_SPACE or
	MAYBE_REG_PARM_STACK_SPACE.
	* function.c: Likewise.
	* system.h (FINAL_REG_PARM_STACK_SPACE): Poison.
	(MAYBE_REG_PARM_STACK_SPACE): Likewise.
	* doc/tm.texi (FINAL_REG_PARM_STACK_SPACE): Remove.
	(MAYBE_REG_PARM_STACK_SPACE): Likewise.

From-SVN: r78530
2004-02-26 23:32:09 +00:00
James E Wilson 3638733b62 Out-of-date comments noticed while looking at PR 169.
* calls.c (preompute_arguments): Update comment.

From-SVN: r78357
2004-02-23 23:35:42 -08:00
Steven Bosscher 1da326c335 (c-decl.c, [...]): Replace DECL_SAVED_INSNS with DECL_STRUCT_FUNCTION.
* (c-decl.c, c-semantics.c, calls.c, cgraph.c, cgraphunit.c,
        function.c, integrate.c, print-tree.c, toplev.c, tree-optimize.c,
        tree.h): Replace DECL_SAVED_INSNS with DECL_STRUCT_FUNCTION.
        * ada/utils.c: Likewise.
        * cp/decl.c: Likewise.
        * f/com.c: Likewise.
        * java/class.c: Likewise.

From-SVN: r77985
2004-02-17 21:33:43 +00:00
Mark Mitchell 57782ad852 re PR c++/11326 (C++ IA64 ABI: 3.1.4: sometimes pointer to temporary return value is implicit first parameter preceding "this")
PR c++/11326
	* c-common.c (flag_abi_version): Remove.
	* c-common.h (flag_abi_version): Likewise.
	* c-opts.c (c_common_handle_option): Remove OPT_fabi_version case.
	* c.opt (fabi-version): Remove.
	* calls.c (expand_call): Always pass a function type to
	struct_value_rtx.  Use convert_memory_address.
	* common.opt (fabi-version): Add it.
	* flags.h (flag_abi_version): Likewise.
	(abi_version_at_least): New macro.
	* opts.c (common_handle_option): Add OPT_fabi_version.
	* toplev.c (flag_abi_version): Define it.
	* config/ia64/ia64.c (ia64_struct_retval_addr_is_first_parm_p):
	New function.
	(ia64_output_mi_thunk): Use it.
	(ia64_struct_value_rtx): Likewise.

	PR c++/11326
	* cp-tree.h (abi_version_at_least): Remove.
	* mangle.c: Include flags.h.

	PR c++/11326
	* g++.dg/abi/structret1.C: New test.

From-SVN: r77968
2004-02-17 18:32:45 +00:00
Alan Modra 0f6937feff tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
* doc/tm.texi (INIT_CUMULATIVE_ARGS): Update doco.
	* calls.c (expand_call): Pass n_named_args to INIT_CUMULATIVE_ARGS.
	(emit_library_call_value_1): Likewise pass nargs.
	* expr.c (block_move_libcall_safe_for_call_parm): Pass 3 here.
	* function.c (assign_parms): Pass -1 to INIT_CUMULATIVE_ARGS.
	* config/rs6000/rs6000.c (init_cumulative_args): Use n_named_args
	parameter instead of scanning TYPE_ARGS_TYPES to count args.
	* config/rs6000/rs6000-protos.h (init_cumulative_args): Update
	prototype.
	* config/rs6000/rs6000.h (INIT_CUMULATIVE_ARGS): Pass extra arg.
	(INIT_CUMULATIVE_INCOMING_ARGS): Set extra arg to 1000.
	(INIT_CUMULATIVE_LIBCALL_ARGS): Set extra arg to 0.
	* config/sh/sh.c (sh_output_mi_thunk): Pass 1 as n_named_args to
	INIT_CUMULATIVE_ARGS.
	* config/alpha/alpha.h (INIT_CUMULATIVE_ARGS): Update.
	* config/alpha/unicosmk.h, config/alpha/vms.h, config/arc/arc.h,
	config/arm/arm.h, config/avr/avr.h, config/c4x/c4x.h,
	config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.h,
	config/h8300/h8300.h, config/i386/i386.h, config/i860/i860.h,
	config/ia64/ia64.h, config/ip2k/ip2k.h, config/iq2000/iq2000.h,
	config/iq2000/iq2000.c, config/m32r/m32r.h, config/m68hc11/m68hc11.h,
	config/m68k/m68k.h, config/mcore/mcore.h, config/mips/mips.h,
	config/mmix/mmix.h, config/mn10300/mn10300.h, config/ns32k/ns32k.h,
	config/pa/pa.h, config/pdp11/pdp11.h config/s390/s390.h,
	config/sh/sh.h, config/sparc/sparc.h, config/stormy16/stormy16.h,
	config/v850/v850.h, config/vax/vax.h, config/xtensa/xtensa.h: Likewise.

From-SVN: r77380
2004-02-06 16:48:36 +10:30
Mark Mitchell dd292d0ad8 calls.c (initialize_argument_information): Add CALL_FROM_THUNK_P parameter.
* calls.c (initialize_argument_information): Add CALL_FROM_THUNK_P
	parameter.  Use it instead of current_function_is_thunk.
	* function.h (struct function): Update documentation for is_thunk.
	* tree.h (CALL_FROM_THUNK_P): New macro.
	* config/alpha/alpha.c (alpha_sa_mask): Do not check
	no_new_pseudos when testing current_function_is_thunk.
	* config/rs6000/rs6000.c (rs6000_ra_ever_killed): Likeiwse.

	* decl.c (cxx_push_function_context): Do not set
	current_function_is_thunk.
	* method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
	actual function.

From-SVN: r77244
2004-02-04 12:22:42 +00:00
Kazu Hirata f84d109fc4 bt-load.c: Replace "gen_rtx (FOO, " with "gen_rtx_FOO (".
* bt-load.c: Replace "gen_rtx (FOO, " with "gen_rtx_FOO (".
	* calls.c: Likewise.
	* emit-rtl.c: Likewise.
	* function.c: Likewise.
	* reload1.c: Likewise.
	* config/i386/cygming.h: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/winnt.c: Likewise.

From-SVN: r77025
2004-01-31 08:02:55 +00:00
Kazu Hirata d9221e016b alias.c, [...]: Update copyright.
* alias.c, basic-block.h, c-common.c, c-common.h,
	c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c,
	calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c,
	combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c,
	cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h,
	defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c,
	expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c,
	genautomata.c, genconditions.c, genemit.c, genflags.c,
	gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c,
	ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c,
	langhooks-def.h, langhooks.c, langhooks.h, line-map.c,
	line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c,
	ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c,
	rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h,
	target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h,
	unwind.h, varray.c, varray.h: Update copyright.

From-SVN: r76302
2004-01-21 20:40:04 +00:00
Kazu Hirata e0a21ab90e c-common.h: Fix comment formatting.
* c-common.h: Fix comment formatting.
	* c-cppbuiltin.c: Likewise.
	* c-pragma.c: Likewise.
	* calls.c: Likewise.
	* collect2.c: Likewise.
	* cppcharset.c: Likewise.
	* cpptrad.c: Likewise.
	* dbxout.c: Likewise.
	* defaults.h: Likewise.
	* dwarf2out.c: Likewise.
	* fold-const.c: Likewise.
	* genautomata.c: Likewise.
	* genconditions.c: Likewise.
	* genflags.c: Likewise.
	* gengtype.c: Likewise.
	* integrate.c: Likewise.
	* loop.c: Likewise.
	* predict.c: Likewise.
	* sdbout.c: Likewise.

From-SVN: r75957
2004-01-16 01:44:06 +00:00
John David Anglin 2fabc3d68e re PR rtl-optimization/12372 (miscompilation of execute/20030307-1.c at -O2 and -Os)
PR optimization/12372
	* calls.c (expand_call): Add call_fusage data for stack arguments in
	constant calls.

From-SVN: r75926
2004-01-15 14:58:06 +00:00
Kazu Hirata 3a1797641a calls.c: Replace STRICT_ARGUMENT_NAMING in comments with...
* calls.c: Replace STRICT_ARGUMENT_NAMING in comments with
	targetm.calls.strict_argument_naming().
	* target.h: Likewise.

From-SVN: r75886
2004-01-14 21:59:30 +00:00
Mark Mitchell 8f23fc8185 calls.c (expand_call): Recognize calls to "sqrt" and create corresponding notes.
* calls.c (expand_call): Recognize calls to "sqrt" and create
	corresponding notes.

	* g++.dg/bprob/bprob.exp: Load target-supports.exp
	* g77.dg/bprob/bprob.exp: Likewise.
	* gcc.misc-tests/bprob.exp: Likewise.
	* gcc.dg/builtins-18.c: Use builtins-config.h.  Do not test float
	variants on systems where the library does not provide that
	functionality.
	* gcc.dg/builtins-20.c: Use builtins-config.h.
	* gcc.dg/builtins-config.h: New file.

From-SVN: r75003
2003-12-24 06:52:27 +00:00
Kazu Hirata ba029213df calls.c (load_register_parameters): Don't use LOAD_ARGS_REVERSED.
* calls.c (load_register_parameters): Don't use
	LOAD_ARGS_REVERSED.
	* system.h (LOAD_ARGS_REVERSED): Poison.
	* doc/tm.texi (LOAD_ARGS_REVERSED): Remove.

From-SVN: r74773
2003-12-18 05:50:43 +00:00
Kazu Hirata 4ac8340c31 calls.c (expand_call): Update comments.
* calls.c (expand_call): Update comments.
	* system.h (PRETEND_OUTGOING_VARARGS_NAMED): Poison.
	* targhooks.c: Do not refer to PRETEND_OUTGOING_VARARGS_NAMED.

From-SVN: r74770
2003-12-18 03:29:04 +00:00
Kazu Hirata ba228239d2 c-typeck.c: Fix comment typos.
* c-typeck.c: Fix comment typos.
	* calls.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cgraph.h: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* explow.c: Likewise.
	* expr.c: Likewise.
	* flow.c: Likewise.
	* function.c: Likewise.
	* gcc.c: Likewise.
	* ggc-zone.c: Likewise.
	* ifcvt.c: Likewise.
	* local-alloc.c: Likewise.
	* predict.c: Likewise.
	* pretty-print.c: Likewise.
	* profile.c: Likewise.
	* ra-colorize.c: Likewise.
	* sched-vis.c: Likewise.
	* stor-layout.c: Likewise.

From-SVN: r74594
2003-12-13 04:11:23 +00:00
Richard Sandiford a6a5a42dd5 calls.c (expand_call): Don't try using tail or recursive calls after the function body has been expanded.
* calls.c (expand_call): Don't try using tail or recursive calls
	after the function body has been expanded.

From-SVN: r74415
2003-12-08 10:33:46 +00:00
Fariborz Jahanian 531547e90e calls.c (expand_call): Allocate new temp in pass1.
2003-11-20  Fariborz Jahanian  <fjahanian@apple.com>
            David Edelsohn  <edelsohn@gnu.org>

        * calls.c (expand_call): Allocate new temp in pass1.
        (store_one_arg): If PARALLEL, calculate excess using mode size of
        rtvec elt.
        * expr.c (emit_push_insn): If PARALLEL, calculate offset using
        mode size of rtvec elt.
        * function.c (assign_parms): Use parm in register, if available.

Co-Authored-By: David Edelsohn <edelsohn@gnu.org>

From-SVN: r73775
2003-11-20 17:42:01 -05:00
Richard Sandiford c988af2b8c Makefile.in (expr.o): Depend on $(TARGET_H).
* Makefile.in (expr.o): Depend on $(TARGET_H).
	* target.h (return_in_msb): New target hook.
	* target-def.h (TARGET_RETURN_IN_MSB): New macro.
	(TARGET_CALLS): Include it.
	* calls.c (shift_returned_value): New function.
	(expand_call): Use it.
	* expr.c: Include target.h.
	(copy_blkmode_from_reg): Check targetm.calls.return_in_msb when
	deciding what padding is needed.  Change the name of the local
	padding variable from big_endian_correction to padding_correction.
	* stmt.c (shift_return_value): New function.
	(expand_return): Use it.  Adjust memory->register copy in the same
	way as copy_blkmode_from_reg.  Only change the return register's
	mode if it was originally BLKmode.
	* doc/tm.texi (TARGET_RETURN_IN_MSB): Document.
	* config/mips/mips.c (TARGET_RETURN_IN_MSB): Define.
	(mips_fpr_return_fields): New, split out from mips_function_value.
	(mips_return_in_msb, mips_return_fpr_pair): New functions.
	(mips_function_value): Rework to use the functions above.
	* config/mips/irix6-libc-compat.c: Delete.
	* config/mips/t-iris6 (LIB2FUNCS_STATIC_EXTRA): Undefine.

From-SVN: r73652
2003-11-16 19:10:09 +00:00
Jason Merrill f027e0a2a2 re PR middle-end/12526 ([tree-ssa] internal compiler error: Segmentation fault)
PR middle-end/12526
        * tree.c (build): A CALL_EXPR has side-effects if its arguments do.
        * calls.c (call_expr_flags): New fn.
        * tree.h: Declare it.

From-SVN: r73589
2003-11-14 03:19:59 -05:00
Geoffrey Keating a594a19c2a function.c (pad_to_arg_alignment): Take STACK_POINTER_OFFSET into account when aligning arguments.
2003-10-07  Geoffrey Keating  <geoffk@apple.com>

	* function.c (pad_to_arg_alignment): Take STACK_POINTER_OFFSET into
	account	when aligning arguments.
	* calls.c (STACK_POINTER_OFFSET): Move default from here ...
	* defaults.h (STACK_POINTER_OFFSET): ... to here.
	* config/sparc/sparc.h (STACK_BOUNDARY): Add comment about how
	it's wrong when TARGET_ARCH64 && TARGET_STACK_BIAS.
	(SPARC_STACK_BOUNDARY_HACK): Define.
	* config/rs6000/rs6000.c (function_arg): On non-SVR4 systems,
	arrange for vector parameters to varargs functions to be passed
	in both memory and GPRs when appropriate.
	(rs6000_va_arg): Vector arguments passed in memory are 16-byte
	aligned.

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

	* gcc.dg/darwin-abi-2.c: New file.
	* gcc.c-torture/execute/va-arg-24.c: New file.

From-SVN: r72199
2003-10-07 19:48:23 +00:00
Kazu Hirata 2067c116a4 c-pretty-print.c: Fix comment typos.
* c-pretty-print.c: Fix comment typos.
	* c-pretty-print.h: Likewise.
	* calls.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* cppfiles.c: Likewise.
	* final.c: Likewise.
	* function.c: Likewise.
	* gcov-io.h: Likewise.
	* gcse.c: Likewise.
	* genoutput.c: Likewise.
	* loop.c: Likewise.
	* postreload.c: Likewise.
	* reg-stack.c: Likewise.
	* regmove.c: Likewise.
	* sched-int.h: Likewise.
	* sched-rgn.c: Likewise.
	* simplify-rtx.c: Likewise.
	* tree-inline.c: Likewise.
	* config/m68hc11/m68hc11.h: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/mn10300/mn10300.md: Likewise.
	* config/sh/sh.h: Likewise.

From-SVN: r72118
2003-10-05 19:50:56 +00:00
Jeff Sturm f451eeefad re PR rtl-optimization/12289 (Solaris 9/Intel bootstrap failure: ICE in expand_call compiling java/io/ObjectInputStream.java)
PR optimization/12289
	* calls.c (emit_call_1): Pretend to have popped the arguments
	to noreturn and longjmp functions instead of ignoring them.
	(expand_call): Don't adjust stack_pointer_dela while
	inhibit_defer_pop is set.

Co-Authored-By: Roger Sayle <roger@eyesopen.com>

From-SVN: r72073
2003-10-03 17:59:37 +00:00
Richard Henderson ddd2d57e72 c-format.c (gcc_diag_char_table): Add %J.
* c-format.c (gcc_diag_char_table): Add %J.
        (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Likewise.
        (check_format_types): Fix wanted_type name lookup.
        (init_dynamic_diag_info): Setup %J.
        * diagnostic.c (text_specifies_location): Implement %J.
        * c-common.c, c-decl.c, c-objc-common.c, c-pragma.c, calls.c,
        dwarfout.c, expr.c, function.c, stmt.c, stor-layout.c, toplev.c,
        tree-inline.c, tree-optimize.c, varasm.c, config/arm/pe.c,
        config/i386/winnt.c, config/ia64/ia64.c, config/mcore/mcore.c,
        config/v850/v850.c, objc/objc-act.c: Use %J in diagnostics.

        * tree-inline.c: Include intl.h
        (inline_forbidden_p_1): Fix i18n of inline_forbidden_reason.
        * Makefile.in (tree-inline.o): Update.
cp/
        * decl.c, decl2.c, pt.c: Use %J in diagnostics.
java/
        * check-init.c, class.c, decl.c, expr.c: Use %J in diagnostics.
testsuite/
        * gcc.dg/format/gcc_diag-1.c: Add tests for %J.

From-SVN: r71619
2003-09-20 22:07:20 -07:00
Mark Mitchell 5ae6cd0d1b re PR target/11184 ([ia64 hpux] ICE on __builtin_apply building libobjc)
PR target/11184
	* builtins.c (expand_builtin_apply): Use convert_memory_address
	before returning the value.

	* alias.c (find_base_value): Simplify use of
	convert_memory_address.
	(find_base_term): Likewise.
	* builtins.c (expand_builtin_stejmp_setup): Likewise.
	(expand_builtin_longjmp): Likewise.
	(expand_builtin_prefetch): Likewise.
	(get_memory_rtx): Likewise.
	(expand_builtin_return): Likewise.
	(expand_builtin_memcpy): Likewise.
	(expand_builtin_strncpy): Likewise.
	(expand_builtin_memset): Likewise.
	(expand_builtin_va_arg): Likewise.
	(expand_builtin_va_copy): Likewise.
	(expand_builtin_alloca): Likewise.
	* calls.c (expand_call): Likewise.
	* except.c (expand_builtin_extract_return_addr): Likewise.
	(expand_builtin_eh_return): Likewise.
	* explow.c (convert_memory_address): Define even when
	POINTER_EXTEND_UNSIGNED is not defined.  Do nothing if the address
	is already in the right mode.
	* explow.c (memory_address): Simplify use of convert_memory_address.
	(probe_stack_range): Likewise.
	* expmed.c (make_tree): Likewise.
	* expr.c (emit_block_move_in_libcall): Likewise.
	(expand_assignment): Likewise.
	(expand_expr): Likewise.
	* function.c (assign_parms): Likewise.
	(expand_function_end): Likewise.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	* stmt.c (expand_computed_goto): Likewise.

	PR target/11184
	* gcc.dg/builtin-apply1.c: New test.

From-SVN: r71539
2003-09-18 20:43:13 +00:00
Jason Merrill 72954a4f44 c-common.c (handle_warn_unused_result_attribute): New function.
* c-common.c (handle_warn_unused_result_attribute): New function.
	(c_common_attribute_table): Add warn_unused_result.
	(c_expand_expr): Issue warning when result of inlined function
	with warn_unused_result attribute is ignored.
	* calls.c (expand_call): Issue warning when result of function
	with warn_unused_result attribute is ignored.
	* c-common.h (STMT_EXPR_WARN_UNUSED_RESULT): Define.
	* expr.c (expr_wfl_stack): Define.
	(expand_expr) <case EXPR_WITH_FILE_LOCATION>: If ignore,
	pass const0_rtx as target.  Chain locations into expr_wfl_stack.
	* tree-inline.c (expand_call_inline): Set STMT_EXPR_WARN_UNUSED_RESULT
	bit if inlined function has warn_unused_result attribute.
	* input.h (expr_wfl_stack): Declare.
	* doc/extend.texi: Document warn_unused_result attribute.

	* gcc.dg/attr-warn-unused-result.c: New test.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r71424
2003-09-16 09:58:27 +02:00
Jan Hubicka 9778f2f8b5 re PR target/12070 (ICE converting between double and long double with -msoft-float)
PR target/12070
	* calls.c (emit_library_call_value_1): Fix saving of BLKmode arguments.

	PR opt/12082
	* cfgcleanup.c (try_simplify_condjump): Avoid unreachable code warning.

From-SVN: r71147
2003-09-06 21:50:20 +00:00
DJ Delorie 61f71b3447 targhooks.c: New file.
* targhooks.c: New file.
	* targhooks.h: New file.
	* Makefile.in: Add targhooks.o support.
	(function.o): Depend on$(TARGET_H).
	(stmt.o): Likewise.
	(combine.o): Depend on $(TREE_H) and $(TARGET_H).
	* builtins.c (apply_args_size, expand_builtin_apply_args_1,
	expand_builtin_apply): Convert to calls.struct_value_rtx hook.
	(expand_builtin_saveregs): Convert to
	calls.expand_builtin_saveregs hook.
	* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
	here, instead of ...
	(get_parm_info) ... here.
	(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
	hook.
	(finish_function): Handle calls.promote_prototypes hook here too.
	* c-typeck.c (convert_arguments): Convert to
	calls.promote_prototypes hook.
	(c_convert_parm_for_inlining): Likewise.
	* calls.c (initialize_argument_information): Convert to
	calls.promote_function_args hook.
	(expand_call): Convert to calls.struct_value_rtx,
	calls.strict_argument_naming,
	calls.pretend_outgoing_varargs_named, and
	calls.promote_function_return hooks.  Pass fndecl to
	aggregate_value_p.  Initialize CUMULATIVE_ARGS before calling
	hooks, so they can use that.
	(emit_library_call_value_1): Likewise.
	* combine.c (setup_incoming_promotions): Convert to
	calls.promote_function_args hook.
	* emit-rtl.c: Convert to calls.struct_value_rtx hook.
	* expr.c (expand_assignment): Pass call to aggregate_value_p.
	(expand_expr): Likewise.
	* expr.h: Remove support for SETUP_INCOMING_VARARGS,
	STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
	RETURN_IN_MEMORY macro defaults.
	* final.c (profile_function): Convert to calls.struct_value_rtx
	hook.
	* function.c (aggregate_value_p): Accept function type tree as
	second parameter; try to deduce fntype from it.  Convert to
	calls.return_in_memory hook.
	(assign_parms): Convert to calls.setup_incoming_varargs,
	calls.strict_argument_naming, calls.promote_function_args,
	calls.pretend_outgoing_varargs_named hooks.  Pass fndecl to
	aggregate_value_p.
	(expand_function_start): Likewise.  Convert to
	calls.struct_value_rtx hook.
	(expand_function_end): Convert to calls.promote_function_return hook.
	(allocate_struct_function): Pass fndecl to aggregate_value_p.
	* hard-reg-set.h: Update comments to new hook names.
	* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
	* reg-stack.c (stack_result): Likewise.
	* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
	* stmt.c (expand_value_return): Convert to
	calls.promote_function_return hook.
	* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
	TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
	TARGET_STRICT_ARGUMENT_NAMING,
	TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
	* target.h: Likewise.
	* tree.h (aggregate_value_p): Also takes a tree to deduce function
	attributes from (for target hooks).
	* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
	PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
	STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
	EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
	STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
	to hooks.

	* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
	to aggregate_value_p.
	* config/arm/arm.c (arm_init_cumulative_args,
	arm_output_mi_thunk): Likewise.
	* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
	Likewise.
	* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
	mips_can_use_return_insn): Likewise.
	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
	* config/s390/s390.c (s390_output_mi_thunk): Likewise.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
	aggregate_value_p.
	* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
	function to aggregate_value_p.
	* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
	aggregate_value_p.

	* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
	(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
	sh_function_arg_advance, sh_pass_in_reg_p): New.  * config/sh/sh.c
	(sh_handle_renesas_attribute, sh_promote_prototypes,
	sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
	sh_setup_incoming_varargs, sh_strict_argument_naming,
	sh_pretend_outgoing_varargs_named): New decls.
	(targetm): Add new hooks.
	(calc_live_regs): Save MACL and MACH if the function has the
	renesas attribute.
	(sh_expand_prologue): Support renesas attribute.
	(sh_builtin_saveregs): Make static.
	(sh_build_va_list): Support renesas attribute.
	(sh_va_start): Likewise.
	(sh_va_arg): Likewise.
	(sh_promote_prototypes): New.
	(sh_function_arg): New, moved from sh.h.  Support renesas
	attribute.
	(sh_function_arg_advance): Likewise.
	(sh_return_in_memory): Likewise.
	(sh_strict_argument_naming): Likewise.
	(sh_pretend_outgoing_varargs_named): Likewise.
	(sh_struct_value_rtx): New.
	(sh_attribute): Add renesas attribute.
	(sh_handle_renesas_attribute): New.
	(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
	(sh_ms_bitfield_layout_p): Support renesas attribute also.
	(sh_output_mi_thunk): Pass function to aggregate_value_p.  *
	config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
	-mhitachi.
	(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
	target hooks.
	(sh_args): Add renesas_abi flag.
	(INIT_CUMULATIVE_ARGS): Set it.  Pass fndecl to aggregate_value_p.
	(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
	(PASS_IN_REG_P): Support renesas attribute.  Pass DF and TF on the
	stack for the renesas abi.
	(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
	SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
	PROMOTE_PROTOTYPES): Moved to sh.c.  * config/sh/sh.md (call): Set
	call cookie to indicate renesas calls.

	* decl.c (finish_function): Pass fndecl to aggregate_value_p.

	* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
	hook.

From-SVN: r71048
2003-09-03 23:18:05 -04:00
Richard Sandiford 648bb15912 calls.c (initialize_argument_information): If an argument has no stack space associated with it...
* calls.c (initialize_argument_information): If an argument has no
	stack space associated with it, and BLOCK_REG_PADDING is defined,
	use it to decide at which end the argument should be padded.
	* function.c (assign_parms): Allocate BLKmode stack slots.
	* config/mips/mips-protos.h (mips_pad_arg_upward): Declare.
	(mips_pad_reg_upward): Declare.
	* config/mips/mips.h (PAD_VARARGS_DOWN): Use FUNCTION_ARG_PADDING.
	(CUMULATIVE_ARGS): Remove num_adjusts and adjusts.
	(FUNCTION_ARG_PADDING): Use mips_pad_arg_upward.
	(BLOCK_REG_PADDING): Use mips_pad_reg_upward.
	* config/mips/mips.c (struct mips_arg_info): Remove struct_p.
	(mips_expand_call): Remove code for generating structure shifts.
	(mips_arg_info): Don't set struct_p.  Don't set fpr_p for non-float
	types unless using the EABI.
	(function_arg_advance): Don't generate shift instructions.
	(function_arg): Don't return them.  Don't short-circuit the
	check for double structure chunks for DFmode arguments.
	(mips_pad_arg_upward, mips_pad_reg_upward): New functions.
	(mips_expand_prologue): Remove code to emit structure shifts.
	* config/mips/irix6-libc-compat.c: Remove workarounds for buggy
	structure passing (inet_ntoa, inet_lnaof, inet_netof).  Update
	comments to say that only structure returns are a problem.

From-SVN: r70843
2003-08-27 07:05:18 +00:00
Dale Johannesen 643642eb3f calls.c (emit_library_call_value_1): Fix obvious errors in arguments to emit_group_load.
2003-08-23  Dale Johannesen  <dalej@apple.com>
	* calls.c (emit_library_call_value_1): Fix obvious errors in
	arguments to emit_group_load.

From-SVN: r70741
2003-08-23 18:08:27 +00:00
Jason Eckhardt edf11bdaab calls.c (emit_library_call_value_1): Remove code related to LIBGCC_NEEDS_DOUBLE.
2003-08-23  Jason Eckhardt  <jle@rice.edu>

        * calls.c (emit_library_call_value_1): Remove code related
        to LIBGCC_NEEDS_DOUBLE.
        * config/stormy16/stormy16.h: Remove mention of LIBGCC_NEEDS_DOUBLE.
        * doc/tm.texi: Likewise.
        * system.h: Poison the LIBGCC_NEEDS_DOUBLE macro.

From-SVN: r70740
2003-08-23 18:03:06 +00:00
Jason Merrill 68ad9159aa tree.h (IS_EXPR_CODE_CLASS): Also include 'r' and 's'.
* tree.h (IS_EXPR_CODE_CLASS): Also include 'r' and 's'.
        (EXPR_CHECK): Don't check for 'r' or 's' if we're
        checking IS_EXPR_CODE_CLASS.
        * calls.c (calls_function_1): Likewise.
        * fold-const.c (fold): Likewise.
        * tree.c (iterative_hash_expr): Likewise.
        * tree-inline.c (walk_tree, copy_tree_r): Likewise.

From-SVN: r70617
2003-08-20 17:46:48 -04:00
Alan Modra 980f6e8eaa calls.c (load_register_parameters): Arrange for call_fusage to report the whole register as used when...
* calls.c (load_register_parameters): Arrange for call_fusage to
	report the whole register as used when shifting to the msb.

From-SVN: r70201
2003-08-06 12:56:17 +09:30
Alan Modra 9206d7362f calls.c (load_register_parameters): When shifting reg sized values to the msb, move the value to a reg first.
* calls.c (load_register_parameters): When shifting reg sized values
	to the msb, move the value to a reg first.

From-SVN: r69953
2003-07-30 17:00:16 +09:30
Gabriel Dos Reis b6fe0bb8c5 Remove pedwarn_with_decl, warning_with_decl and error_with_decl from GCC.
Remove pedwarn_with_decl, warning_with_decl and error_with_decl
        from GCC.
        * calls.c (try_to_integrate): Don't use xxx_with_decl.
        (expand_call): Likewise.
        * dwarfout.c (output_reg_number): Likewise.
        * expr.c (expand_expr): Likewise.
        * function.c (assign_temp): Likewise.
        (uninitialized_vars_warning): Likewise.
        (setjmp_args_warning): Likewise.
        (expand_function_end): Likewise.
        * stmt.c (fixup_gotos): Likewise.
        (warn_about_unused_variables): Likewise.
        (expand_end_bindings): Likewise.
        * stor-layout.c (layout_decl): Likewise.
        (place_field): Likewise.
        * toplev.c (check_global_declarations): Likewise.
        (rest_of_handle_inlining): Likewise.
        (default_tree_printer): New function.
        (general_init): Initialize diagnostic machinery before routing
        signals to the ICE machinery.  Set default tree printer.
        * toplev.h (pedwarn_with_decl): Remove declaration.
        (warning_with_decl): Likewise.
        (error_with_decl): Likewise.
        (pedwarn): Remove attribute for the time being.
        * tree-inline.c (expand_call_inline): Don't use xxx_with_decl.
        * varasm.c (named_section): Likewise.
        (make_decl_rtl): Likewise.
        (assemble_variable): Likewise.
        (merge_weak): Likewise.
        (declare_weak): Likewise.

        * diagnostic.h: Move non-diagnostic stuff into pretty-print.h.
        * diagnostic.c: Move non-diagnostic stuff into pretty-print.c.
        (format_with_decl): Remove.
        (diagnostic_for_decl): Likewise.
        (pedwarn_with_decl): Likewise.
        (warning_with_decl): Likewise.
        (error_with_decl): Likewise.
        (diagnostic_initialize): Adjust.
        (diagnostic_count_diagnostic): Likewise.
        (announce_function): Likewise.
        (lhd_print_error_function): Likewise.
        (diagnostic_report_current_module): Likewise.
        (default_diagnostic_starter): Likewise.
        (diagnostic_report_diagnostic): Likewise.
        (default_diagnostic_finalizer): Likewise.
        (verbatim): Likewise.
        (error): Likewise.
        (warning): Likewise.
        * opts.c (common_handle_option): Likewise.
        * pretty-print.c: New file.
        * c-pretty-print.h (pp_base): Override.
        * c-pretty-print.c: Adjust use of macros throughout.
        (pp_buffer): New macro.
        (pp_newline): Likewise.
        * c-objc-common.c (c_tree_printer): Adjust prototype. Tidy.
        * Makefile.in (DIAGNOSTIC_H): New variable.
        (c-errors.o): Use it.
        (c-objc-common.o): Likewise.
        (c-common.o): Likewise.
        (c-opts.o): Likewise.
        (c-format.o): Likewise.
        (diagnostic.o): Likewise.
        (opts.o): Likewise.
        (toplev.o): Likewise.
        (rtl-error.o): Likewise.
        (dwarf2out.o): Likewise.
        (jump.o): Likewise.
        (pretty-print.o): New rule.

cp/
        * Make-lang.in (cp/error.o): Depend on DIAGNOSTIC_H.
        * error.c: Use the new pretty-printer fraamework.

From-SVN: r69773
2003-07-25 09:52:32 +00:00
Kaveh R. Ghazi 703ad42b4b alias.c [...]: Remove unnecessary casts.
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c
	c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in
	c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c
	collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c
	cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c
	cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c
	dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c
	fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c
	gcse.c genattr.c genattrtab.c genautomata.c genconditions.c
	genemit.c genextract.c genoutput.c genrecog.c gensupport.c
	ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c
	integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c
	loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c
	postreload.c prefix.c print-tree.c protoize.c ra-build.c
	ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c
	regmove.c regrename.c reload.c reload1.c reorg.c resource.c
	sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c
	simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c
	tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c
	varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary
	casts.

From-SVN: r69587
2003-07-19 14:47:15 +00:00
Mark Mitchell 2b187c63e2 re PR rtl-optimization/11557 (constant folding)
PR optimization/11557
	* calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK
	unless we know which function is being called.

	PR optimization/11557
	* gcc.dg/20030717-1.c: New test.

From-SVN: r69538
2003-07-18 03:05:27 +00:00
Alan Modra 6e98504002 tm.texi (BLOCK_REG_PADDING): Describe.
* doc/tm.texi (BLOCK_REG_PADDING): Describe.
	* expr.h (struct locate_and_pad_arg_data): Add where_pad.
	(emit_group_load, emit_group_store): Adjust declarations.
	Remove most occurrences of #ifdef TREE_CODE.
	* expr.c (emit_group_load): Add "type" param, and use
	BLOCK_REG_PADDING to determine need for a shift.  Optimize non-
	aligned accesses if !SLOW_UNALIGNED_ACCESS.
	(emit_group_store): Likewise.
	(emit_push_insn, expand_assignment, store_expr, expand_expr): Adjust
	emit_group_load and emit_group_store calls.
	* calls.c (store_unaligned_arguments_into_pseudos): Tidy.  Use
	BLOCK_REG_PADDING to determine whether we need endian_correction.
	(load_register_parameters): Localize vars.  Handle shifting of
	small values to the correct end of regs.  Adjust emit_group_load
	call.
	(expand_call, emit_library_call_value_1): Adjust emit_group_load
	and emit_group_store calls.
	* function.c (assign_parms): Set mem alignment for stack slots.
	Adjust emit_group_store call.  Store values at the "wrong" end
	of regs to the stack.  Use BLOCK_REG_PADDING.
	(locate_and_pad_parm): Save where_pad.
	(expand_function_end): Adjust emit_group_load call.
	* stmt.c (expand_value_return): Adjust emit_group_load call.
	* Makefile.in (calls.o): Depend on $(OPTABS_H).
	* config/rs6000/linux64.h (TARGET_LITTLE_ENDIAN): Redefine as 0.
	(AGGREGATE_PADDING_FIXED, AGGREGATES_PAD_UPWARD_ALWAYS): Define.
	(MUST_PASS_IN_STACK): Define.
	(BLOCK_REG_PADDING): Define.
	* config/rs6000/rs6000.h (struct rs6000_args): Remove orig_nargs.
	(PAD_VARARGS_DOWN): Define in terms of FUNCTION_ARG_PADDING.
	* config/rs6000/rs6000.c (init_cumulative_args): Don't set orig_nargs.
	(function_arg_padding): !AGGREGATE_PADDING_FIXED compatibility code.
	Act on AGGREGATES_PAD_UPWARD_ALWAYS.

From-SVN: r69318
2003-07-14 14:47:18 +09:30
Geoffrey Keating d1bd0ded61 Index: ChangeLog
2003-07-10  Geoffrey Keating  <geoffk@apple.com>

	* c-decl.c (finish_decl): Handle 'used' here...
	* cgraphunit.c (cgraph_finalize_function): ... and here ...
	* c-common.c: (handle_used_attribute): ... not here.

	* configure.in (onstep): Support --enable-intermodule.
	* Makefile.in (OBJS-common): New.
	(OBJS-md): New.
	(OBJS-archive): New.
	(OBJS): Build from OBJS-common, OBJS-md, OBJS-archive.
	(OBJS-onestep): New.
	(libbackend.a): Support @onestep@.
	(libbackend.o): New.
	* configure: Regenerate.

	* c-common.h (c_reset_state): New prototype.
	(c_parse_file): New prototype.
	(finish_file): Move prototype from c-tree.h.
	* c-decl.c: Include <hashtab.h>.
	(builtin_decls): New.
	(current_file_decl): New.
	(duplicate_decls): Add extra parameter. Change all callers.  Don't
	output duplicate common symbols.
	(link_hash_hash): New.
	(link_hash_eq): New.
	(poplevel): Handle popping of the top level.
	(warn_if_shadowing): Handle TRANSLATION_UNIT_DECL.
	(pushdecl): Set DECL_CONTEXT to TRANSLATION_UNIT_DECL if appropriate.
	(pushdecl_top_level): Likewise.
	(redeclaration_error_message): Handle TRANSLATION_UNIT_DECL.
	(c_init_decl_processing): Create TRANSLATION_UNIT_DECL.
	(finish_decl): Handle TRANSLATION_UNIT_DECL.
	(merge_translation_unit_decls): New.
	(c_write_global_declarations): New.
	(c_reset_state): New.
	(implicitly_declare): Handle TRANSLATION_UNIT_DECL.
	* c-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
	* c-objc-common.c (c_cannot_inline_tree_fn): Handle
	TRANSLATION_UNIT_DECL.
	(c_objc_common_finish_file): Call merge_translation_unit_decls.
	* c-opts.c (in_fnames): Rename from in_fname.
	(c_common_decode_option): Handle multiple input filenames.
	(c_common_post_options): Likewise.
	(c_common_parse_file): Likewise; also, call c_parse_file rather than
	yyparse.
	* c-parse.in: Move cleanup code to c_parse_file.
	(free_parser_stacks): Move contents to c_parse_file.
	(c_parse_file): New.
	* c-tree.h (union lang_tree_node): Chain along TYPE_NEXT_VARIANT
	for integer types.
	(C_DECL_FILE_SCOPE): New.
	(finish_file): Move prototype to c-common.h.
	(merge_translation_unit_decls): New prototype.
	(comptypes): Add extra parameter to prototype.
	(c_write_global_declarations): New prototype.
	* c-typeck.c (tagged_types_tu_compatible_p): New.
	(function_types_compatible_p): Add extra parameter, change all callers.
	(type_lists_compatible_p): Likewise.
	(comptypes): Likewise.
	(struct tagged_tu_seen): New.
	(tagged_tu_seen_base): New.
	(build_unary_op): Handle TRANSLATION_UNIT_DECL.
	(c_mark_addressable): Remove #if 0 code.
	* calls.c (special_function_p): Handle TRANSLATION_UNIT_DECL, add
	comment explaining why it shouldn't have to.
	* cgraph.h (struct cgraph_node): Add chain_next and chain_prev GTY
	options.
	* cppinit.c (cpp_read_next_file): New.
	(cpp_read_main_file): Use it.
	* cpplib.c (undefine_macros): New.
	(cpp_undef_all): New.
	* cpplib.h (cpp_read_next_file): Prototype.
	(cpp_undef_all): Prototype.
	* langhooks-def.h (write_global_declarations): Remove prototype.
	* toplev.h (write_global_declarations): Add prototype.
	* tree.c (decl_type_context): Use switch statement, handle
	TRANSLATION_UNIT_DECL.
	* tree.def: Update documentation for TRANSLATION_UNIT_DECL.
	(TRANSLATION_UNIT_DECL): New kind of tree.
	* tree.h: Update documentation for TRANSLATION_UNIT_DECL.
	* Makefile.in (c-decl.o): Add $(HASHTAB_H) to dependencies.
	* doc/invoke.texi: Make attempt to document new functionality.

	2003-05-19  Per Bothner <bothner@apple.com>

	* gcc.c (combine_inputs): New.
	(process_command): Set combine_inputs.
	(do_spec_1): Handle combine_inputs.
	(main): Likewise.

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

	* decl.c (cp_finish_decl): Handle 'used' attribute.

	* cp-lang.c (c_reset_state): New dummy routine.
	* cp-tree.h (finish_file): Move prototype to c-common.h.
	* parser.c (c_parse_file): Rename from yyparse; don't call finish_file.

From-SVN: r69224
2003-07-11 08:33:21 +00:00
Roger Sayle 8af61113c7 re PR other/11370 (-Wunreachable-code gives false complaints)
PR c/11370
	* calls.c (emit_call_1): Don't bother popping the arguments off of
	the stack after a noreturn function call;  The adjustment is dead.
	(expand_call): Likewise.

	* gcc.dg/Wunreachable-6.c: New testcase.
	* gcc.dg/Wunreachable-7.c: New testcase.

From-SVN: r69119
2003-07-09 01:17:28 +00:00
Jeff Law de1f565924 stmt.c (any_pending_cleanups): Lose argument THIS_CONTOUR, it was always passed in the value '1'.
* stmt.c (any_pending_cleanups): Lose argument THIS_CONTOUR, it
        was always passed in the value '1'.  Simplify body appropriately.
        * tree.h (any_pending_cleanups): Corresponding changes.
        * calls.c: (expand_call): Corresponding changes.

From-SVN: r68754
2003-06-30 20:04:11 -06:00
Jason Merrill 9d6bef9526 defaults.h (PUSH_ARGS_REVERSED): Define default here.
* defaults.h (PUSH_ARGS_REVERSED): Define default here.
        * calls.c: Not here.

From-SVN: r68701
2003-06-30 09:16:26 -04:00
Andreas Jaeger b0a3130068 * calls.c (emit_call_1): Readd lost ATTRIBUTE_UNUSED.
From-SVN: r68346
2003-06-22 19:46:38 +02:00
Andreas Jaeger d329e058f2 caller-save.c: Convert to ISO C90.
* caller-save.c: Convert to ISO C90.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfghooks.c: Likewise.
	* cfglayout.c: Likewise.
	* cfglayout.h: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmainip.c: Likewise.
	* cfgrtl.c: Likewise.

From-SVN: r68331
2003-06-22 17:03:27 +02:00
Steve Ellcey f80f73e192 calls.c (expand_call): Convert structure_value_addr to Pmode if necessary.
* calls.c (expand_call): Convert structure_value_addr to Pmode if
	necessary.

From-SVN: r67716
2003-06-10 17:11:22 +00:00
Andrew Haley e076f71a38 langhooks-def.h (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
2003-05-21  Andrew Haley  <aph@redhat.com>

	* langhooks-def.h (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
	(LANG_HOOKS_DECLS): Add LANG_HOOKS_DECL_OK_FOR_SIBCALL.
	(lhd_decl_ok_for_sibcall): New.
	* langhooks.c (lhd_decl_ok_for_sibcall): New.
	* langhooks.h (lang_hooks_for_decls.ok_for_sibcall): New field.
	* calls.c (expand_call): Check lang_hook before generating a
	sibcall.

2003-05-21  Andrew Haley  <aph@redhat.com>

	* lang.c (LANG_HOOKS_DECL_OK_FOR_SIBCALL): New.
	(java_decl_ok_for_sibcall): New.

From-SVN: r67713
2003-06-10 16:43:39 +00:00
Roger Sayle 8c6a82695b calls.c (expand_call): Avoid calling pure or const functions when the result is ignored (or void) and...
* calls.c (expand_call): Avoid calling pure or const functions
	when the result is ignored (or void) and none of the arguments
	are volatile.  Move warning diagnostic earlier in function.

From-SVN: r67436
2003-06-04 12:07:52 +00:00
Aldy Hernandez ded9bf77e3 function.c (assign_parms): Split complex arguments.
2003-06-03  Aldy Hernandez  <aldyh@redhat.com>

        * function.c (assign_parms): Split complex arguments.

        * doc/tm.texi (SPLIT_COMPLEX_ARGS): Document.

        * expr.h (SPLIT_COMPLEX_ARGS): Define.
        (split_complex_types): Protoize.
        (split_complex_values): Protoize.

        * calls.c (expand_call): Split complex arguments on architectures
        that require it.
        (split_complex_values): New.
        (split_complex_types): New.

        * config/rs6000/rs6000.c (rs6000_libcall_value): New.
        (rs6000_function_value): Handle complex values on AIX.
        (rs6000_complex_function_value): New.

        * config/rs6000/rs6000-protos.h (rs6000_libcall_value): Protoize.

        * config/rs6000/rs6000.h (LIBCALL_VALUE): Call function.
        (SPLIT_COMPLEX_ARGS): New.

From-SVN: r67367
2003-06-03 11:14:07 +00:00
Richard Kenner 7a6cdb44fd tree.h (contains_placeholder_p): Now returns bool.
* tree.h (contains_placeholder_p): Now returns bool.
	(CONTAINS_PLACEHOLDER_P): New macro.
	(type_contains_placeholder_p): New function.
	* tree.c (save_expr): Remove code avoiding folding COMPONENT_REF.
	(contains_placeholder_p): Now returns bool.
	Rework to use CONTAINS_PLACEHOLDER_P macro.
	(type_contains_placeholder_p): New function.
	* fold-const.c (fold, case COMPONENT_REF): Don't fold if
	type_contains_placeholder_p.
	(fold_range_test, fold_mathfn_compare, fold_inf_compare, fold):
	Use CONTAINS_PLACEHOLDER_P macro.
	* builtins.c (fold_builtin): Likewise.
	* calls.c (initialize_argument_information): Likewise.
	* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
	* explow.c (expr_size): Likewise.
	* expr.c (store_constructor, get_inner_reference): Likewise.
	* function.c (assign_parms): Likewise.
	* stor-layout.c (variable_size): Likewise.

From-SVN: r67189
2003-05-27 14:44:57 -04:00
DJ Delorie d892f28886 calls.c (expand_call): If the arg block is going to grow downward...
* calls.c (expand_call): If the arg block is going to grow
downward, we need argblock to point to the top of the block,
not the bottom.

From-SVN: r67099
2003-05-22 16:54:43 -04:00
Kaveh R. Ghazi e34d07f255 builtins.c (validate_arglist): Eliminate libiberty VA_ macros, always use stdarg.
gcc:
	* builtins.c (validate_arglist): Eliminate libiberty VA_ macros,
	always use stdarg.
	* c-errors.c (pedwarn_c99): Likewise.
	* c-format.c (status_warning): Likewise.
	* c-semantics.c (build_stmt): Likewise.
	* calls.c (emit_library_call, emit_library_call_value): Likewise.
	* collect2.c (notice, fatal_perror, fatal, error): Likewise.
	* cpperror.c (cpp_error, cpp_error_with_line): Likewise.
	* diagnostic.c (build_message_string, output_printf,
	output_verbatim, verbatim, inform, warning, pedwarn, error, sorry,
	fatal_error, internal_error, warning_with_decl, pedwarn_with_decl,
	error_with_decl, fnotice): Likewise.
	* dwarf2asm.c (dw2_asm_output_data, dw2_asm_output_delta,
	dw2_asm_output_offset, dw2_asm_output_pcrel, dw2_asm_output_addr,
	dw2_asm_output_addr_rtx, dw2_asm_output_nstring,
	dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128,
	dw2_asm_output_delta_uleb128, dw2_asm_output_delta_sleb128,
	dw2_asm_output_encoded_addr_rtx): Likewise.
	* emit-rtl.c (gen_rtx, gen_rtvec): Likewise.
	* errors.c (warning, error, fatal, internal_error): Likewise.
	* final.c (output_operand_lossage, asm_fprintf): Likewise.
	* fix-header.c (fatal): Likewise.
	* gcc.c (fatal, error, notice): Likewise.
	* gcov.c (fnotice): Likewise.
	* genattrtab.c (attr_rtx, attr_printf): Likewise.
	* gengtype.c (error_at_line, xasprintf, oprintf): Likewise.
	* gensupport.c (message_with_line): Likewise.
	* mips-tfile.c (fatal, error): Likewise.
	* protoize.c (notice): Likewise.
	* ra-debug.c (ra_debug_msg): Likewise.
	* read-rtl.c (fatal_with_file_and_line): Likewise.
	* rtl-error.c (error_for_asm, warning_for_asm): Likewise.
	* tree.c (build, build_nt, build_function_type_list): Likewise.

cp:
	* error.c (cp_error_at, cp_warning_at, cp_pedwarn_at): Eliminate
	libiberty VA_ macros, always use stdarg.
	* rtti.c (create_pseudo_type_info): Likewise.
	* tree.c (build_min_nt, build_min): Likewise.

From-SVN: r66919
2003-05-17 22:21:35 +00:00
Olivier Hainque ee9609391b emit-rtl.c (last_call_insn, [...]): New functions.
* emit-rtl.c (last_call_insn, add_function_usage_to): New functions.
	* rtl.h (last_call_insn, add_function_usage_to): New prototypes.
	* builtins.c (expand_builtin_apply): Use the new emit-rtl functions.
	* calls.c (emit_call_1): Likewise.
	(expand_call): For calls initializing constant memory, replace
	emission of standalone mem /u clobber with function usage entry.
	* expr.c (emit_block_move_via_libcall): Likewise.
	* cse.c (count_reg_usage, case EXPR_LIST): New case.
	* flow.c (propagate_one_insn): Pass entire operand of
	CALL_INSN_FUNCTION_USAGE to mark_used_regs.
	* integrate.c (try_constants): For CALL_INSNs, substitute constants
	within the FUNCTION_USAGE also.
	* loop.c (prescan_loop): Note clobbers of const mem mentioned in
	FUNCTION_USAGE lists.
	* reload1.c (replace_pseudos_in): Renamed.
	(reload): Use it for clobbers surviving until the end of the reload.

From-SVN: r66429
2003-05-03 10:25:22 -04:00
Alan Modra e79498768f calls.c (struct arg_data): Move offset, slot_offset, size and alignment_pad to struct locate_and_pad_arg_data.
* calls.c (struct arg_data): Move offset, slot_offset, size and
	alignment_pad to struct locate_and_pad_arg_data.  Update all refs.
	(initialize_argument_information): Adjust call to locate_and_pad_parm.
	Delete alignment_pad var.  Don't calculate slot_offset here.
	(emit_library_call_value_1): Delete alignment_pad, offset and size
	vars.  Use struct locate_and_pad_arg_data instead.  Adjust refs.
	Adjust call to locate_and_pad_parm.  Don't tweak arg size for
	partial in-regs here.  Formatting fixes.
	* expr.h (struct locate_and_pad_arg_data): New struct.
	(locate_and_pad_parm): Adjust declaration.
	* function.c (assign_parms): Localize vars.  Use "locate" instead of
	other arg location vars.  Don't invoke FUNCTION_ARG or
	FUNCTION_INCOMING_ARG unless pretend_named is different from
	named_arg.  Heed MUST_PASS_IN_STACK and set up "partial" before
	calling locate_and_pad_parm.  Adjust locate_and_pad_parm call.
	Use slot_offset for stack home of reg parms.  Correct test for
	parm passed in memory.  Formatting fixes.
	(locate_and_pad_parm): Add "partial" to params.  Replace offset_ptr
	arg_size_ptr and alignment pad with "locate".  Set slot_offset here.
	Correct initial_offset_ptr handling.  Localize vars.  Always pad
	locate->offset even when in_regs.

From-SVN: r66383
2003-05-02 23:52:09 +09:30
Olivier Hainque 0219237c53 calls.c (expand_call): When modes of target and valreg match, force sibcall failure when target is a MEM.
* calls.c (expand_call): When modes of target and valreg match,	force
	sibcall failure when target is a MEM.

From-SVN: r66260
2003-04-29 17:47:42 -04:00
Mark Mitchell b2dd096b0c Makefile.in (calls.o): Depend on except.h.
* Makefile.in (calls.o): Depend on except.h.
	* calls.c: Include except.h.
	(emit_call_1): Call note_eh_region_may_contain_throw if
	appropriate.
	* except.c (eh_region): Add may_contain_throw.
	(expand_eh_region_end_cleanup): Do not include handler code when
	it cannot be reached.
	(note_eh_region_may_contain_throw): New function.
	* except.h (note_eh_region_may_contain_throw): New function.

	* call.c (build_over_call): Use build_cxx_call.
	(build_cxx_call): New method, split out of build_over_call.
	* cp-tree.h (language_function): Add can_throw.
	(build_cxx_call): Declare it.
	* decl.c (finish_function): If a function does not contain any
	calls to functions that can throw an exception, indicate that
	fact.
	* decl2.c (mark_used): Do not defer the instantiation of
	functions, if the current function does not throw.
	* optimize.c (maybe_clone_body): Copy TREE_NOTHROW to the clones.
	* pt.c (instantiate_decl): Make sure import_export_decl is called
	before emitting things.
	* rtti.c (throw_bad_cast): Use build_cxx_call.
	(build_dynamic_cast_1): Likewise.
	* typeck.c (build_function_call): Likewise.

	* g++.dg/template/recurse.C: Adjust location of error messages.

From-SVN: r65929
2003-04-22 05:44:12 +00:00
Olivier Hainque 6a48df451f calls.c (expand_call): Prevent sibcall optimization for calls to nested subprograms.
* calls.c (expand_call): Prevent sibcall optimization for calls to
	nested subprograms.

From-SVN: r65904
2003-04-21 17:08:50 -04:00
Richard Kenner f1d1b741e8 Install proper version.
From-SVN: r65815
2003-04-19 07:57:59 -04:00
Richard Kenner a259f21876 * calls.c (expand_call): Provide init for old_stack_pointer_delta.
From-SVN: r65814
2003-04-19 07:56:13 -04:00
Olivier Hainque 38afb23f55 calls.c (expand_call): Move special case for constructor calls to right place.
* calls.c (expand_call): Move special case for constructor calls
	to right place. Ensures constructor calls used to initialize
	arguments get a clean outgoing argument block for themselves.
	Move check for stack deallocation completeness until after last
	deallocation.  Add stack_pointer_delta to set of state
	variables saved and restored along with current stack_level.

From-SVN: r65795
2003-04-18 18:20:55 -04:00
Roger Sayle 1331d16fd4 builtin-types.def (BT_FN_STRING_CONST_STRING): New builtin type.
* builtin-types.def (BT_FN_STRING_CONST_STRING): New builtin type.
	(BT_FN_PTR_SIZE_SIZE): Likewise.
	* builtins.def (BUILT_IN_MALLOC, BUILT_IN_CALLOC, BUILT_IN_STRDUP):
	New built-in functions for malloc, calloc and strdup respectively.
	* calls.c (special_function_p): No need to handle malloc-like
	functions any longer.  ECF_MALLOC is set via built-in attributes.

	* c-decl.c (duplicate_decls): Preserve pure and malloc attributes.
	* cp/decl.c (duplicate_decls): Preserve pure and malloc attributes.
	* f/com.c (duplicate_decls): Preserve pure and malloc attributes.

	* doc/extend.texi: Document these new built-in functions.

	* gcc.dg/builtins-13.c: New test case.
	* gcc.dg/builtins-14.c: New test case.

From-SVN: r65560
2003-04-14 02:55:31 +00:00
Richard Henderson 68d28100a0 libfuncs.h (LTI_setbits, [...]): New.
* libfuncs.h (LTI_setbits, LTI_gcov_flush, LTI_gcov_init): New.
        (setbits_libfunc, gcov_flush_libfunc, gcov_init_libfunc): New.
        * optabs.c (init_optabs): Initialize them.
        (init_libfuncs): Use init_one_libfunc.
        * calls.c (expand_call): Use gcov_flush_libfunc.
        * expr.c (store_constructor): Use setbits_libfunc.
        * function.c (expand_main_function): Use init_one_libfunc.
        * profile.c (create_profiler): Use gcov_init_libfunc and DECL_RTL.

From-SVN: r65478
2003-04-11 12:45:32 -07:00
Roger Sayle 36dbb93d9f calls.c (flags_from_decl_or_type): Factor and remove redundant conditional tests.
* calls.c (flags_from_decl_or_type): Factor and remove redundant
	conditional tests.

From-SVN: r64347
2003-03-14 01:59:16 +00:00
Kazu Hirata 3dc575ffdb calls.c: Fix comment formatting.
* calls.c: Fix comment formatting.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* combine.c: Likewise.
	* dwarf2out.c: Likewise.
	* ggc-common.c: Likewise.
	* langhooks.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop.c: Likewise.
	* ra-build.c: Likewise.
	* sbitmap.c: Likewise.
	* toplev.c: Likewise.

From-SVN: r63966
2003-03-08 01:38:27 +00:00
Jan Hubicka b255a03659 Makefile.in (calls.o, [...]): Depend on cgraph.h
* Makefile.in (calls.o, toplev.o alias.o): Depend on cgraph.h
	* alias.c:  Include cgraph.h
	(mark_constant_function): Use cgraph_rtl_info.
	* calls.c:  Include cgraph.h
	(flags_from_decl_or_type): Use cgraph_rtl_info to find pure and const
	calls.
	(expand_call): Use cgraph_rtl_info to set preferred stack boundary.
	* cgraph.c (cgraph_rtl_info): New function.
	* cgraph.h (cgraph_rtl_info): Declare
	(cgraph_rtl_info): Likewise.
	* function.h (struct function): Add recursive_call_emit.
	* toplev.c: Include cgraph.h.
	(rest_of_compilation): Set preferred_incoming_stack_boundary.

	* gcc.dg/i386-local2.c: New.

From-SVN: r63868
2003-03-05 22:19:33 +00:00
Jason Merrill d1a74aa7d3 tree-inline.c (find_builtin_longjmp_call): Save and restore lineno and input_filename.
* tree-inline.c (find_builtin_longjmp_call): Save and restore
        lineno and input_filename.
        (find_alloca_call): Likewise.
        (inlinable_function_p): Run the langhook earlier.

        * calls.c (compute_argument_addresses): Give the new MEMs a
        minimum alignment of PARM_BOUNDARY.
cp/
        * decl.c (start_function): Clear DECL_NUM_STMTS.

        * class.c (get_vtable_decl): Use vtbl_type_node.
        (build_primary_vtable): Check for it.

From-SVN: r63733
2003-03-03 16:28:23 -05:00
Jan Hubicka 09e2bf486d calls.c (rtx_for_function_call): Take the address as an argument
* calls.c (rtx_for_function_call): Take the address as an argument
	(expand_call): Do not modify the expression.

From-SVN: r63725
2003-03-03 18:27:09 +00:00
Alan Modra 8403445aba calls.c (store_one_arg): Revert 1999-02-16 change.
* calls.c (store_one_arg): Revert 1999-02-16 change.  Revert
	2000-12-17 change.  Pass EXPAND_STACK_PARM to expand_expr.
	* expr.h (enum expand_modifier): Define EXPAND_STACK_PARM.
	(enum block_op_methods): Reorder for better store_expr optimization.
	* expr.c (store_expr): Test bit 1 of "want_value" for call param
	stores, test bit 0 for original want_value meaning.  Pass
	BLOCK_OP_CALL_PARM to emit_block_move when bit 1 set.  Adjust
	recursive calls, and calls to expand_param.
	(expand_expr): Handle EXPAND_STACK_PARM modifier.  When cse
	expected, set target to 0 rather than to subtarget.  Formatting.

From-SVN: r63337
2003-02-24 08:49:39 +10:30
Jan Hubicka 563a317a85 calls.c (expand_call): Update call of INIT_CUMULATIVE_ARGS
* calls.c (expand_call): Update call of INIT_CUMULATIVE_ARGS
	* function.c (assign_params): Likewise.
	* arm-protos.h (arm_init_cumulative_args): Update prototype.
	* arm.c (arm_init_cumulative_args): Update function.
	* arm.h (INIT_CUMULATIVE_ARGS): Update.
	* avr-protos.h (init_cumulative_args): Update prototype.
	* avr.c (init_cumulative_args): Update function.
	* avr.h (INIT_CUMULATIVE_ARGS): Update.
	* d30v-protos.h (d30v_init_cumulative_args): Update prototype.
	* d30v.c (d30v_init_cumulative_args): Update function.
	* d30v.h (INIT_CUMULATIVE_ARGS): Update.
	* frv-protos.h (frv_init_cumulative_args): Update prototype.
	* frv.c (frv_init_cumulative_args): Update function.
	* frv.h (INIT_CUMULATIVE_ARGS): Update.
	* mips.c (mips_expand_prolgue): Update call of INIT_CUMULATIVE_ARGS.
	* pa.h (INIT_CUMULATIVE_ARGS): Update.
	* sparc-protos.h (init_cumulative_args): Update prototype.
	* sparc.c (init_cumulative_args): Update function.
	* sparc.h (INIT_CUMULATIVE_ARGS): Update.
	* tm.texi (INIT_CUMULATIVE_ARGS): Update documentation.

From-SVN: r63126
2003-02-19 18:03:11 +00:00
Alan Modra 546ff7777c calls.c (try_to_integrate): Tidy stack_usage_map access.
* calls.c (try_to_integrate): Tidy stack_usage_map access.
	(emit_library_call_value_1): Likewise.	Formatting.
	(store_one_arg): Likewise.

From-SVN: r62622
2003-02-10 16:46:53 +10:30
Richard Henderson 40cdfd5aa4 * calls.c (default_must_pass_in_stack): Fix typo in !type case.
From-SVN: r61980
2003-01-28 08:56:36 -08:00
Alexandre Oliva c329756171 calls.c (emit_library_call_value_1): Handle return values in a PARALLEL.
* calls.c (emit_library_call_value_1): Handle return values
in a PARALLEL.

From-SVN: r61826
2003-01-26 09:06:36 +00:00
Alan Modra b820d2b870 calls.c (save_fixed_argument_area): Tidy.
* calls.c (save_fixed_argument_area): Tidy.
	(restore_fixed_argument_area): Tidy.  Set alignment of stack_area.
	(expand_call): Comment typo fixes.  Don't init low_to_save.  Start
	call chain loop at 1 if !try_tail_call.  Formatting.
	(emit_library_call_value_1): Don't init low_to_save or high_to_save.
	Use save_fixed_argument_area and restore_fixed_argument_area.

From-SVN: r61818
2003-01-26 12:37:48 +10:30
Kaveh R. Ghazi 1f5b3282d9 * calls.c (fix_unsafe_tree): Prototype.
From-SVN: r61545
2003-01-21 14:28:38 +00:00
Christian Ehrhardt 292e35a31b re PR rtl-optimization/7507 (ICE (segfault) with -O2)
PR opt/7507
        * calls.c (fix_unsafe_tree): Split out from ...
        (expand_call): ... here.  Use it on the function address too.

From-SVN: r61539
2003-01-21 00:02:31 -08:00
Richard Henderson a4b1b92af3 expr.h (MUST_PASS_IN_STACK): Move implementation...
* expr.h (MUST_PASS_IN_STACK): Move implementation...
        * calls.c (default_must_pass_in_stack): ... here.

From-SVN: r61514
2003-01-20 15:20:18 -08:00
Kazu Hirata 32dd366d5e basic-block.h: Fix comment formatting.
* basic-block.h: Fix comment formatting.
	* calls.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* gcov.c: Likewise.
	* haifa-sched.c: Likewise.
	* libgcc2.c: Likewise.
	* loop.c: Likewise.
	* profile.c: Likewise.
	* system.h: Likewise.

From-SVN: r61478
2003-01-18 22:32:06 +00:00
Dale Johannesen 0cdca92b46 calls.c (load_register_parameters): Add is_sibcall, sibcall_failure parameters.
2003-01-10  Dale Johannesen <dalej@apple.com>
        * calls.c (load_register_parameters):  Add is_sibcall, sibcall_failure
        parameters.  Call check_sibcall_argument_overlap if indicated.
        (check_sibcall_argument_overlap):  Add mark_stored_args_map
        parameter.  Don't mark parameter area as clobbered if not set.
        (expand_call):  Adjust calls to above.

From-SVN: r61165
2003-01-10 19:49:09 +00:00
Jason Merrill f32ac70dae calls.c (expand_call): Don't try to be clever about expanding the return slot address.
* calls.c (expand_call): Don't try to be clever about expanding
        the return slot address.

From-SVN: r60234
2002-12-18 00:57:43 -05:00
Jason Merrill 89ea02fbac calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR with special struct-return ABIs.
* calls.c (expand_call): Handle CALL_EXPR_HAS_RETURN_SLOT_ADDR
        with special struct-return ABIs.

cp/
        * semantics.c (simplify_aggr_init_exprs_r): Don't change the type
        of the CALL_EXPR.

From-SVN: r60223
2002-12-17 16:29:29 -05:00
Zack Weinberg 4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Steve Ellcey 9ac3e73b40 tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
* doc/tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
	* defaults.h (FUNCTION_ARG_REG_LITTLE_ENDIAN): Remove definition.
	* calls.c (store_unaligned_arguments_into_pseudos) Remove
	FUNCTION_ARG_REG_LITTLE_ENDIAN.
	* stmt.c (expand_return): Ditto.
	* expr.c (move_block_from_reg): Ditto.
	(copy_blkmode_from_reg): Ditto.
	* expmed.c (store_bit_field): Ditto.

From-SVN: r59962
2002-12-09 17:54:07 +00:00
Jan Hubicka c986baf631 calls.c (alloca_call_p): New global function.
* calls.c (alloca_call_p): New global function.
	* tree.h (alloca_call_p): New.
	* tree-inline.c (inlinable_function_p):  Do not inline when
	function calls alloca.
	(find_alloca_call, find_alloca_call_1): New functions.

From-SVN: r59228
2002-11-18 19:30:34 +00:00
H.J. Lu 2da4124d3d calls.c (PUSH_ARGS_REVERSED): Define only if not defined.
2002-11-10  H.J. Lu <hjl@gnu.org>

	* calls.c (PUSH_ARGS_REVERSED): Define only if not defined.
	* expr.c (PUSH_ARGS_REVERSED): Likewise.

	* config/i386/i386.h (PUSH_ARGS_REVERSED): Set to 1.

From-SVN: r59002
2002-11-10 19:13:18 -08:00
Ulrich Weigand 97d05bfdd2 c-opts.c (missing_arg): Use cl_options[opt_index].opt_code instead of just opt_index as switch expression.
* c-opts.c (missing_arg): Use cl_options[opt_index].opt_code
	instead of just opt_index as switch expression.

	* calls.c (store_one_arg): Change type of 'excess_align'
	to unsigned int.

	* profile.c (output_gcov_string): Change type of 'temp'
	to size_t.

From-SVN: r58381
2002-10-21 20:24:57 +00:00
Jan Hubicka db6556348d re PR c/7344 (performance regression on huge case statements)
* calls.c (expand_call): Simplify noreturn call.

	PR c/7344
	* cfgbuild.c (make_edges): Create edge cache when we do have
	large jumptable.
	(do_tablejump): Note size of maximal jumptable.
	* function.c (prepare_function_start): Zero out size.
	* function.h (function): Add max_jumptable_ents.

	* cfgcleanup.c (insn_match_p): Verify sibcall flag for calls to.

From-SVN: r58063
2002-10-11 20:26:50 +00:00
Richard Henderson fd1e5d25e3 calls.c (precompute_register_parameters): Force non-legitimate constants into pseudos.
* calls.c (precompute_register_parameters): Force non-legitimate
        constants into pseudos.
	* gcc.dg/tls/opt-3.c: New.

From-SVN: r57709
2002-10-01 13:49:39 -07:00
David S. Miller 99a3256796 re PR rtl-optimization/7335 (Sparc: ICE in verify_wide_reg (flow.c:557) with long double and optimization)
2002-09-26  David S. Miller  <davem@redhat.com>

	PR optimization/7335
	* calls.c (emit_library_call_value_1): Passing args by reference
	converts a CONST function into a PURE one.

From-SVN: r57576
2002-09-26 21:12:51 -07:00
Kazu Hirata da7d830409 ChangeLog: Follow spelling conventions.
* ChangeLog: Follow spelling conventions.
	* ChangeLog.0: Likewise.
	* ChangeLog.1: Likewise.
	* ChangeLog.2: Likewise.
	* ChangeLog.3: Likewise.
	* ChangeLog.4: Likewise.
	* ChangeLog.5: Likewise.
	* ChangeLog.6: Likewise.
	* FSFChangeLog.10: Likewise.
	* FSFChangeLog.11: Likewise.
	* alias.c: Likewise.
	* basic-block.h: Likewise.
	* c-aux-info.c: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-decl.c: Likewise.
	* c-format.c: Likewise.
	* c-semantics.c: Likewise.
	* c-typeck.c: Likewise.
	* calls.c: Likewise.
	* cfganal.c: Likewise.
	* cfgloop.c: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* conflict.c: Likewise.
	* cppexp.c: Likewise.
	* cppfiles.c: Likewise.
	* cpphash.h: Likewise.
	* cppinit.c: Likewise.
	* cpplex.c: Likewise.
	* cpplib.c: Likewise.
	* cpplib.h: Likewise.
	* cppmacro.c: Likewise.
	* cse.c: Likewise.

From-SVN: r57398
2002-09-22 02:03:17 +00:00
Richard Henderson 1b1f20cab9 calls.c (store_one_arg): Rename default_align to parm_align; always adjust parm_align for downward padding.
* calls.c (store_one_arg): Rename default_align to parm_align;
	always adjust parm_align for downward padding.

From-SVN: r57292
2002-09-18 17:37:24 -07:00
John David Anglin 9dff28ab53 calls.c (store_one_arg): Set default alignment for BLKmode arguments to BITS_PER_UNIT when...
* calls.c (store_one_arg): Set default alignment for BLKmode arguments
	to BITS_PER_UNIT when ARGS_GROW_DOWNWARD and the padding direction is
	downward.
	* function.c (pad_below):  Always compile.
	(locate_and_pad_parm): If defined ARGS_GROW_DOWNWARD, pad argument to
	alignment when it is not in a register or REG_PARM_STACK_SPACE is true.
	Pad below when the argument is not in a register and the padding
	direction is downward.
	* pa-64.h (MUST_PASS_IN_STACK): Move define to pa.h.
	(PAD_VARARGS_DOWN): Define.
	* pa.c (function_arg_padding): Revise padding directions to make them
	compatible with the 32 and 64-bit runtime architecture documentation.
	(hppa_va_arg):  Add code to handle variable and size zero arguments
	passed by reference on TARGET_64BIT.  Reformat.
	(function_arg): Use a PARALLEL for BLKmode and aggregates args on
	TARGET_64BIT.  Use a DImode PARALLEL for BLKmode args 5 to 8 bytes
	wide when !TARGET_64BIT.  Move forward check for mode==VOIDmode.
	Add comments.
	* pa.h (MAX_PARM_BOUNDARY): Correct define for TARGET_64BIT.
	(RETURN_IN_MEMORY): Return size zero types in memory.
	(FUNCTION_VALUE): Return TFmode in general registers.
	(MUST_PASS_IN_STACK): Define.
	(FUNCTION_ARG_BOUNDARY): Simplify.
	(FUNCTION_ARG_PASS_BY_REFERENCE): Pass variable and zero sized types
	by reference.
	(FUNCTION_ARG_CALLEE_COPIES): Define to FUNCTION_ARG_PASS_BY_REFERENCE.

From-SVN: r57226
2002-09-17 03:30:37 +00:00
Kazu Hirata d57551c71b calls.c (emit_library_call_value_1): Don't refer to hard_libcall_value.
* calls.c (emit_library_call_value_1): Don't refer to
	hard_libcall_value.
	* optabs.c (prepare_float_lib_cmp): Likewise.

From-SVN: r57207
2002-09-16 18:47:59 +00:00
Jason Merrill db4c55f693 calls.c (store_one_arg): Use size_in_bytes to determine the amount of space to push.
* calls.c (store_one_arg): Use size_in_bytes to determine the
        amount of space to push.

From-SVN: r57064
2002-09-12 10:00:21 -04:00
Richard Henderson 44bb111a78 expr.h (enum block_op_methods): New.
* expr.h (enum block_op_methods): New.
        (emit_block_move): Update prototype.
        * expr.c (block_move_libcall_safe_for_call_parm): New.
        (emit_block_move_via_loop): New.
        (emit_block_move): Use them.  New argument METHOD.
        (emit_push_insn): Always respect the given alignment.
        (expand_assignment): Update call to emit_block_move.
        (store_expr, store_field, expand_expr): Likewise.
        * builtins.c (expand_builtin_apply): Likewise.
        (expand_builtin_memcpy, expand_builtin_va_copy): Likewise.
        * function.c (expand_function_end): Likewise.
        * config/sh/sh.c (sh_initialize_trampoline): Likewise.
        * config/sparc/sparc.c (sparc_va_arg): Likewise.
        * calls.c (expand_call, emit_library_call_value_1): Likewise.
        (save_fixed_argument_area): Use emit_block_move with
        BLOCK_OP_CALL_PARM instead of move_by_pieces.
        (restore_fixed_argument_area): Likewise.
        (store_one_arg): Fix alignment parameter to emit_push_insn.

From-SVN: r56661
2002-08-29 12:20:01 -07:00
Richard Henderson 236261548b calls.c: Include target.h.
* calls.c: Include target.h.
        * Makefile.in (calls.o): Update.

        * config/alpha/alpha.c (alpha_end_function): Use targetm.binds_local_p.
        * config/alpha/alpha.h (FUNCTION_OK_FOR_SIBCALL): Likewise.

From-SVN: r56335
2002-08-14 17:07:55 -07:00
J"orn Rennecke a0dc500c86 calls.c (emit_library_call_value_1): If FUNCTION_ARG_PASS_BY_REFERENCE is true...
* calls.c (emit_library_call_value_1): If
	FUNCTION_ARG_PASS_BY_REFERENCE is true, pretend this is neither
	libcall, const call nor pure call.

From-SVN: r55676
2002-07-23 12:18:10 +01:00
David S. Miller 2f937369fa Delete SEQUENCE rtl usage outside of reorg and ssa passes.
2002-06-05  David S. Miller  <davem@redhat.com>

	Delete SEQUENCE rtl usage outside of reorg and ssa passes.
	* rtl.h (gen_sequence, emit_insns, emit_insns_before,
	emit_insns_before_scope, emit_insns_after,
	emit_insns_after_scope): Delete declaration.
	* ada/misc.c (insert_code_for): Use emit_insn* instead of
	emit_insns_foo.
	* config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE.
	(alpha_set_memflags): Fix comment.
	(set_frame_related_p): Use get_insns instead of gen_sequence.
	* config/alpha/alpha.md (setjmp receiver splitter): Avoid
	emitting no insns.
	* config/arm/arm.c (arm_finalize_pic): Use get_insns instead of
	gen_sequence.
	(arm_gen_load_multiple, arm_gen_store_multiple): Likewise.
	* config/fr30/fr30.c (fr30_move_double): Likewise.
	* config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr):
	Likewise.
	* config/ia64/ia64.c (spill_restore_mem): Likewise.
	* config/ia64/ia64.md (conditional move spliiter): Avoid emitting
	no insns.
	* config/m32r/m32r.c (gen_split_move_double): Use get_insns
	instead of gen_sequence.
	* config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise.
	(mips_expand_prologue, mips16_gp_pseudo_reg): Likewise.
	* config/sh/sh.c (sh_need_epilogue): Likewise.
	* config/sparc/sparc.md (current_function_calls_alloca, flat): New
	attributes.
	(setjmp pattern and split): Use them to avoid splitter which emits
	no RTL.
	* genattrtab.c (main): Emit include of function.h
	* config/stormy16/stormy16.c (xstormy16_split_cbranch): Use
	get_insns instead of gen_sequence.
	* config/cris/cris.c (cris_split_movdx): Likewise.
	* emit-rtl.c (emit_insns*): Kill.
	(try_split): Expect insn list instead of SEQUENCE.
	(make_jump_insn_raw, make_call_insn_raw): Fix comments.
	(emit_*insn*): Reimplement to work with INSN lists and PATTERNs.
	Make them abort if a SEQUENCE is given and RTL checking is
	enabled.
	(emit_*_scope): Don't forget to set scope on final insn.
	(gen_sequence): Move from here...
	* ssa.c (gen_sequence): To here as private function.
	* builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix
	comments.
	(expand_builtin_return, expand_builtin_mathfn): Likewise.
	(expand_builtin_strlen): Use get_insns instead of gen_sequence.
	(expand_builtin_saveregs): Use emit_insn_foo, fix comments.
	(expand_builtin_expect_jump): Use get_insns and fix comments.
	* calls.c (try_to_integrate): Use emit_insn_foo.
	(expand_call, emit_library_call_value_1): Likewise.
	* expr.c (emit_queue): Handle insn lists instead of SEQUENCE.
	(emit_move_insn_1): Use get_insns instead of gen_sequence.
	(expand_expr): Use emit_insn_foo.
	* cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo.
	* except.c (build_post_landing_pads): Likewise.
	* flow.c (attempt_auto_inc): Likewise.
	* stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label,
	expand_nl_goto_receivers, expand_decl_cleanup): Likewise.
	* function.c (fixup_var_refs_insn): Use get_insns instead of
	gen_sequence.
	(fixup_var_refs_1): Likewise and expect insn list from gen_foo.
	(fixup_memory_subreg): Use get_insns instead of gen_sequence.
	(fixup_stack_1, purge_addressof_1, expand_main_function,
	get_arg_pointer_save_area): Likewise.
	(optimize_bit_field, instantiate_virtual_regs_1, assign_parms,
	expand_function_end): Use emit_insn_foo.
	(record_insns, keep_stack_depressed): Work with insn list instead
	of SEQUENCE, fix comments.
	* ifcvt.c (noce_emit_store_flag, noce_try_store_flag,
	noce_try_store_flag_constants, noce_try_store_flag_inc,
	noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith,
	noce_try_minmax, noce_try_abs): Use emit_insn_foo.
	(noce_process_if_block): Use get_insns instead of gen_sequence.
	* optabs.c (add_equal_note): Work with insn list, fix comments.
	(expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo.
	(expand_unop, expand_complex_abs, expand_unop_insn,
	expand_no_conflict_block): Likewise.
	(gen_move_insn): Use get_insns instead of gen_sequence.
	(gen_cond_trap): Likewise.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	(emit_initial_value_sets): Use emit_insn_foo.
	* reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise.
	(fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently
	now that RTL generators give insn lists.
	* sibcall.c (replace_call_placeholder): Use emit_insn_foo.
	* doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns
	instead of gen_sequence.
	(doloop_optimize): Work with insn lists instead of SEQUENCE rtl.
	* explow.c (emit_stack_save, emit_stack_restore): Use get_insns
	instead of gen_sequence.
	* loop.c (move_movables, emit_prefetch_instructions,
	gen_add_mult, check_dbra_loop, gen_load_of_final_value):
	Likewise.
	(loop_regs_update): Work with insn list instead of SEQUENCE rtl.
	(product_cheap_p): Likewise, and add commentary about RTL wastage
	here.
	* lcm.c (optimize_mode_switching): Use get_insns instead of
	gen_sequence.
	* profile.c (gen_edge_profiler): Likewise.
	* regmove.c (copy_src_to_dest): Likewise.
	* reg-stack.c (compensate_edge): Likewise and fix comment.
	* gcse.c (process_insert_insn): Likewise.
	(insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl.
	* jump.c (delete_prior_computation): Update comment.
	* genemit.c (gen_expand, gen_split, main): Use get_insns instead
	of gen_sequence, update comments to match.
	* recog.c (peephole2_optimize): Work with insn lists instead of
	SEQUENCE rtl.
	* sched-vis.c (print_pattern): Abort on SEQUENCE.
	* unroll.c (unroll_loop, find_splittable_givs, final_giv_value):
	Use get_insns instead of gen_sequence.
	(copy_loop_body): Likewise and don't emit dummy NOTE.
	* genrecog.c: Don't mention SEQUENCE rtl in comments.
	* combine.c (try_combine): Expect insn lists from split generator.
	* reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by
	hand.

From-SVN: r54497
2002-06-11 05:22:48 -07:00
J"orn Rennecke fcae219ac4 loop.c (load_mems): Don't change the interface of called functions.
* loop.c (load_mems): Don't change the interface of called functions.

	* calls.c (expand_call): Take current_function_pretend_args_size
	into account when setting argblock for sibcalls.

From-SVN: r52745
2002-04-25 00:52:16 +01:00
Jason Merrill e6f648758e fix whitespace
From-SVN: r52210
2002-04-12 06:35:30 -04:00
David S. Miller aa7634ddf7 calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg.
2002-04-04  David S. Miller  <davem@redhat.com>

	* calls.c (store_one_arg): If ECF_SIBCALL, use tail_call_reg.

From-SVN: r51886
2002-04-04 15:30:18 -08:00
Neil Booth dffd7eb68a c-decl.c (grokdeclarator): Update.
* c-decl.c (grokdeclarator): Update.
	* c-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* c-tree.h (c_mark_addressable): New.
	* c-typeck.c (default_function_array_conversion, build_unary_op,
	build_array_ref, convert_for_assignment): Update.
	(mark_addressable): Rename.
	* calls.c (try_to_integrate, expand_call): Use langhook.
	* expr.c (expand_expr): Use langhook.
	* langhooks-def.h (LANG_HOOKS_INITIALIZER): Update.
	* langhooks.h (struct lang_hooks): New hook.
	* stmt.c (expand_asm_operands): Use langhook.
	* tree.h (mark_addressable): Remove.
ada:
	* decl.c (gnat_to_gnu_entity): Update.
	* gigi.h (mark_addressable): Rename.
	* misc.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* trans.c (tree_transform): Update.
	* utils.c (create_var_decl): Update.
	* util2.c (build_binary_op, build_unary_op,
	fill_vms_descriptor): Update.
	(mark_addressable): Rename, update.
cp:
	* call.c (build_addr_func): Update.
	* class.c (resolve_address_of_overloaded_function): Update.
	* cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* cp-tree.h (cxx_mark_addressable): New.
	* decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
	* decl2.c (build_cleanup): Update.
	* except.c (build_throw): Update.
	* init.c (resolve_offset_ref): Update.
	* pt.c (convert_nontype_argument): Update.
	* semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
	* typeck.c (decay_conversion, build_array_ref, build_unary_op,
	unary_complex_lvalue): Update.
	(mark_addressable): Rename.
f:
	* com.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	(mark_addressable): Rename.
	(ffecom_arrayref_, ffecom_1): Update.
java:
	* java-tree.h (java_mark_addressable): New.
	* lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* typeck.c (mark_addressable): Rename, update.
objc:
	* objc-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.

From-SVN: r51705
2002-04-01 20:26:18 +00:00
Neil Booth b0c4822985 Makefile.in (convert.o, [...]): Update.
* Makefile.in (convert.o, calls.o, expmed.o): Update.
	* attribs.c (handle_mode_attribute, handle_vector_size_attribute):
	Use new hooks.
	* builtin-types.def (BT_PTRMODE): Update.
	* c-common.c (type_for_size): Rename c_common_type_for_size.
	(type_for_mode): Similarly.
	(shorten_compare, pointer_int_sum, c_common_nodes_and_builtins):
	Use new hook.
	* c-bommon.h (c_common_type_for_size, c_common_type_for_mode): New.
	* c-decl.c (finish_enum, build_enumerator): Use new hooks.
	* c-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* c-typeck.c (common_type, comptypes, default_conversion):
	Use new hooks.
	* calls.c: Include langhooks.h.
	(emit_library_call_value_1): Use new hooks.  Avoid redundant
	calls.
	* convert.c: Include langhooks.h
	(convert_to_pointer, convert_to_integer): Use new hooks.
	* except.c (init_eh): Similarly.
	* expmed.c: Include langhooks.h.
	(expand_mult_add): Use new hooks.
	* expr.c (store_expr, store_constructor, expand_expr, do_jump,
	try_casesi): Similarly.
	* fold-const.c (optimize_bit_field_compare, make_range,
	decode_field_reference, fold_truthop, fold): Similarly.
	* function.c (assign_stack_local_1, assign_stack_temp_for_type,
	put_var_into_stack): Similarly.
	* langhooks-def.h (LANG_HOOKS_TYPE_FOR_MODE,
	LANG_HOOKS_TYPE_FOR_SIZE): New.
	(LANG_HOOKS_TYPES_INITIALIZER): Update.
	* langhooks.h (lang_hooks_for_types): New hooks.
	* stmt.c (expand_decl_cleanup, emit_case_nodes): Use new hooks.
	* tree.c (get_unwidened, get_narrower): Similarly.
	* tree.h (type_for_mode, type_for_size): Remove.
	* varasm.c (force_const_mem): Use new hooks.
ada:
	* gigi.h (type_for_size, type_for_mode): Rename.
	* misc.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* trans.c (tree_transform): Update.
	* utils.c (gnat_init_decl_processing, init_gigi_decls,
	builtin_function, float_type_for_size, signed_or_unsigned_type,
	build_vms_descriptor, unchecked_convert): Update.
	(type_for_mode, type_for_size): Rename.
	* utils2.c (nonbinary_modular_operation): Update.
cp:
	* cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	* cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
	* decl.c (finish_enum): Similarly.
	* error.c (dump_type): Similarly.
	* lex.c (cxx_init): Similarly.
	* mangle.c (write_builtin_type): Similarly.
	* typeck.c (comptypes): Similarly.
f:
	* com.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
	Redefine.
	(type_for_mode, type_for_size): Rename.
	(signed_or_unsigned_type, signed_type, truthvalue_conversion,
	unsigned_type):	Use new hooks.
java:
	* Make-lang.in (builtins.o): Update.
	* boehm.c (get_boehm_type_descriptor): Update.
	* builtins.c: Include langhooks.h.
	* decl.c (java_init_decl_processing): Update.
	* java-tree.h (java_type_for_mode, java_type_for_size): New.
	* lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
	Redefine.
	* typeck.c (type_for_mode, type_for_size): Update.
objc:
	* objc-act.c (handle_impent): Update.
	* objc-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIaZE):
	Redefine.

From-SVN: r51571
2002-03-29 21:46:27 +00:00
Mark Mitchell 1929c971b9 calls.c (precompute_arguments): Do not assume that temporaries can be destroyed after expanding the argument.
* calls.c (precompute_arguments): Do not assume that temporaries
	can be destroyed after expanding the argument.
	(expand_call): Likewise.

From-SVN: r51011
2002-03-18 22:25:50 +00:00
Steve Ellcey 7879b81e6c rtl.texi (SUBREG_PROMOTED_UNSIGNED_P): Change definition to take ptr_extend into account as third type of extension.
* doc/rtl.texi (SUBREG_PROMOTED_UNSIGNED_P): Change definition
        to take ptr_extend into account as third type of extension.
        (SUBREG_PROMOTED_UNSIGNED_SET): Definition of new macro to set bit
        fields used by SUBREG_PROMOTED_UNSIGNED_P.
        * rtl.h (SUBREG_PROMOTED_UNSIGNED_SET): New macro.
        (SUBREG_PROMOTED_UNSIGNED_P): Change to return -1 as well as 0 or 1.
        * calls.c (precompute_arguments): Use new macro.
        (expand_call): Ditto.
        * combine.c (nonzero_bits): Ditto.
        (record_promoted_value): Ditto.
        * expr.c (store_expr): Ditto.
        (expand_expr): Ditto.
        * function.c (assign_parms): Ditto.

From-SVN: r50174
2002-02-28 17:19:52 -08:00
Alexandre Oliva 841404cd71 calls.c (store_one_arg): In the non-BLKmode non-partial case...
* calls.c (store_one_arg): In the non-BLKmode non-partial case,
take padding into account when computing the argument value.

From-SVN: r49675
2002-02-11 13:33:07 +00:00
Alexandre Oliva fa5322fa58 Contribute sh64-elf.
2002-02-09  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (TARGET_CANNOT_MODIFY_JUMPS_P): Define to...
(sh_cannot_modify_jumps_p): New function.
2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (TARGET_MS_BITFIELD_LAYOUT_P): Define to...
(sh_ms_bitfield_layout_p): New function.
2002-02-04  Alexandre Oliva  <aoliva@redhat.com>
	    Zack Weinberg  <zack@codesourcery.com>
* config/sh/sh.h (TRAMPOLINE_ADJUST_ADDRESS): Use
expand_simple_binop instead of expand_binop.
2002-02-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (OVERRIDE_OPTIONS) [! TARGET_SH5]: Disable
use of .quad and .uaquad.
* config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP,
TARGET_ASM_ALIGNED_DI_OP): Add comment pointing to the above.
2002-01-24  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (movdi_const, movdi_const_32bit,
movdi_const_16bit): Make sure all CONSTs have modes.
(sym2PIC): Ditto, but by adjusting all callers.
* config/sh/sh.c (calc_live_regs) [TARGET_SHCOMPACT]: Set pr_live
if the prologue calls the SHmedia argument decoder or register
saver.
2002-01-24  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (TARGET_ASM_UNALIGNED_DI_OP): Define.
(TARGET_ASM_ALIGNED_DI_OP): Likewise.
(sh_expand_epilogue): Don't emit USE of return target register.
(prepare_move_operands): Legitimize DImode PIC addresses.
(sh_media_register_for_return): Skip tr0, used to initialize the
PIC register.
(sh_expand_prologue): Remove explicit USE of return register.
(nonpic_symbol_mentioned_p): PC is non-PIC.  Don't recurse in
CONST_DOUBLEs.  UNSPEC_GOTPLT is PIC.
* config/sh/sh.h (ASM_OUTPUT_DOUBLE_INT): Removed, obsolete.
(OVERRIDE_OPTIONS): Don't disable PIC on SH5.
(EXTRA_CONSTRAINT_S): Use MOVI_SHORI_BASE_OPERAND_P instead of
EXTRA_CONSTRAINT_T.
(GOT_ENTRY_P, GOTPLT_ENTRY_P, GOTOFF_P, PIC_ADDR_P): New.
(MOVI_SHORI_BASE_OPERAND_P): New.
(NON_PIC_REFERENCE_P, PIC_REFERENCE_P): New.
(EXTRA_CONSTRAINT_T): Define in terms of them.
(OUTPUT_ADDR_CONST_EXTRA): Handle UNSPEC_GOTPLT.
* config/sh/sh.md (movsi_media, movsi_media_nofpu,
movdi_media, movdi_media_nofpu): Add SIBCALL_REGS class to
alternatives supporting TARGET_REGS.
(UNSPEC_GOTPLT): New constant.
(movdi split): Move incrementing of LABEL_NUSES...
(movdi_const, movdi_const_32bit): Here.  Use
MOVI_SHORI_BASE_OPERAND_P instead of EXTRA_CONSTRAINT_T.
(movdi_const_16bit): New.
(call, call_value) [flag_pic]: Use GOTPLT.
(call_pop, call_value_pop): New expands.
(call_pop_compact, call_pop_rettramp): New insns.
(call_value_pop_compact, call_value_pop_rettramp): New insns.
(sibcall) [flag_pic]: Use GOT.
(builtint_setjmp_receiver): Remove bogus, unused expand.
(GOTaddr2picreg): Implement for SHcompact and SHmedia.
(*pt, *ptb, ptrel): New insns.
(sym2GOT): Handle DImode GOT.
(sym2GOTPLT, symGOTPLT2reg): New expands.
(sym2PIC): New expand.
(shcompact_return_tramp): Use GOTPLT to return trampoline.
(shcompact_return_tramp_i): Use return register explicitly.
* config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SHMEDIA]: Don't
disable flag_reorder_blocks.
2002-01-19  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (sibcall_compact): Reorder return, uses and
clobbers, for clarity.
(sibcall_epilogue) [TARGET_SHCOMPACT]: Mark saving and
restoring of r0 in macl as MAYBE_DEAD.
2002-01-18  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (LONG_DOUBLE_TYPE_SIZE): Define.
* config/sh/sh.md (movv4sf_i, movv16sf_i): Fix uses of
alter_subreg all over.
(jump) [TARGET_SHMEDIA]: FAIL to create new jumps after
reload, instead of emitting instructions that would require
reloading.
(casesi_load_media): Add missing modes.
2001-11-09  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (sh_expand_prologue): Mark the PIC register
as used if the argument decoder is called.
2001-08-28  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (udivsi3, divsi3): Load libcall symbol name in
Pmode, then extend it to DImode if necessary.
2001-08-28  Stephen Clarke  <Stephen.Clarke@st.com>
* config/sh/sh.h (LEGITIMATE_CONSTANT_P): Don't accept DFmode
constants in FPU-enabled SHmedia, let them be loaded from memory.
2001-08-28  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (cmpeqdi_media, cmpgtdi_media, cmpgtudi_media):
Adjust whitespace in assembly output templates.
2001-08-28  Stephen Clarke  <Stephen.Clarke@st.com>
* config/sh/sh.md (movdicc_false, movdicc_true, movdicc): Adjust
mode of if_then_else.
2001-08-04  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): Override definition in
sh.h.
2001-07-26  Andrew Haley  <aph@cambridge.redhat.com>
	    Joern Rennecke <amylaar@redhat.com>
* config/sh/sh64.h (CPP_DEFAULT_CPU_SPEC): New.
(SUBTARGET_CPP_PTR_SPEC): New.
(SUBTARGET_CPP_SPEC): Remove.
2001-07-06  Chandrakala Chavva  <cchavva@redhat.com>
* config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1):
Fix typo in previous checkin.
2001-07-11  Chandrakala Chavva  <cchavva@redhat.com>
* config/sh/sh.h (MODES_TIEABLE_P): Fix redact indentations.
2001-07-10  Chandrakala Chavva  <cchavva@cygnus.com>
	    Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (MODES_TIEABLE_P): Don't tie modes wider than
what single FP register can hold for SHmedia target.
2001-07-06  Chandrakala Chavva  <cchavva@redhat.com>
	    Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (movsf_media_nofpu+1, movdf_media_nofpu+1):
Do not split into SUBREG.
2001-06-14  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/ushmedia.h, config/sh/sshmedia.h: Updated signatures
and added new functions as specified in SH5 ABI r9.
2001-06-04  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/lib1funcs.asm (GCC_nested_trampoline): Align to an
8-byte boundary.
2001-06-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (dump_table): Add const0_rtx in calls of
gen_consttable_4 and gen_consttable_8.  Emit multiple labels
and consttable_window_ends.
2001-06-03  Graham Stott  <grahams@redhat,com>
* config/sh/sh.md (movdi split): Remove unused variable last_insn.
2001-05-16  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (print_operand): Handle floating-point pair,
vector and matrix registers.
* config/sh/sh.h (REGISTER_MOVE_COST): Take floating-pointer
vector modes into account.
* config/sh/sh.md (movv2sf): Split move between registers into
movdf.
(movv4sf, movv16sf): Introduce insns that get split only after
reload.
* config/sh/shmedia.h: Fix Copyright dates.
* config/sh/ushmedia.h: Likewise.  Move loop counter
declarations into conditionals that uses them.
(sh_media_FVADD_S, sh_media_FVSUB_S): Fix off-by-one error in
loop boundary.
* config/sh/sshmedia.h: Fix Copyright dates.
(sh_media_PUTCFG): Fix constraints.
2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (TARGET_PTRMEMFUNC_VBIT_LOCATION): Define to
ptrmemfunc_vbit_in_delta for SH5.
2001-05-08  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (TARGET_SWITCHES): Document -m5-*.
* invoke.texi: Likewise.
2001-04-14  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/lib1funcs.asm (GCC_push_shmedia_regs,
GCC_push_shmedia_regs_nofpu, GCC_pop_shmedia_regs,
GCC_pop_shmedia_regs_nofpu): New global symbols.
* config/sh/t-sh64 (LIB1ASMFUNCS): Add them.
* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): New macro.
* config/sh/sh.c (calc_live_regs): Account for PR's saving in
compact function with nonlocal labels.
(sh_expand_prologue) [SHcompact]: Push SHmedia regs if needed.
(sh_expand_epilogue) [SHcompact]: Pop them when appropriate.
(initial_elimination_offset): Account for their stack space.
* config/sh/sh.md (shmedia_save_restore_regs_compact): New insn.
* config/sh/sh.md (movsi_media, movsi_media_nofpu, movqi_media,
movhi_media, movdi_media, movdi_media_nofpu, movdf_media,
movdf_media_nofpu, movsf_media, movsf_media_nofpu): Require at
least one of the operands to be a register.
(movv2sf): Likewise.  Renamed to movv2sf_i.
(movdi, movdf, movv2sf, movv4sf, movv16sf, movsf):
prepare_move_operands() before emitting SHmedia insns.
2001-04-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/crti.asm (init, fini) [__SH5__ && ! __SHMEDIA__]:
Don't save nor initialize r12.  Don't mis-align the stack.
Pad the code with a nop.
* config/sh/crti.asm: Don't restore r12.  Don't mis-align the
stack.
2001-03-13  Alexandre Oliva  <aoliva@redhat.com>
* gcc/longlong.h (__umulsidi3, count_leading_zeros)
[__SHMEDIA__]: Implement.
2001-03-11  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md: Set latency of `pt' closer to reality.
(movsi_media, movsi_media_nofpu, movdi_media, movdi_media_nofpu,
movdf_media, movdf_media_nofpu, movsf_media, movsf_media_nofpu):
Set move, load and store type attributes.
* config/sh/sh.c (sh_loop_align) [TARGET_SH5]: Set to 3.
* config/sh/sh.h (OVERRIDE_OPTIONS) [TARGET_SH5]: Disable
profiling.
* config/sh/sh.h (PROMOTE_MODE): Sign-extend SImode to DImode.
* config/sh/sh-protos.h (sh_media_register_for_return): Declare.
* config/sh/sh.c (sh_media_register_for_return): New function.
(sh_expand_prologue) [TARGET_SHMEDIA]: Copy r18 to an available
branch-target register.
(sh_expand_epilogue) [TARGET_SHMEDIA]: Explicitly USE it.
* config/sh/sh.md (return_media_i): Use any call-clobbered
branch-target register.
(return_media): If r18 wasn't copied in the prologue, copy it
here.
* config/sh/sh.h (CONDITIONAL_REGISTER_USAGE) [TARGET_SHMEDIA]:
Clear class FP0_REGS.
* config/sh/sh64.h (LINK_SPEC): Removed incorrect default copied
from elf.h.
2001-03-08  DJ Delorie  <dj@redhat.com>
* config/sh/sh.h (OVERRIDE_OPTIONS): Disable relaxing for SHMEDIA.
2001-02-09  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (sibcall_compact): Set fp_mode to single.
2001-02-07  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (INT_ASM_OP) [SHMEDIA64]: Use `.quad'.
2001-02-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (INIT_CUMULATIVE_ARGS): Compute size of BLKmode
return value correctly for call_cookie.
2001-02-01  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/crt1.asm (start): Modified so as to call
___setup_argv_and_call_main.
2001-01-26  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't count stack_regs in
SHmedia mode.
2001-01-20  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (STRIP_DATALABEL_ENCODING): New macro.
(STRIP_NAME_ENCODING): Use it.
(ASM_OUTPUT_LABELREF): Likewise.  Don't call assemble_name().
2001-01-19  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (sgeu) [! SHMEDIA]: Fix invocation of
prepare_scc_operands().
* config/sh/sh.h (SH_DATALABEL_ENCODING): Change to "#"...
(DATALABEL_SYMNAME_P): ... so that we don't need memcmp here.
2001-01-17  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (STRIP_NAME_ENCODING): Strip leading `*'.
2001-01-13  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (shcompact_incoming_args): Use R0_REG.
* config/sh/sh.md (R7_REG, R8_REG, R9_REG): Define as constants,
used in shcompact_incoming_args.
* config/sh/sh.c (sh_expand_epilogue): Fix thinko in previous
change.
* config/sh/crt1.asm (start) [SH5]: Switch to single-precision
mode.
* config/sh/lib1funcs.asm (sdivsi3_i4, udivsi3_i4, set_fpscr):
Adjust accordingly.
* config/sh/sh.c (sh_expand_prologue, sh_expand_epilogue):
Simplify.  Adjust.  Add sanity check.
* config/sh/sh.h (TARGET_SWITCHES) [5-compact]: Set
FPU_SINGLE_BIT.
* config/sh/sh.md (udivsi3_i4_single, divsi3_i4_single): Match
TARGET_SHCOMPACT.
(udivsi3, divsi3): Use them.
(force_mode_for_call): New insn.
(call, call_value, sibcall_value): Emit it before SHcompact
calls.
2001-01-11  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (call, call_value, sibcall): Make sure the
call cookie is non-NULL before taking its value.
2001-01-10  Alexandre Oliva  <aoliva@redhat.com>
* config.gcc (sh64): Set target_requires_64bit_host_wide_int.
2001-01-09  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (shcompact_incoming_args): Set argument memory
block.
* config/sh/sh.h (STATIC_CHAIN_REGNUM) [SH5]: Use r1.
* config/sh/sh.c (sh_expand_prologue) [SH5]: Use r0 as
temporary for stack adjusts.  Use MACL and MACH to pass
arguments to shcompact_incoming_args.
* config/sh/sh.md (shcompact_incoming_args): Adjust.  Don't
clobber r1.
* config/sh/lib1funcs.asm (shcompact_incoming_args): Likewise.
(nested_trampoline): Load static chain address into r1.
* config/sh/sh.md (movdi_media splits): Fix sign-extension.
2001-01-07  Alexandre Oliva  <aoliva@redhat.com
* config/sh/sh.c (fpul_operand) [SHMEDIA]: Just call
fp_arith_reg_operand().
2001-01-06  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (casesi): Sign-extend the first two operands,
and use signed compares for them.
* config/sh/sh.c (dump_table): Don't emit 8-byte constants after
4-byte ones.  Instead, inter-leave them, maintaining the 8-byte
ones properly aligned.
(find_barrier): Account for extra alignment needed for 8-byte wide
constants.
(machine_dependent_reorg): Require a label for the second 4-byte
constant after an 8-byte one.
* config/sh/lib1funcs.asm (sdivsi3): Fix typo in yesterday's
change.
2001-01-05  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (machine_dependent_reorg) [SHCOMPACT]: Reset
last_float when switching float modes.
* config/sh/sh.md (movdf) [SH5]: Don't use stack-pointer
auto-increment for general-purpose registers.
* config/sh/lib1funcs.asm (sdivsi3) [SHMEDIA]: Sign-extend the
result.
* config/sh/sh.c (sh_expand_prologue) [SH5]: Use r1 as temporary
for stack adjust.
* config/sh/sh.c (sh_builtin_saveregs): Support using all
registers for varargs.
2001-01-01  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Simplify.
* config/sh/sh.h (CALL_COOKIE_STACKSEQ,
CALL_COOKIE_STACKSEQ_SHIFT, CALL_COOKIE_STACKSEQ_GET): New macros.
(CALL_COOKIE_INT_REG_SHIFT): Adjust.
(FUNCTION_ARG_ADVANCE): Use SHCOMPACT_FORCE_ON_STACK.  Adjust
call_cookie accordingly.
(FUNCTION_ARG): Test SHCOMPACT_FORCE_ON_STACK.
(SHCOMPACT_BYREF): Likewise.
(SHCOMPACT_FORCE_ON_STACK): New macro.
* config/sh/sh.c (sh_expand_prologue): Use new call_cookie format.
(sh_builtin_saveregs): Likewise.
* config/sh/lib1funcs.asm (shcompact_call_trampoline,
shcompact_incoming_args): Use new shift values.  Support
sequences of consecutive and non-consecutive pushes/pops.
* config/sh/sh.md (return): Don't explicitly use PR_REG.
2001-01-05  Hans-Peter Nilsson  <hpn@cygnus.com>
* config/sh/sh.h (TEXT_SECTION): Define.
* config/sh/elf.h (ASM_FILE_START): Output TEXT_SECTION_ASM_OP.
2001-01-05  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (INIT_CUMULATIVE_LIBCALL_ARGS): New macro.
* config/sh/sh.h (BASE_RETURN_VALUE_REG): Use FP regs for
return values on FPU-enabled SHmedia.
(FUNCTION_VALUE_REGNO_P): Mark FIRST_FP_RET_REG as used on
FPU-enabled SHmedia.
(INIT_CUMULATIVE_ARGS): Set up return trampoline only if
value is returned in a non-FP reg and is not returned by
reference.
* config/sh/sh.md (shcompact_return_tramp_i): Change type to
jump_ind.
2000-01-04  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (SH_MIN_ALIGN_FOR_CALLEE_COPY): New.
(FUNCTION_ARG_CALLEE_COPIES): Require argument to be
quad-aligned to be passed by callee-copy reference.
2001-01-03  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/elf.h (MAX_WCHAR_TYPE_SIZE): Define.
* config/sh/sh64.h (MAX_WCHAR_TYPE_SIZE): Undefine.
2001-01-02  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix error in
copying low-numbered FP regs to r7 and r8.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Don't request copying of
FP regs to general-purpose regs only if the copy was passed on the
stack.
* config/sh/lib1funcs.asm (shcompact_call_trampoline): Fix typo in
copying FP reg to r9.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Use trampoline to
copy FP regs to general-purpose regs only in outgoing calls.
* config/sh/sh.md (movdf_media, movsf_media): Revert incorrect
change from 	2000-10-30.  Adjust for 64-bit (or 32-bit)
HOST_WIDE_INT.
* config/sh/sh.h (struct sh_args): Document all fields.
(FUNCTION_OK_FOR_SIBCALL): Functions that receive arguments
passed partially on the stack should not consider making
sibcalls.
* config/sh/sh.h (FUNCTION_ARG_ADVANCE): Add byref regs to
stack_regs only for incoming calls.  When passing FP args,
make sure there are FP regs available before modifying
call_cookie.
(SHCOMPACT_BYREF): Pass double args in general-purpose
registers by reference.
2000-12-30  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (FUNCTION_OK_FOR_SIBCALL) [SHCOMPACT]: Don't
attempt to generate sibcalls if the caller got any arguments
by reference.
* config/sh/lib1funcs.asm (set_fpscr) [SH5]: Default to double.
* config/sh/sh.c (dump_table) [SHCOMPACT]: Align DImode and DFmode
to 8-byte boundaries.
* config/sh/sh.md (shcompact_preserve_incoming_args): New insn.
* config/sh/sh.h (CALL_COOKIE_INT_REG_GET): New macro.
* config/sh/sh.c (sh_expand_prologue): Preserve args that will be
stored in the stack.
* config/sh/lib1funcs.asm (ct_main_table, ia_main_table): Arrange
for the offsets to have the ISA bit set.
(shcompact_call_trampoline): Document.  Swap r0 and r1, to match
invocation.  Use beq instead of bgt to mark end of sequence of
loads.
(shcompact_incoming_args): Fix store of r2.  Use beq instead of
bgt to mark end of sequence of stores.
* config/sh/sh.c (arith_operand): Don't check whether
CONST_OK_FOR_J for now.
* config/sh/sh.md (movdf_media, movsf_media): Use HOST_WIDE_INT
instead of long for conversion.
2000-12-29  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.c (print_operand_address): Convert INTVAL to int
before passing it to fprintf.
2000-12-28  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/crt1.asm (start): Reset SR.FD, to enable the FP unit.
Call set_fpscr before reading/writing SR.
* config/sh/crt1.asm (start): Set SR.SZ and SR.PR, but not SR.FR.
Call set_fpscr.
* config/sh/lib1funcs.asm: Add `.align 2' directives before
SHmedia code.
(FMOVD_WORKS): Define on SH5 with FPU.
(set_fpscr): Define on SH5.  Remove separate _fpscr_values
setting.
* config/sh/t-sh64 (LIB1ASMFUNCS): Add _set_fpscr instead of
_fpscr_values.
2000-12-28  Hans-Peter Nilsson  <hpn@cygnus.com>
* config/sh/lib1funcs.asm (ct_main_table): Align contents to even
address.
(ia_main_table): Ditto.
2000-12-27  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.h (MAX_WCHAR_TYPE_SIZE): Don't define.
* config/sh/sh64.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Reinstate
the definitions from sh.h.
* config/sh/sh.h (PTRDIFF_TYPE): Define as conditional on
TARGET_SH5.
(SUBTARGET_CPP_SPEC): Arrange for __PTRDIFF_TYPE__ to be defined.
* config/sh/elf.h (PTRDIFF_TYPE): Likewise.
* config/sh/sh64.h (SUBTARGET_CPP_SPEC): Likewise.
2000-12-26  Alexandre Oliva  <aoliva@redhat.com>
* config/sh/sh.md (movdi_media split): Don't add REG_LABEL notes.
Increment LABEL_NUSES.

From-SVN: r49630
2002-02-09 03:08:08 +00:00
Graham Stott 60e8b9f0d1 calls.c (try_to_integrate): Use "(size_t)" intermediate cast and when casting an integer literal to "rtx"...
* calls.c (try_to_integrate): Use "(size_t)" intermediate
        cast and when casting an integer literal to "rtx" pointer.
        (expand_call): Likewise.
        * flow.c (try_pre_increment): Likewise.
        (find_use_as_address): Likewise.
        * integrate.c (expand_iline_function): Likewise.
        * regmove.c (try_auto_increment): Likewise.

From-SVN: r48906
2002-01-16 09:24:00 +00:00
Richard Henderson e4abc3d580 calls.c (expand_call): Don't turn off ECF_LIBCALL_BLOCK for an invalid result register...
* calls.c (expand_call): Don't turn off ECF_LIBCALL_BLOCK for
        an invalid result register; do end the sequence properly.
        (emit_library_call_value_1): Likewise.

From-SVN: r48287
2001-12-23 05:02:18 -08:00
Jan Hubicka 53d4257f7f calls.c (ECF_LIBCALL_BLOCK): New constant.
* calls.c (ECF_LIBCALL_BLOCK): New constant.
	(emit_call_1, initialize_argument_information,
	precompute_arguments, expand_call,
	emit_library_call_value_1): Use ECF_LIBCALL_BLOCK
	instead of ECF_PURE | ECF_CONST. Honnor LCT_CONST/LCT_PURE.

From-SVN: r48279
2001-12-23 00:10:43 +00:00
Richard Kenner b5cd4ed4c3 calls.c (flags_from_decl_or_type): Move ECF_SP_DEPRESSED here.
* calls.c (flags_from_decl_or_type): Move ECF_SP_DEPRESSED here.
	(expand_call): Delete from here.
	Do pending stack adjustments if ECF_SP_DEPRESSED.

From-SVN: r48267
2001-12-22 09:46:58 -05:00
Jason Merrill f21add0737 C++ ABI change: destroy value arguments in caller.
* calls.c (initialize_argument_information): Pass the address of
        the TARGET_EXPR temporary rather than storing it into another.
        * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
        create an extra binding level for the parameters.
        * decl.c (store_parm_decls): Don't do parameter cleanups.

From-SVN: r48154
2001-12-18 08:30:30 -05:00
Richard Kenner f79a65c087 calls.c (emit_call_1): If ECF_SP_DEPRESSED, pretend have adjusted for rounded_stack_size.
* calls.c (emit_call_1): If ECF_SP_DEPRESSED, pretend have adjusted
	for rounded_stack_size.

From-SVN: r48049
2001-12-15 18:00:00 -05:00
Steve Ellcey 0d7839daee tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): New.
2001-12-11  Steve Ellcey  <sje@cup.hp.com>

	* doc/tm.texi (FUNCTION_ARG_REG_LITTLE_ENDIAN): New.
	* defaults.h (FUNCTION_ARG_REG_LITTLE_ENDIAN): New.
	* calls.c (store_unaligned_arguments_into_pseudos): Check
	FUNCTION_ARG_REG_LITTLE_ENDIAN to see how structures
	are passed/returned.
	* expr.c (move_block_from_reg): Ditto.
	(move_block_from_reg): Ditto.
	(copy_blkmode_from_reg): Ditto.
	* stmt.c (expand_return): Ditto.
	* stor-layout.c (compute_record_mode): If
	FUNCTION_ARG_REG_LITTLE_ENDIAN is set then check
	MEMBER_TYPE_FORCES_BLK even if mode == VOIDmode.
	* config/ia64/hpux.h (MEMBER_TYPE_FORCES_BLK): Set to true
	so that Structures of one field are still treated as structures.
	(FUNCTION_ARG_REG_LITTLE_ENDIAN): New, set it to true.
	(FUNCTION_ARG_PADDING): Set to ia64_hpux_function_arg_padding().
	(PAD_VARARGS_DOWN): Modify from default to not pad structures down.
	* config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): New.
	* config/ia64/ia64.c (ia64_hpux_function_arg_padding): New function
	to special case handling of structure padding.

From-SVN: r47904
2001-12-11 23:04:36 +00:00
Richard Kenner 37a08a298f attribs.c (handle_no_check_memory_usage_atribute): Deleted.
* attribs.c (handle_no_check_memory_usage_atribute): Deleted.
	(c_com): Delete its reference.
	* builtins.c: Delete memory checking code.
	* calls.c, expr.c, function.c, stmt.c: Likewise.
	* builtins.c (expand_builtin_arg_info): Remove reference to
	EXPAND_MEMORY_USE_* modifiers.
	* explow.c (expr_size): Likewise.
	* expr.c (expand_expr, expand_increment): Likewise.
	* expr.h (ARGS_SIZE_RTX): Likewise.
	* function.c (assign_parms, expand_pending_sizeso): Likewise.
	* c-decl.c (duplicate_decls): Don't handle DECL_NO_CHECK_MEMORY_USAGE.
	* expr.c (in_check_memory_usage): Delete.
	(get_push_address, get_memory_usage_from_modifier): Delete.
	(expand_assigment): Use EXPAND_WRITE on destination.
	(expand_expr): Delete ro_modifier.
	* expr.h (expand_modifier): Delete EXPAND_MEMORY_* entries and
	add EXPAND_WRITE.
	(memory_use_mode): Delete.
	* flags.h (flag_check_memory_usage): Deleted.
	(flag_prefix_function_name): Likewise.
	* function.c (expand_function_start): Don't set
	current_function_check_memory_usage.
	* function.h (check_memory_usage): Delete.
	* libfuncs.h, optabs.c: Delete chkr_* stuff.
	* stmt.c (expand_asm_opernd): Change EXPAND_MEMORY_USE_WO to
	EXPAND_WRITE.
	* toplev.c (flag_check_memory_usage): Deleted.
	(flag_prefix_function_name): Likewise.
	(f_options, process_options): Delete references to above.
	* tree.h (DECL_NO_CHECK_MEMORY_USAGE): Deleted.
	* varasm.c (CHKR_PREFIX): Deleted.
	(make_decl_rtl): Remove flag_prefix_function_name handling.
	(assemble_name): Likewise.
	* doc/extend.texi: Remove no_check_memory_usage attribute.
	* doc/invoke.texi: Remove -fcheck-memory-usage
	and -fprefix-function-name.
	* cp/decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.

From-SVN: r47697
2001-12-05 17:37:41 -05:00
Andrew Haley 60f4621c9a calls.c (check_sibcall_argument_overlap): Use slot_offset for start of stack slot.
2001-10-09  Andrew Haley  <aph@redhat.com>

        * calls.c (check_sibcall_argument_overlap): Use slot_offset for
        start of stack slot.

From-SVN: r47276
2001-11-22 16:51:47 +00:00
Jakub Jelinek 1258ee8070 explow.c (probe_stack_range): Use LCT_NORMAL as second argument to emit_library_call.
* explow.c (probe_stack_range): Use LCT_NORMAL as second argument
	to emit_library_call.
	* function.c (expand_main_function, expand_function_start,
	expand_function_end): Likewise.
	* profile.c (output_func_start_profiler): Likewise.
	* stmt.c (expand_nl_goto_receivers): Use LCT_NORETURN as
	second argument to emit_library_call.
	* optabs.c (prepare_cmp_insn): Use LCT_CONST_MAKE_BLOCK
	as second argument to emit_library_call.
	* calls.c (emit_library_call): Update fn_type description.

From-SVN: r47241
2001-11-21 12:13:14 +01:00
Richard Kenner 04050c690d expmed.c (extract_bit_field): No longer pass in alignment.
* expmed.c (extract_bit_field): No longer pass in alignment.
	(extract_fixed_bit_field, extract_split_bit_field): Likewise.
	(store_bit_field, store_fixed_bit_field, store_split_bit_field):
	Likewise.
	* expr.c (store_constructor, store_constructor_field): Likewise.
	(store_field, emit_group_load, emit_group_store): Likewise.
	* expr.h (emit_group_load, emit_group_store): Delete ALIGN parm.
	(store_bit_field, extract_bit_field): Likewise.
	* calls.c, expr.c, function.c: Change calls to above functions.
	* ifcvt.c, stmt.c: Likewise.

From-SVN: r46926
2001-11-11 06:02:26 -05:00
Joseph Myers f5143c46a9 ChangeLog.2, [...]: Fix spelling errors.
* ChangeLog.2, ChangeLog.4, ChangeLog.5, ChangeLog,
	FSFChangeLog.10, FSFChangeLog.11, alias.c, attribs.c,
	caller-save.c, calls.c, cfg.c, cfganal.c, cfgcleanup.c, cfgrtl.c,
	cppmacro.c, fold-const.c, ifcvt.c, local-alloc.c, profile.c,
	sched-int.h, toplev.c, config/alpha/alpha.c,
	config/alpha/alpha.md, config/c4x/c4x.h, config/cris/cris.h,
	config/cris/cris.md, config/i370/i370.md, config/i386/i386.c,
	config/i386/i386.h, config/i386/i386.md, config/i386/xm-djgpp.h,
	config/ia64/ia64.c, config/m68hc11/m68hc11.c, config/m68k/m68k.md,
	config/mcore/mcore.h, config/mmix/mmix.c, config/ns32k/ns32k.h,
	config/ns32k/ns32k.md, config/rs6000/rs6000.c,
	config/rs6000/sysv4.h, config/sh/sh.md: Fix spelling errors.

From-SVN: r46760
2001-11-04 02:51:28 +00:00