Commit Graph

808 Commits

Author SHA1 Message Date
Richard Guenther e19f665079 tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle MEM_REF and TARGET_MEM_REF, do not care about INDIRECT_REFs.
2011-04-21  Richard Guenther  <rguenther@suse.de>

	* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Handle
	MEM_REF and TARGET_MEM_REF, do not care about INDIRECT_REFs.
	Use DECL_P, not SSA_VAR_P.
	(ptr_derefs_may_alias_p): Likewise.
	(ptr_deref_may_alias_ref_p_1): Likewise.
	(decl_refs_may_alias_p): Likewise.
	(refs_may_alias_p_1): Likewise.
	(ref_maybe_used_by_call_p_1): Likewise.
	(call_may_clobber_ref_p_1): Likewise.
	(indirect_ref_may_alias_decl_p): Assume indirect refrences
	are either MEM_REF or TARGET_MEM_REF.
	(indirect_refs_may_alias_p): Likewise.
	* calls.c (emit_call_1): Build a MEM_REF instead of an INDIRECT_REF
	for MEM_EXPR of indirect calls.

From-SVN: r172825
2011-04-21 13:06:47 +00:00
Richard Sandiford 1a627b35d3 target.def (legitimate_constant_p): New hook.
gcc/
	* target.def (legitimate_constant_p): New hook.
	* doc/tm.texi.in (LEGITIMATE_CONSTANT_P): Replace with...
	(TARGET_LEGITIMATE_CONSTANT_P): ...this.
	* doc/tm.texi: Regenerate.
	* hooks.h (hook_bool_mode_rtx_true): Declare.
	* hooks.c (hook_bool_mode_rtx_true): Define.
	* system.h (LEGITIMATE_CONSTANT_P): Poison.
	* calls.c (precompute_register_parameters): Replace uses of
	LEGITIMATE_CONSTANT_P with targetm.legitimate_constant_p.
	(emit_library_call_value_1): Likewise.
	* expr.c (move_block_to_reg, can_store_by_pieces, emit_move_insn)
	(compress_float_constant, emit_push_insn, expand_expr_real_1): Likewise.
	* ira-costs.c (scan_one_insn): Likewise.
	* recog.c (general_operand, immediate_operand): Likewise.
	* reload.c (find_reloads_toplev, find_reloads_address_part): Likewise.
	* reload1.c (init_eliminable_invariants): Likewise.

	* config/alpha/alpha-protos.h (alpha_legitimate_constant_p): Add a
	mode argument.
	* config/alpha/alpha.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/alpha/alpha.c (alpha_legitimate_constant_p): Add a mode
	argument.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.
	* config/alpha/predicates.md (input_operand): Update call to
	alpha_legitimate_constant_p.

	* config/arm/arm-protos.h (arm_cannot_force_const_mem): Delete.
	* config/arm/arm.h (ARM_LEGITIMATE_CONSTANT_P): Likewise.
	(THUMB_LEGITIMATE_CONSTANT_P, LEGITIMATE_CONSTANT_P): Likewise.
	* config/arm/arm.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(arm_legitimate_constant_p_1, thumb_legitimate_constant_p)
	(arm_legitimate_constant_p): New functions.
	(arm_cannot_force_const_mem): Make static.

	* config/avr/avr.h (LEGITIMATE_CONSTANT_P): Delete.

	* config/bfin/bfin-protos.h (bfin_legitimate_constant_p): Delete.
	* config/bfin/bfin.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/bfin/bfin.c (expand_move): Use targetm.legitimate_constant_p
	instead of bfin_legitimate_constant_p.
	(bfin_legitimate_constant_p): Make static.  Add a mode argument.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.

	* config/cris/cris.h (LEGITIMATE_CONSTANT_P): Delete.

	* config/fr30/fr30.h (LEGITIMATE_CONSTANT_P): Delete.

	* config/frv/frv-protos.h (frv_legitimate_constant_p): Delete.
	* config/frv/frv.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/frv/frv.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(frv_legitimate_constant_p): Make static.  Add a mode argument.

	* config/h8300/h8300-protos.h (h8300_legitimate_constant_p): Delete.
	* config/h8300/h8300.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/h8300/h8300.c (h8300_legitimate_constant_p): Likewise.

	* config/i386/i386-protos.h (legitimate_constant_p): Delete.
	* config/i386/i386.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/i386/i386.c (legitimate_constant_p): Rename to...
	(ix86_legitimate_constant_p): ...this.  Make static.  Add a mode
	argument.
	(ix86_cannot_force_const_mem): Update accordingly.
	(ix86_legitimate_address_p): Likewise.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.
	* config/i386/i386.md: Update commentary.

	* config/ia64/ia64-protos.h (ia64_legitimate_constant_p): Delete.
	* config/ia64/ia64.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/ia64/ia64.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(ia64_legitimate_constant_p): Make static.  Add a mode argument.

	* config/iq2000/iq2000.h (LEGITIMATE_CONSTANT_P): Delete.

	* config/lm32/lm32-protos.h (lm32_legitimate_constant_p): Delete.
	* config/lm32/lm32.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/lm32/lm32.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(lm32_legitimate_constant_p): Make static.  Add a mode argument.

	* config/m32c/m32c-protos.h (m32c_legitimate_constant_p): Delete.
	* config/m32c/m32c.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/m32c/m32c.c (m32c_legitimate_constant_p): Likewise.

	* config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/m32r/m32r.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(m32r_legitimate_constant_p): New function.

	* config/m68k/m68k-protos.h (m68k_legitimate_constant_p): Declare.
	* config/m68k/m68k.h (CONSTANT_ADDRESS_P): Call it instead of
	LEGITIMATE_CONSTANT_P.
	(LEGITIMATE_CONSTANT_P): Delete.
	* config/m68k/m68k.c (m68k_expand_prologue): Call
	m68k_legitimate_constant_p instead of LEGITIMATE_CONSTANT_P.
	(m68k_legitimate_constant_p): New function.
	* config/m68k/m68k.md: Update comments.

	* config/mcore/mcore.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/mcore/mcore.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(mcore_legitimate_constant_p): New function.

	* config/mep/mep-protos.h (mep_legitimate_constant_p): Delete.
	* config/mep/mep.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/mep/mep.c (mep_legitimate_constant_p): Make static.
	Add a mode argument.
	(mep_legitimate_address): Update accordingly.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.

	* config/microblaze/microblaze-protos.h (microblaze_const_double_ok):
	Delete.
	* config/microblaze/microblaze.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/microblaze/microblaze.c (microblaze_const_double_ok): Make
	static.  Check OP's mode for VOIDmode.
	(microblaze_legitimate_constant_p): New function.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.

	* config/mips/mips.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/mips/mips.c (mips_legitimate_constant_p): New function.
	(mips_cannot_force_const_mem): Use it instead of LEGITIMATE_CONSTANT_P.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.
	* config/mips/predicates.md: Update comments.

	* config/mmix/mmix-protos.h (mmix_legitimate_constant_p): Delete.
	* config/mmix/mmix.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/mmix/mmix.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(mmix_legitimate_constant_p): Make static, return a bool, and take
	a mode argument.
	(mmix_print_operand_address): Update accordingly.

	* config/mn10300/mn10300-protos.h (mn10300_legitimate_constant_p):
	Delete.
	* config/mn10300/mn10300.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/mn10300/mn10300.c (mn10300_legitimate_constant_p):
	Make static.  Add a mode argument.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.

	* config/moxie/moxie.h (LEGITIMATE_CONSTANT_P): Delete.

	* config/pa/pa.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/pa/pa.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(pa_legitimate_constant_p): New function.

	* config/picochip/picochip.h (LEGITIMATE_CONSTANT_P): Delete.

	* config/pdp11/pdp11.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/pdp11/pdp11.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(pdp11_legitimate_constant_p): New function.

	* config/rs6000/rs6000.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/rs6000/rs6000.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(rs6000_legitimate_constant_p): New function.

	* config/rx/rx-protos.h (rx_is_legitimate_constant): Replace with...
	(rx_legitimate_constant_p): ...this.
	* config/rx/rx.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/rx/rx.c (rx_is_legitimate_constant): Replace with...
	(rx_legitimate_constant_p): ...this.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.
	* config/rx/rx.md (mov<register_modes:mode>): Update accordingly.

	* config/s390/s390-protos.h (legitimate_constant_p): Delete.
	* config/s390/s390.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/s390/s390.c (legitimate_constant_p): Rename to...
	(s390_legitimate_constant_p): ...this.  Make static, return a bool,
	and add a mode argument.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.

	* config/score/score.h (LEGITIMATE_CONSTANT_P): Delete.

	* config/sh/sh.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/sh/sh.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(sh_legitimate_constant_p): New function.

	* config/sparc/sparc-protos.h (legitimate_constant_p): Delete.
	* config/sparc/sparc.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/sparc/sparc.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(legitimate_constant_p): Rename to...
	(sparc_legitimate_constant_p): ...this.  Make static.  Add a mode
	argument.
	(constant_address_p): Update accordingly.

	* config/spu/spu-protos.h (spu_legitimate_constant_p): Add a mode
	argument and return a bool.
	* config/spu/spu.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/spu/spu.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(spu_legitimate_constant_p): Add a mode argument and return a bool.
	(spu_rtx_costs): Update accordingly.
	* config/spu/predicates.md (vec_imm_operand): Likewise.

	* config/stormy16/stormy16.h (LEGITIMATE_CONSTANT_P): Delete.

	* config/v850/v850.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/v850/v850.c (v850_legitimate_constant_p): New function.
	(TARGET_LEGITIMATE_CONSTANT_P): Define.

	* config/vax/vax-protos.h (legitimate_constant_p): Delete.
	* config/vax/vax.h (LEGITIMATE_CONSTANT_P): Likewise.
	* config/vax/vax.c (legitimate_constant_p): Likewise.

	* config/xtensa/xtensa.h (LEGITIMATE_CONSTANT_P): Delete.
	* config/xtensa/xtensa.c (TARGET_LEGITIMATE_CONSTANT_P): Define.
	(xtensa_legitimate_constant_p): New function.

From-SVN: r172814
2011-04-21 09:38:43 +00:00
Jim Meyering 046957830e remove useless if-before-free tests
Change "if (E) free (E);" to "free (E);" everywhere except in the
libgo/, intl/, zlib/ and classpath/ directories.
Also transform equivalent variants like
"if (E != NULL) free (E);" and allow an extra cast on the
argument to free.  Otherwise, the tested and freed "E"
expressions must be identical, modulo white space.

From-SVN: r172785
2011-04-20 18:19:03 +00:00
Jakub Jelinek c2969d8ee4 emit-rtl.c (try_split): Don't call copy_call_info debug hook.
* emit-rtl.c (try_split): Don't call copy_call_info debug hook.
	* calls.c: Remove debug.h include.
	(emit_call_1): Don't call virtual_call_token debug hook.
	* dwarf2out.c (debug_dcall_section, debug_vcall_section,
	dcall_entry, vcall_entry, dcall_table, vcall_table, vcall_insn,
	vcall_insn_table, DEBUG_DCALL_SECTION, DEBUG_VCALL_SECTION,
	size_of_dcall_table, output_dcall_table, size_of_vcall_table,
	output_vcall_table, dwarf2out_direct_call, vcall_insn_table_hash,
	vcall_insn_table_eq, store_vcall_insn, lookup_vcall_insn,
	dwarf2out_virtual_call_token, dwarf2out_copy_call_info,
	dwarf2out_virtual_call): Remove.
	(dwarf2_debug_hooks): Remove direct_call, virtual_call_token,
	copy_call_info and virtual_call hooks.
	(dwarf2out_init): Don't initialize vcall_insn_table,
	debug_dcall_section and debug_vcall_section.
	(prune_unused_types): Don't mark nodes from dcall_table.
	(dwarf2out_finish): Don't output dcall or vcall tables.
	* final.c (final_scan_insn): Don't call direct_call or
	virtual_call debug hooks.
	* debug.h (struct gcc_debug_hooks): Remove direct_call,
	virtual_call_token, copy_call_info and virtual_call hooks.
	(debug_nothing_uid): Remove prototype.
	* sdbout.c (sdb_debug_hooks): Remove direct_call, virtual_call_token,
	copy_call_info and virtual_call hooks.
	* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
	* dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
	* debug.c (do_nothing_debug_hooks): Likewise.
	(debug_nothing_uid): Remove.
	* doc/invoke.texi (-fenable-icf-debug): Remove.
	* common.opt (-fenable-icf-debug): Likewise.

	* g++.dg/debug/dwarf2/icf.C: Adjust for -fenable-icf-debug removal.

From-SVN: r171037
2011-03-16 09:40:07 +01:00
Jakub Jelinek 325f5379f1 calls.c (emit_call_1): Set MEM_EXPR on call's MEM.
* calls.c (emit_call_1): Set MEM_EXPR on call's MEM.
	* var-tracking.c (prepare_call_arguments): Use MEM_EXPR on
	call's MEM.  Handle functions returning aggregate through a hidden
	first pointer.  For virtual calls add clobbered pc to call arguments
	chain.
	* dwarf2out.c (gen_subprogram_die): Emit
	DW_AT_GNU_call_site_target_clobbered if DW_AT_GNU_call_site_target
	can't be emitted.

From-SVN: r171036
2011-03-16 09:36:42 +01:00
Jakub Jelinek 2b1c543325 final.c (final_scan_insn): Handle NOTE_INSN_CALL_ARG_LOCATION.
* final.c (final_scan_insn): Handle NOTE_INSN_CALL_ARG_LOCATION.
	Call var_location debug hook even on CALL_INSNs.
	(rest_of_clean_state): Don't print NOTE_INSN_CALL_ARG_LOCATION.
	* rtl.def (ENTRY_VALUE): New.
	* dwarf2out.c: Include cfglayout.h.
	(dwarf_stack_op_name, size_of_loc_descr, output_loc_operands,
	output_loc_operands_raw): Handle DW_OP_GNU_entry_value.
	(struct call_arg_loc_node): New type.
	(call_arg_locations, call_arg_loc_last, block_map, call_site_count,
	tail_call_site_count): New variables.
	(dwarf_tag_name): Handle DW_TAG_GNU_call_site and
	DW_TAG_GNU_call_site_parameter.
	(dwarf_attr_name): Handle DW_AT_GNU_call_site_value,
	DW_AT_GNU_call_site_data_value, DW_AT_GNU_call_site_target,
	DW_AT_GNU_call_site_target_clobbered, DW_AT_GNU_tail_call,
	DW_AT_GNU_all_tail_call_sites, DW_AT_GNU_all_call_sites
	and DW_AT_GNU_all_source_call_sites.
	(mem_loc_descriptor): Handle ENTRY_VALUE.
	(add_src_coords_attributes): Don't add enything if
	DECL_SOURCE_LOCATION is UNKNOWN_LOCATION.
	(dwarf2out_abstract_function): Save and clear call_arg_location,
	call_site_count and tail_call_site_count around dwarf2out_decl call.
	(gen_call_site_die): New function.
	(gen_subprogram_die): Emit DW_TAG_GNU_call_site DIEs for call sites.
	(gen_lexical_block_die, gen_inlined_subroutine_die): Update block_map.
	(dwarf2out_function_decl): Clear call_arg_locations,
	call_arg_loc_last, set call_site_count and tail_call_site_count
	to -1 and free block_map.
	(dwarf2out_var_location): Handle NOTE_INSN_CALL_ARG_LOCATION and
	CALL_INSNs.  Add NOTE_DURING_CALL_P var location notes even when not
	followed by any real instructions.
	(dwarf2out_begin_function): Set call_site_count and
	tail_call_site_count to 0.
	(resolve_addr): If DW_AT_abstract_origin of DW_TAG_GNU_call_site
	is dw_val_class_addr, attempt to look it up again, for DECL_EXTERNAL
	attempt to force a DIE for it and worst case remove the attribute.
	(resolve_one_addr): For TREE_CONSTANT_POOL_ADDRESS_P SYMBOL_REFs
	check TREE_ASM_WRITTEN of DECL_INITIAL of the decl instead of
	the decl itself.
	* var-tracking.c: Include tm_p.h.
	(vt_stack_adjustments): For calls call note_register_arguments.
	(argument_reg_set): New variable.
	(add_stores): For MO_VAL_SET of non-tracked regs from argument_reg_set
	ensure the VALUE is resolved.
	(call_arguments): New variable.
	(prepare_call_arguments): New function.
	(add_with_sets): For MO_CALL set u.loc from call_arguments and clear it.
	(struct expand_loc_callback_data): Add ignore_cur_loc field.
	(vt_expand_loc_callback): If ignore_cur_loc, don't look at cur_loc and
	always use the best expression.
	(vt_expand_loc): Add ignore_cur_loc argument.
	(vt_expand_loc_dummy): Clear ignore_cur_loc field.
	(emit_note_insn_var_location): Adjust vt_expand_loc callers.
	(emit_notes_in_bb) <case MO_CALL>: Add NOTE_INSN_CALL_ARG_LOCATION
	note for all calls.
	(vt_add_function_parameter): Use cselib_lookup_from_insn.
	If dv is a VALUE, enter into hash table also ENTRY_VALUE for the
	argument.  Don't call cselib_preserve_only_values and
	cselib_reset_table.
	(note_register_arguments): New function.
	(vt_initialize): Compute argument_reg_set.  Call
	vt_add_function_parameters before processing basic blocks instead of
	afterwards.  For calls call prepare_call_arguments before calling
	cselib_process_insn.
	* print-rtl.c (print_rtx): Handle NOTE_INSN_CALL_ARG_LOCATION.
	* Makefile.in (dwarf2out.o): Depend on $(CFGLAYOUT_H).
	(var-tracking.o): Depend on $(TM_P_H).
	* cfglayout.h (insn_scope): New prototype.
	* gengtype.c (adjust_field_rtx_def): Handle NOTE_INSN_CALL_ARG_LOCATION.
	* cfglayout.c (insn_scope): No longer static.
	* insn-notes.def (CALL_ARG_LOCATION): New.
	* calls.c (expand_call, emit_library_call_value_1): Put USEs for
	MEM arguments into CALL_INSN_FUNCTION_USAGE unconditionally.
	* integrate.c (set_block_origin_self, set_block_abstract_flags): Do
	nothing for DECL_EXTERNAL BLOCK_VARS.
cp/
	* cp-objcp-common.c (cp_function_decl_explicit_p): Don't crash if
	DECL_LANG_SPECIFIC is NULL.
include/
	* dwarf2.h (DW_TAG_GNU_call_site, DW_TAG_GNU_call_site_parameter,
	DW_AT_GNU_call_site_value, DW_AT_GNU_call_site_data_value,
	DW_AT_GNU_call_site_target, DW_AT_GNU_call_site_target_clobbered,
	DW_AT_GNU_tail_call, DW_AT_GNU_all_tail_call_sites,
	DW_AT_GNU_all_call_sites,, DW_AT_GNU_all_source_call_sites,
	DW_OP_GNU_entry_value): New.

From-SVN: r171033
2011-03-16 09:32:13 +01:00
Richard Henderson 9eac0f2a07 explow.c (emit_stack_save): Remove 'after' parameter.
* explow.c (emit_stack_save): Remove 'after' parameter.
        (emit_stack_restore): Likewise.
        * expr.h: Update to match.
        * builtins.c, calls.c, stmt.c: Likewise.
        * config/alpha/alpha.md, config/avr/avr.md: Likewise.
        * config/mips/mips.md, config/pa/pa.md, config/vax/vax.md: Likewise.
        * function.c (expand_function_end): Insert the emit_stack_save
        sequence before parm_birth_insn instead of after.

From-SVN: r170663
2011-03-03 13:56:58 -08:00
Nathan Froyd c2ed6cf88c builtins.c (std_gimplify_va_arg_expr): Use targetm.calls.function_arg_boundary.
* builtins.c (std_gimplify_va_arg_expr): Use
	targetm.calls.function_arg_boundary.
	* function.c (assign_parms, locate_and_pad_parm): Likewise.
	* calls.c (struct arg_data): Update comment.
	* defaults.h (FUNCTION_ARG_BOUNDARY): Delete.
	* target.def (function_arg_boundary): Define.
	* targhooks.h (default_function_arg_boundary): Declare.
	* targhooks.c (default_function_arg_boundary): Define.
	* doc/tm.texi.in (FUNCTION_ARG_PADDING): Use
	TARGET_FUNCTION_ARG_BOUNDARY.
	(FUNCTION_ARG_BOUNDARY): Delete.
	(TARGET_FUNCTION_ARG_BOUNDARY): New.
	* doc/tm.texi: Regenerate.
	* system.h (FUNCTION_ARG_BOUNDARY): Poison.
	* config/arc/arc.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/arc/arc.c (arc_function_arg_boundary): Define.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/arm/arm.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/arm/arm-protos.h (arm_needs_doubleword_align): Delete.
	* config/arm/arm.c (arm_needs_doubleword_align): Make static.
	(arm_function_arg_boundary): Define.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/frv/frv.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/frv/frv-protos.h (frv_function_arg_boundary): Delete.
	* config/frv/frv.c (frv_function_arg_boundary): Make static.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/i386/i386.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/i386/i386-protos.h (ix86_function_arg_boundary): Delete.
	* config/i386/i386.c (ix86_function_arg_boundary): Make static.
	(ix86_compat_function_arg_boundary): Take and return unsigned int.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/ia64/ia64.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/ia64/ia64-protos.h (ia64_function_arg_boundary): Delete.
	* config/ia64/ia64.c (ia64_function_arg_boundary): Make static.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/m32c/m32c.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/m32c/m32c.c (m32c_function_arg_boundary): Define.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/m32r/m32r.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/mcore/mcore.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/mcore/mcore.c (mcore_function_arg_boundary): Define.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/mips/mips.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/mips/mips-protos.h (mips_function_arg_boundary): Delete.
	* config/mips/mips.c (mips_function_arg_boundary): Make static.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/pa/pa.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/pa/pa.c (pa_function_arg_boundary): Define.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/picochip/picochip.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/picochip/picochip-protos.h
	(picochip_get_function_arg_boundary): Delete.
	* config/picochip/picochip.c (picochip_get_function_arg_boundary):
	Rename to...
	(picochip_function_arg_boundary): ...this.  Make static.
	(picochip_function_arg, picochip_arg_partial_bytes): Adjust.
	(picochip_arg_advance): Adjust.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/rs6000/rs6000.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/rs6000/rs6000-protos.h (function_arg_boundary): Delete.
	* config/rs6000/rs6000.c (function_arg_boundary): Rename to...
	(rs6000_function_arg_boundary): ...this.  Make static.
	(rs6000_parm_start, rs6000_gimplify_va_arg): Adjust.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/rx/rx.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/rx/rx.c (rx_function_arg_boundary): Define.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/sparc/sparc.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/sparc/sparc.c (sparc_function_arg_boundary): Define.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.
	* config/xtensa/xtensa.h (FUNCTION_ARG_BOUNDARY): Delete.
	* config/xtensa/xtensa-protos.h (function_arg_boundary): Delete.
	* config/xtensa/xtensa.c (function_arg_boundary): Rename to...
	(xtensa_function_arg_boundary): ...this.  Make static.
	(TARGET_FUNCTION_ARG_BOUNDARY): Define.

From-SVN: r166803
2010-11-16 14:25:07 +00:00
Jie Zhang 62519f7fed expr.c (emit_group_load_1): Update calls to extract_bit_field.
* expr.c (emit_group_load_1): Update calls to extract_bit_field.
	(copy_blkmode_from_reg): Likewise.
	(read_complex_part): Likewise.
	(expand_expr_real_1): Calculate packedp and pass it to
	extract_bit_field.
	* expr.h (extract_bit_field): Update declaration.
	* calls.c (store_unaligned_arguments_into_pseudos): Update call
	to extract_bit_field.
	* expmed.c (extract_fixed_bit_field): Update calls to
	extract_fixed_bit_field.
	(store_split_bit_field): Likewise.
	(extract_bit_field_1): Add new argument packedp.
	(extract_bit_field): Add new argument packedp.
	(extract_fixed_bit_field): Add new argument packedp and let
	packed attribute override volatile.
	* stmt.c (expand_return): Update call to extract_bit_field.

From-SVN: r165799
2010-10-22 00:40:15 +00:00
Richard Henderson 3a42502df4 re PR rtl-optimization/33721 ([meta-bug] Gcc can't properly align stack variable)
PR rtl-opt/33721
	* explow.c (allocate_dynamic_stack_space): Add REQUIRED_ALIGN parm,
	remove TARGET parm, convert KNOWN_ALIGN parm to SIZE_ALIGN.  Honor
	required_align, tidy the code a bit.  Emit split_stack code in the
	right place.  Mark the return value with the alignment properly.
	* expr.h (allocate_dynamic_stack_space): Update decl.
	* builtins.c (expand_builtin_apply): Update call to
	allocate_dynamic_stack_space.
	(expand_builtin_alloca): Likewise.  Remove TARGET parameter.
	* calls.c (initialize_argument_information): Update call to
	allocate_dynamic_stack_space.
	(expand_call): Likewise.

	* cfgexpand.c (get_decl_align_unit): Don't limit alignment.
	Don't update_stack_alignment here.
	(alloc_stack_frame_space): Make ALIGN unsigned.
	(stack_var_cmp): Sort by alignment too.
	(partition_stack_vars): Don't merge large and small alignment vars.
	(expand_one_stack_var_at): Add BASE and BASE_ALIGN parameters.
	Take care when BASE is not virtual_stack_vars_rtx.
	(expand_stack_vars): Allocate dynamic stack space for large
	alignment variables.
	(expand_one_stack_var): Update all to expand_one_stack_var_at.
	(defer_stack_allocation): True for large alignment vars.
	(update_stack_alignment): Merge into ...
	(expand_one_var): ... here.
	(gimple_expand_cfg): Place code from expand_stack_vars.

From-SVN: r165240
2010-10-09 15:05:51 -07:00
Jan Hubicka 46a4da10f5 extend.texi: (attribute leaf): Document.
* doc/extend.texi: (attribute leaf): Document.
	* tree.c (local_define_builtin): Handle ECF_LEAF.
	(build_common_builtin_nodes): Set ECF_LEAF where needed.
	* tree.h (ECF_LEAF): New.
	* ipa-reference.c (propagate_bits): For leaf calls propagate ever overwrittable
	and unavailable functions.
	(ipa_init): Put all_module_statics into optimization_summary_obstack.
	(copy_global_bitmap): Do not copy all_module_statics.
	(read_write_all_from_decl): Use cgraph_node argument; handle ECF_LEAF.
	(propagate): Handle overwritable and unavailable leaf functions;
	initialize global info for overwritable and unavailable leaf functions;
	do not free all module statics.
	(ipa_reference_get_not_read_global, ipa_reference_get_not_written_global):
	leaf calls don't clobber local statics.
	* calls.c (flags_from_decl_or_type): Handle leaf.
	* tree-cfg.c (stmt_can_make_abnormal_goto): Leaf functions can't do
	abnormal gotos.

	* c-common.c (handle_leaf_attribute): New function.
	(struct attribute_spec c_common_att): Add leaf.

	* gcc.dg/tree-ssa/leaf.c: New testcase.

From-SVN: r164606
2010-09-24 19:14:51 +00:00
Jakub Jelinek 32990d5bc2 re PR middle-end/45234 (ICE in expand_call, at calls.c:2845 when passing aligned function argument from unaligned stack after alloca)
PR middle-end/45234
	* rtl.h (enum global_rtl_index): Add
	GR_VIRTUAL_PREFERRED_STACK_BOUNDARY.
	(LAST_VIRTUAL_POINTER_REGISTER): Define.
	(virtual_preferred_stack_boundary_rtx,
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM): Define.
	(LAST_VIRTUAL_REGISTER): Increase by one.
	(REGNO_PTR_FRAME_P): Use LAST_VIRTUAL_POINTER_REGISTER
	instead of LAST_VIRTUAL_REGISTER.
	* function.c (instantiate_new_reg): Handle
	virtual_preferred_stack_boundary_rtx.
	* emit-rtl.c (init_virtual_regs): Handle
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM.
	(init_emit_regs): Initialize virtual_preferred_stack_boundary_rtx.
	* explow.c (round_push): If crtl->preferred_stack_boundary
	is smaller than MAX_SUPPORTED_STACK_ALIGNMENT, use
	virtual_preferred_stack_boundary_rtx alignment instead of
	crtl->preferred_stack_boundary alignment.
	(allocate_dynamic_stack_space): Use CONST_INT_P and REG_P
	macros.  Never decrease crtl->preferred_stack_boundary,
	use crtl->preferred_stack_boundary or MAX_SUPPORTED_STACK_ALIGNMENT
	instead of PREFERRED_STACK_BOUNDARY.  Don't modify
	stack_pointer_delta in dynamic allocation, even when size
	is constant.
	(probe_stack_range, anti_adjust_stack_and_probe): Use CONST_INT_P
	macro.
	* print-rtl.c (print_rtx): Handle
	VIRTUAL_PREFERRED_STACK_BOUNDARY_REGNUM.
	* config/alpha/alpha.h (NONSTRICT_REG_OK_FP_BASE_P): Use
	LAST_VIRTUAL_POINTER_REGISTER instead of LAST_VIRTUAL_REGISTER.
	* config/frv/frv.c (frv_emit_movsi): Likewise.
	* config/arm/arm.c (thumb1_legitimate_address_p): Likewise.
	* config/rs6000/rs6000.c (virtual_stack_registers_memory_p):
	Likewise.

	* gcc.dg/torture/stackalign/alloca-6.c: New test.
	* gcc.target/i386/pr45234.c: New test.

	Revert:
	2010-09-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/45234
	* calls.c (expand_call): Make sure that all variable sized
	adjustments are multiple of preferred stack boundary after
	stack alignment.

From-SVN: r164593
2010-09-24 16:37:02 +02:00
H.J. Lu 2b3ded42e2 Make sure that all variable sized adjustments are multiple of preferred
stack boundary after stack alignment.

gcc/

2010-09-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/45234
	* calls.c (expand_call): Make sure that all variable sized
	adjustments are multiple of preferred stack boundary after
	stack alignment.

gcc/testsuite/

2010-09-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/45234
	* gcc.dg/torture/stackalign/alloca-5.c: New.

From-SVN: r164377
2010-09-17 11:00:40 -07:00
Anatoly Sokolov 07b8f0a812 target.def (class_likely_spilled_p): New hook.
* target.def (class_likely_spilled_p): New hook.
	* doc/tm.texi.in (TARGET_CLASS_LIKELY_SPILLED_P): Document.
	* doc/tm.texi: Regenerate.
	* targhooks.c (default_class_likely_spilled_p): New function.
	* targhooks.h (default_class_likely_spilled_p): Declare.
	* regs.h (CLASS_LIKELY_SPILLED_P): Remove.
	* combine.c: (cant_combine_insn_p, likely_spilled_retval_p): Use
	TARGET_CLASS_LIKELY_SPILLED_P target hook. Use HARD_REGISTER_P macro.
	Use fixed_reg_set instead of fixed_regs.
	* cse.c (hash_rtx_cb): Use TARGET_CLASS_LIKELY_SPILLED_P target hook.
	* calls.c (avoid_likely_spilled_reg): Ditto.
	* ira-conflicts.c: (ira_build_conflicts): Ditto.
	* ira.c (update_equiv_regs): Ditto.
	* mode-switching.c (create_pre_exit): Ditto.
	* regmove.c (find_matches): Ditto.
	(regclass_compatible_p): Use TARGET_CLASS_LIKELY_SPILLED_P target
	hook.
	* reload.c (SMALL_REGISTER_CLASS_P): Remove macro.
	(small_register_class_p): New inline function.
	(push_secondary_reload, find_reusable_reload, find_reloads): Use
	small_register_class_p instead of SMALL_REGISTER_CLASS_P.

	* config/i386/i386.h (CLASS_LIKELY_SPILLED_P): Remove.
	* config/i386/i386.c (ix86_class_likely_spilled_p): New.
	(TARGET_CLASS_LIKELY_SPILLED_P): Define.

From-SVN: r163779
2010-09-02 18:29:37 +04:00
Eric Botcazou d3c1230697 Stack usage support
Stack usage support
	* common.opt (-fstack-usage): New option.
	* doc/invoke.texi (Debugging options): Document it.
	* builtins.c (expand_builtin_apply): Pass TRUE as 4th argument to
	allocate_dynamic_stack_space.
	(expand_builtin_alloca): Add 4th bool parameter CANNOT_ACCUMULATE
	and propagate it to allocate_dynamic_stack_space.
	(expand_builtin) <BUILT_IN_ALLOCA>: Adjust for above change.
	* calls.c (initialize_argument_information): Pass TRUE as 4th
	argument to allocate_dynamic_stack_space.
	(expand_call): Set current_function_has_unbounded_dynamic_stack_size
	to 1 when pushing a variable-sized argument onto the stack.  Pass
	TRUE as 4th argument to allocate_dynamic_stack_space.
	Update current_function_pushed_stack_size.
	(emit_library_call_value_1): Likewise.
	* explow.c (allocate_dynamic_stack_space): Add 4th bool parameter
	CANNOT_ACCUMULATE.  If flag_stack_usage, look into the size and
	attempt to find an upper bound.  Remove redundant code for the
	SETJMP_VIA_SAVE_AREA case.
	* expr.h (allocate_dynamic_stack_space): Add 4th bool parameter.
	* function.h (struct stack_usage): New structure.
	(current_function_static_stack_size): New macro.
	(current_function_dynamic_stack_size): Likewise.
	(current_function_pushed_stack_size): Likewise.
	(current_function_dynamic_alloc_count): Likewise.
	(current_function_has_unbounded_dynamic_stack_size): Likewise.
	(current_function_allocates_dynamic_stack_space): Likewise.
	(struct function): Add new field 'su'.
	* function.c (instantiate_virtual_regs): If SETJMP_VIA_SAVE_AREA,
	add the value of the dynamic offset to the dynamic stack usage.
	(gimplify_parameters): Set ALLOCA_FOR_VAR_P on call to BUILT_IN_ALLOCA
	for variable-sized objects.
	(prepare_function_start): Allocate cfun->su if flag_stack_usage.
	(rest_of_handle_thread_prologue_and_epilogue): Call output_stack_usage.
	* gimplify.c (gimplify_decl_expr): Set ALLOCA_FOR_VAR_P on call to
	BUILT_IN_ALLOCA for variable-sized objects.
	* output.h (output_stack_usage): Declare.
	* toplev.c (stack_usage_file): New file pointer.
	(output_stack_usage): New function.
	(open_auxiliary_file): Likewise.
	(lang_dependent_init): Open file if flag_stack_usage is set.
	(finalize): Close file if stack_usage_file is not null.
	* tree.h (ALLOCA_FOR_VAR_P): New macro.
	* config/alpha/alpha.c (compute_frame_size): New function.
	(alpha_expand_prologue): Use it.
	(alpha_start_function): Likewise.
	(alpha_expand_epilogue): Likewise.  Set stack usage info.
	* config/i386/i386.c (ix86_expand_prologue): Likewise.
	* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
	* config/mips/mips.c (mips_expand_prologue): Likewise.
	* config/pa/pa.c (hppa_expand_prologue): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
	* config/sparc/sparc.c (sparc_expand_prologue): Likewise.
testsuite/
	* lib/gcc-dg.exp (cleanup-stack-usage): New procedure.
	* lib/scanasm.exp (scan-stack-usage): Likewise.
	(scan-stack-usage-not): Likewise.
	* gcc.dg/stack-usage-1.c: New test.
	* gcc.target/i386/stack-usage-realign.c: Likewise.

From-SVN: r163660
2010-08-30 20:04:49 +00:00
Jakub Jelinek 9e3920e97f re PR tree-optimization/44485 (ICE in get_expr_operands, at tree-ssa-operands.c:1020)
PR tree-optimization/44485
	* calls.c (flags_from_decl_or_type): For const or pure
	noreturn functions return ECF_LOOPING_CONST_OR_PURE|ECF_NORETURN
	together with ECF_CONST resp. ECF_PURE.
	* builtins.c (expand_builtin): Use flags_from_decl_or_type
	instead of querying flags directly.
	* tree-ssa-loop-niter.c (finite_loop_p): Likewise.
	* tree-ssa-dce.c (find_obviously_necessary_stmts): Likewise.

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

From-SVN: r163568
2010-08-26 18:39:26 +02:00
Iain Sandoe 3b2ee1701f calls.c (load_register_parameters): Move check for zero sized items so that only the call to ...
* calls.c (load_register_parameters): Move check for zero
	sized items so that only the call to 
	mem_overlaps_already_clobbered_arg_p () is protected.

From-SVN: r162402
2010-07-22 07:59:50 +00:00
Richard Guenther 8b4c365c56 re PR rtl-optimization/44941 (ICE: RTL check: expected code 'mem', have 'reg' in emit_block_move_hints, at expr.c:1189)
2010-07-19  Richard Guenther  <rguenther@suse.de>

	PR middle-end/44941
	* expr.c (emit_block_move_hints): Move zero size check first.
	Move asserts to more useful places.
	* calls.c (load_register_parameters): Check for zero size.

	* gcc.c-torture/compile/pr44941.c: New testcase.

From-SVN: r162308
2010-07-19 15:39:51 +00:00
Manuel López-Ibáñez 718f9c0f87 toplev.h: Do not include diagnostic-core.h.
2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* toplev.h: Do not include diagnostic-core.h.
	Include diagnostic-core.h in every file that includes toplev.h.
	* c-tree.h: Do not include toplev.h.
	* pretty-print.h: Update comment.
	* Makefile.in: Update dependencies.
	* alias.c: Include diagnostic-core.h in every file that includes
	toplev.h.
	* attribs.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfghooks.c: Likewise.
	* cfgloop.c: Likewise.
	* combine.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/arm/pe.c: Likewise.
	* config/avr/avr.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/cris/cris.c: Likewise.
	* config/crx/crx.c: Likewise.
	* config/darwin-c.c: Likewise.
	* config/darwin.c: Likewise.
	* config/fr30/fr30.c: Likewise.
	* config/frv/frv.c: Likewise.
	* config/h8300/h8300.c: Likewise.
	* config/host-darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/netware.c: Likewise.
	* config/i386/nwld.c: Likewise.
	* config/i386/winnt-cxx.c: Likewise.
	* config/i386/winnt-stubs.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64-c.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/lm32/lm32.c: Likewise.
	* config/m32c/m32c-pragma.c: Likewise.
	* config/m32c/m32c.c: Likewise.
	* config/m32r/m32r.c: Likewise.
	* config/m68hc11/m68hc11.c: Likewise.
	* config/m68k/m68k.c: Likewise.
	* config/mcore/mcore.c: Likewise.
	* config/mep/mep-pragma.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/mn10300/mn10300.c: Likewise.
	* config/moxie/moxie.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/pdp11/pdp11.c: Likewise.
	* config/picochip/picochip.c: Likewise.
	* config/rs6000/rs6000-c.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/score/score.c: Likewise.
	* config/score/score3.c: Likewise.
	* config/score/score7.c: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sh/symbian-base.c: Likewise.
	* config/sh/symbian-c.c: Likewise.
	* config/sh/symbian-cxx.c: Likewise.
	* config/sol2-c.c: Likewise.
	* config/sol2.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/v850/v850-c.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/vxworks.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.
	* convert.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* dbgcnt.c: Likewise.
	* dbxout.c: Likewise.
	* ddg.c: Likewise.
	* dominance.c: Likewise.
	* emit-rtl.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* fixed-value.c: Likewise.
	* fold-const.c: Likewise.
	* fwprop.c: Likewise.
	* gcse.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc-zone.c: Likewise.
	* gimple-low.c: Likewise.
	* gimplify.c: Likewise.
	* graph.c: Likewise.
	* haifa-sched.c: Likewise.
	* ifcvt.c: Likewise.
	* implicit-zee.c: Likewise.
	* integrate.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* lists.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-iv.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-symtab.c: Likewise.
	* main.c: Likewise.
	* modulo-sched.c: Likewise.
	* optabs.c: Likewise.
	* params.c: Likewise.
	* plugin.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* profile.c: Likewise.
	* real.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regmove.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* rtl.c: Likewise.
	* rtlanal.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* targhooks.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vrp.c: Likewise.
	* varasm.c: Likewise.
	* vec.c: Likewise.
	* web.c: Likewise.
	* xcoffout.c: Likewise.

c-family/
	* c-common.h: Include diagnostic-core.h. Error if already
	included.
	* c-semantics.c: Do not define GCC_DIAG_STYLE here.
cp/
	* cp-tree.h: Do not include toplev.h.
	
java/
	* boehm.c: Include diagnostic-core.h in every file that includes
	toplev.h.
	* class.c: Likewise.
	* constants.c: Likewise.
	* decl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* jcf-parse.c: Likewise.
	* mangle.c: Likewise.
	* mangle_name.c: Likewise.
	* resource.c: Likewise.
	* typeck.c: Likewise.
	* verify-glue.c: Likewise.
ada/
	* gcc-interface/utils.c: Include diagnostic-core.h in every file
	that includes toplev.h.
lto/
	* lto-coff.c: Include diagnostic-core.h in every file that
	includes toplev.h.
	* lto-elf.c: Likewise.
	* lto-lang.c: Likewise.
	* lto-macho.c: Likewise.

From-SVN: r161943
2010-07-08 04:22:54 +00:00
Nathan Froyd 3c07301f6b calls.c, [...]: Call targetm.calls.function_arg...
* calls.c, dse.c, expr.c, function.c: Call targetm.calls.function_arg,
	targetm.calls.function_incoming_arg, and
	targetm.calls.function_arg_advance instead of FUNCTION_ARG,
	FUNCTION_INCOMING_ARG, and FUNCTION_ARG_ADVANCE, respectively.
	* target.h (struct gcc_target): Add function_arg_advance,
	function_arg, and function_incoming_arg fields.
	* target-def.h (TARGET_FUNCTION_ARG_ADVANCE, TARGET_FUNCTION_ARG):
	(TARGET_FUNCTION_INCOMING_ARG): Define.
	(TARGET_CALLS): Add TARGET_FUNCTION_ARG_ADVANCE, TARGET_FUNCTION_ARG,
	and TARGET_FUNCTION_INCOMING_ARG.
	* targhooks.h (default_function_arg_advance): Declare.
	(default_function_arg, default_function_incoming_arg): Declare.
	* targhooks.c (default_function_arg_advance): New function.
	(default_function_arg, default_function_incoming_arg): New function.
	* config/i386/i386.c (function_arg_advance): Rename to...
	(ix86_function_arg_advance): ...this.  Make static.
	(function_arg): Rename to...
	(ix86_function_arg): ...this.  Make static.
	(TARGET_FUNCTION_ARG_ADVANCE): Define.
	(TARGET_FUNCTION_ARG): Define.
	* config/i386/i386.h (FUNCTION_ARG_ADVANCE): Delete.
	(FUNCTION_ARG): Delete.
	* config/i386/i386-protos.h (function_arg_advance): Delete prototype.
	(function_arg): Delete prototype.

From-SVN: r161530
2010-06-29 12:24:04 +00:00
Nathan Froyd 079e7538c0 reginfo.c (init_reg_sets_1): Adjust comments.
* reginfo.c (init_reg_sets_1): Adjust comments.
	* combine-stack-adj.c (rest_of_handle_stack_adjustments): Likewise.
	* calls.c (prepare_call_address): Likewise.
	(emit_call_1): Use targetm.calls.return_pops_args.
	(expand_call): Likewise.
	* function.c (assign_parms): Likewise.
	* system.h (RETURN_POPS_ARGS): Add to #pragma poison list.
	* target.h (struct gcc_target) [struct calls]: Add
	return_pops_args field.
	* targhooks.h (default_return_pops_args): Declare.
	* targhooks.c (default_return_pops_args): Define.
	* target-def.h (TARGET_RETURN_POPS_ARGS): Define.
	(TARGET_CALLS): Add TARGET_RETURN_POPS_ARGS.
	* doc/tm.texi (RETURN_POPS_ARGS): Rename to...
	(TARGET_RETURN_POPS_ARGS): ...this.  Use deftypefn.  Adjust
	documentation.
	* config/alpha/alpha.h (RETURN_POPS_ARGS): Delete.
	* config/arc/arc.h (RETURN_POPS_ARGS): Likewise.
	* config/arm/arm.h (RETURN_POPS_ARGS): Likewise.
	* config/avr/avr.h (RETURN_POPS_ARGS): Likewise.
	* config/bfin/bfin.h (RETURN_POPS_ARGS): Likewise.
	* config/cris/cris.h (RETURN_POPS_ARGS): Likewise.
	* config/crx/crx.h (RETURN_POPS_ARGS): Likewise.
	* config/fr30/fr30.h (RETURN_POPS_ARGS): Likewise.
	* config/frv/frv.h (RETURN_POPS_ARGS): Likewise.
	* config/h8300/h8300.h (RETURN_POPS_ARGS): Likewise.
	* config/ia64/ia64.h (RETURN_POPS_ARGS): Likewise.
	* config/iq2000/iq2000.h (RETURN_POPS_ARGS): Likewise.
	* config/lm32/lm32.h (RETURN_POPS_ARGS): Likewise.
	* config/m32c/m32c.h (RETURN_POPS_ARGS): Likewise.
	* config/m32r/m32r.h (RETURN_POPS_ARGS): Likewise.
	* config/m68hc11/m68hc11.h (RETURN_POPS_ARGS): Likewise.
	* config/mcore/mcore.h (RETURN_POPS_ARGS): Likewise.
	* config/mep/mep.h (RETURN_POPS_ARGS): Likewise.
	* config/mips/mips.h (RETURN_POPS_ARGS): Likewise.
	* config/mmix/mmix.h (RETURN_POPS_ARGS): Likewise.
	* config/mn10300/mn10300.h (RETURN_POPS_ARGS): Likewise.
	* config/moxie/moxie.h (RETURN_POPS_ARGS): Likewise.
	* config/pa/pa.h (RETURN_POPS_ARGS): Likewise.
	* config/pdp11/pdp11.h (RETURN_POPS_ARGS): Likewise.
	* config/picochip/picochip.h (RETURN_POPS_ARGS): Likewise.
	* config/rs6000/rs6000.h (RETURN_POPS_ARGS): Likewise.
	* config/rx/rx.h (RETURN_POPS_ARGS): Likewise.
	* config/s390/s390.h (RETURN_POPS_ARGS): Likewise.
	* config/score/score.h (RETURN_POPS_ARGS): Likewise.
	* config/sh/sh.h (RETURN_POPS_ARGS): Likewise.
	* config/sparc/sparc.h (RETURN_POPS_ARGS): Likewise.
	* config/spu/spu.h (RETURN_POPS_ARGS): Likewise.
	* config/stormy16/stormy16.h (RETURN_POPS_ARGS): Likewise.
	* config/v850/v850.h (RETURN_POPS_ARGS): Likewise.
	* config/xtensa/xtensa.h (RETURN_POPS_ARGS): Likewise.
	* config/i386/i386-protos.h (ix86_return_pops_args): Delete.
	* config/i386/i386.h (RETURN_POPS_ARGS): Delete.
	* config/i386/i386.c (ix86_return_pops_args): Make static.
	Constify arguments.
	(TARGET_RETURN_POPS_ARGS): Define.
	* config/m68k/m68k.h (RETURN_POPS_ARGS): Move to...
	* config/m68k/m68k.c (m68k_return_pops_args): ...here.  New function.
	(TARGET_RETURN_POPS_ARGS): Define.
	* config/vax/vax.h (RETURN_POPS_ARGS): Move to...
	* config/vax/vax.c (vax_return_pops_args): ...here.  New function.
	(TARGET_RETURN_POPS_ARGS): Define.

From-SVN: r161528
2010-06-29 12:18:36 +00:00
Steven Bosscher 42db504c2f tm.texi (defmac SMALL_REGISTER_CLASSES): Remove.
* doc/tm.texi (defmac SMALL_REGISTER_CLASSES): Remove.
	(TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Add documentation,
	based on the above, for new target hook.

	* hooks.c (hook_bool_mode_true): New generic hook.
	* hooks.h (hook_bool_mode_true): Add prototype.

	* target.h (struct gcc_target): Add small_register_classes_for_mode_p
	target hook.
	* target-def.h (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): New default
	target hook, set to hook_bool_mode_false.
	* regs.h: Remove default definition of SMALL_REGISTER_CLASSES.
	* reload.c (push_secondary_reload): Replace SMALL_REGISTER_CLASSES
	with targetm.small_register_classes_for_mode_p.
	(find_reusable_reload): Likewise.
	(combine_reloads): Likewise.
	* reload1.c (reload_as_needed): Likewise.
	* cse.c (approx_reg_cost_1, hash_rtx_cb): Likewise.
	* ifcvt.c (noce_process_if_block, check_cond_move_block,
	dead_or_predicable): Likewise.
	* regmove.c (optimize_reg_copy_1): Likewise.
	* calls.c (prepare_call_address): Likewise.
	(precompute_register_parameters): Likewise.

	* config/sh/sh.h: Replace SMALL_REGISTER_CLASSES with new target
	hook definition.
	* config/sh/sh.c (sh_small_register_classes_for_mode_p): Add
	implementation of the hook that considers all register classes
	small except for SH64.
	(sh_override_options): Use the new hook.
	* config/sh/sh-protos.h (sh_small_register_classes_for_mode_p):
	Add prototype.

	* config/arm/arm.h: Replace SMALL_REGISTER_CLASSES with new target
	hook definition.
	* config/arm/arm.c (arm_small_register_classes_for_mode_p): Add
	implementation of the hook that considers all register classes
	small for THUMB1.
	* config/arm/arm-protos.h (arm_small_register_classes_for_mode_p):
	Add prototype.

	* config/mips/mips.h: Replace SMALL_REGISTER_CLASSES with new target
	hook definition.
	* config/mips/mips.c (mips_small_register_classes_for_mode_p): Add
	implementation of the hook that considers all register classes
	small for MIPS16.
	* config/mips/mips-protos.h (mips_small_register_classes_for_mode_p):
	Add prototype.

	* config/i386/i386.h: Replace SMALL_REGISTER_CLASSES with new target
	hook definition.
	* config/m32c/m32c.h: Likewise.
	* config/pdp11/pdp11.h: Likewise.
	* config/avr/avr.h: Likewise.
	* config/xtensa/xtensa.h: Likewise.
	* config/m68hc11/m68hc11.h: Likewise.
	* config/mn10300/mn10300.h: Likewise.
	* config/mcore/mcore.h: Likewise.
	* config/h8300/h8300.h: Likewise.
	* config/bfin/bfin.h: Likewise.

	* config/iq2000/iq2000.h: Remove SMALL_REGISTER_CLASSES definition.
	* config/rx/rx.h: Remove SMALL_REGISTER_CLASSES definition.

From-SVN: r158997
2010-05-03 17:47:47 +00:00
Eric Botcazou d47d0a8d97 tree.h (TREE_ADDRESSABLE): Document its effect for function types.
* tree.h (TREE_ADDRESSABLE): Document its effect for function types.
	* calls.c (expand_call): Pass the function type to aggregate_value_p.
	* function.c (aggregate_value_p): Do not honor DECL_BY_REFERENCE on
	the target function of a CALL_EXPR.  Honor TREE_ADDRESSABLE on the
	function type instead.  Reorder and simplify checks.

	* gimplify.c (gimplify_modify_expr_rhs) <WITH_SIZE_EXPR>: New case.
ada/
	* gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
	(TYPE_RETURN_UNCONSTRAINED_P): ...this.
	(TYPE_RETURNS_BY_REF_P): Rename into.
	(TYPE_RETURN_BY_DIRECT_REF_P): ...this.
	(TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
	* gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
	(build_return_expr): Likewise.
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
	Rename local variables.  If the return Mechanism is By_Reference, pass
	return_by_invisible_ref_p to create_subprog_type instead of toggling
	TREE_ADDRESSABLE.  Test return_by_invisible_ref_p in order to annotate
	the mechanism.  Use regular return for contrained types with non-static
	size and return by invisible reference for unconstrained return types
	with default discriminants.  Update comment.
	* gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
	returns by invisible reference, turn the RESULT_DECL into a pointer.
	Do not handle DECL_BY_REF_P in the CICO case here.
	(call_to_gnu): Remove code handling return by target pointer.  For a
	function call, if the return type has non-constant size, generate the
	assignment with an INIT_EXPR.
	(gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
	If the function returns by invisible reference, build the copy return
	operation manually.
	(add_decl_expr): Initialize the variable with an INIT_EXPR.
	* gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
	Adjust for renaming of macros.  Copy the node only when necessary.
	(create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
	type, only change DECL_BY_REFERENCE on the RETURN_DECL.
	(convert_from_reference): Delete.
	(is_byref_result): Likewise.
	(gnat_genericize_r): Likewise.
	(gnat_genericize): Likewise.
	(end_subprog_body): Do not call gnat_genericize.
	* gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
	(build_return_expr): Adjust parameter names, logic and comment.

From-SVN: r158139
2010-04-08 20:16:36 +00:00
Steven Bosscher c75c517d53 Make-lang.in, [...]: Update copyright years.
* ada/gcc-interface/Make-lang.in, alias.c, attribs.c, auto-inc-dec.c, 
	basic-block.h, bb-reorder.c, calls.c, c-common.c, cgraph.h,
	collect2.h, config/alpha/alpha.c, config/alpha/alpha.md,
	config/alpha/predicates.md, config/arm/arm.md,
	config/arm/lib1funcs.asm, config/arm/neon-schedgen.ml,
	config/avr/avr.c, config/avr/avr.md, config/bfin/bfin.c,
	config/darwin9.h, config/darwin.c, config/darwin.h,
	config/h8300/h8300.c, config/i386/cpuid.h, config/i386/cygming.h,
	config/i386/cygwin.h, config/i386/mingw32.h, config/i386/msformat-c.c,
	config/i386/sol2-10.h, config/i386/xopintrin.h, config/ia64/ia64.c,
	config/ia64/ia64.md, config/ia64/sync.md, config/mep/mep.c,
	config/mips/mips.md, config/mn10300/mn10300.c,
	config/mn10300/mn10300.h, config/pa/pa.c, config/pa/pa.md,
	config/rs6000/aix.h, config/rs6000/dfp.md,
	config/rs6000/rs6000-builtin.def, config/rs6000/rs6000-c.c,
	config/rs6000/vector.md, config/rtems.h, config/rx/rx.md,
	config/s390/s390.md, config/sol2-c.c, config/sparc/sol2-bi.h,
	config/sparc/sol2-gas.h, config/sparc/sparc.h, config/sparc/sparc.md,
	config/sparc/sparc-protos.h, config/spu/spu.c, config/spu/spu-c.c,
	config/t-darwin, convert.c, c.opt, c-opts.c, cp/Make-lang.in,
	c-pretty-print.c, c-typeck.c, df-core.c, df-scan.c, diagnostic.c,
	diagnostic.h, doc/cppopts.texi, doc/cpp.texi, doc/extend.texi,
	doc/gimple.texi, doc/languages.texi, doc/plugins.texi, doc/rtl.texi,
	doc/standards.texi, doc/tree-ssa.texi, doc/trouble.texi, dominance.c,
	fold-const.c, fortran/Make-lang.in, fwprop.c, gcc-plugin.h,
	gensupport.c, gimple.h, gimple-iterator.c, graphite.c,
	graphite-clast-to-gimple.c, graphite-clast-to-gimple.h,
	graphite-dependences.c, graphite-poly.c, graphite-poly.h,
	graphite-ppl.c, graphite-ppl.h, graphite-scop-detection.c,
	graphite-sese-to-poly.c, graphite-sese-to-poly.h, ifcvt.c, intl.c,
	intl.h, ipa.c, ipa-cp.c, ipa-inline.c, ipa-prop.c, ipa-prop.h,
	ipa-pure-const.c, ipa-reference.c, ipa-type-escape.c, ira-color.c,
	ira-conflicts.c, ira-lives.c, java/Make-lang.in, lambda-code.c,
	loop-invariant.c, lto/Make-lang.in, lto-streamer.h, lto-streamer-in.c,
	objc/Make-lang.in, objcp/Make-lang.in, omp-low.c, optc-gen.awk,
	opt-functions.awk, opth-gen.awk, params.def, passes.c,
	postreload-gcse.c, print-tree.c, recog.c, regrename.c, reload.h,
	rtl.def, sched-int.h, sched-rgn.c, sel-sched-dump.c, sese.c, sese.h,
	store-motion.c, stor-layout.c, tree-cfgcleanup.c, tree-chrec.c,
	tree-complex.c, tree-data-ref.c, tree.def, tree-eh.c, tree-flow.h,
	tree-flow-inline.h, tree.h, tree-loop-distribution.c, tree-outof-ssa.c,
	tree-parloops.c, tree-pass.h, tree-predcom.c, tree-profile.c,
	tree-scalar-evolution.c, tree-ssa-address.c, tree-ssa-alias.c,
	tree-ssa-coalesce.c, tree-ssa-copy.c, tree-ssa-dce.c, tree-ssa-dom.c,
	tree-ssa-dse.c, tree-ssa-loop-im.c, tree-ssa-loop-ivcanon.c,
	tree-ssa-loop-manip.c, tree-ssa-math-opts.c, tree-ssa-operands.c,
	tree-ssa-pre.c, tree-ssa-sccvn.c, tree-ssa-structalias.c,
	tree-ssa-uncprop.c, tree-tailcall.c, tree-vect-data-refs.c,
	tree-vect-loop.c, tree-vectorizer.h, tree-vect-slp.c, tree-vrp.c,
	unwind-dw2-fde-darwin.c, varpool.c: Update copyright years.

From-SVN: r157950
2010-04-02 19:54:46 +00:00
Janis Johnson ebf0bf7f49 tree.h (TYPE_TRANSPARENT_UNION): Replace with ...
* tree.h (TYPE_TRANSPARENT_UNION): Replace with ...
	(TYPE_TRANSPARENT_AGGR): this, for union and record.
	* calls.c (initialize argument_information): Handle it.
	* c-common.c (handle_transparent_union_attribute): Use new name.
	* c-decl.c (finish_struct): Ditto.
	* c-typeck.c (type_lists_compatible_p): Ditto.
	(convert_for_assignment): Use new name and also handle record.
	* function.c (aggregate_value_p): Handle it.
	(pass_by_reference): Ditto.
	(assign_parm_data_types): Ditto.
	* print-tree.c (print_node): Ditto.
	* lto-streamer-in.c (unpack_ts_type_value_fields): Ditto.
	* lto-streamer-out.c (pack_ts_type_value_fields): Ditto.
	* tree.c (first_field): New fn.

gcc/cp/
	* mangle.c (write_type): Mangle transparent record as member type.
	* semantics.c (begin_class_definition): Recognize decimal classes
	and set TYPE_TRANSPARENT_AGGR.

Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r156106
2010-01-21 00:49:35 -05:00
Jakub Jelinek 0f900dfafa matrix-reorg.c (analyze_matrix_allocation_site): Remove unused malloc_fname variable.
* matrix-reorg.c (analyze_matrix_allocation_site): Remove unused
	malloc_fname variable.
	(check_allocation_function): Remove unused gsi and bb_level_0
	variables.
	(transform_access_sites): Remove unused d_type_size and d_type_size_k
	variables.
	* omega.c (resurrect_subs): Remove unused n variable.
	(omega_solve_geq): Remove unused neweqns variable.
	* lto-streamer-in.c (lto_read_tree): Remove unused end_marker variable.
	* tree-inline.c (declare_return_variable): Remove USE_P argument,
	return use instead of var.
	(remap_decl, remap_block): Remove unused fn variable.
	(expand_call_inline): Remove unused retvar variable, adjust
	declare_return_variable caller.
	(optimize_inline_calls): Remove unused prev_fn variable.
	* tree-vect-slp.c (vect_analyze_slp_instance): Remove unused ncopies
	variable.
	(vect_create_mask_and_perm): Remove unused group_size and dr_chain_size
	variables.
	* tree-ssa-loop-niter.c (split_to_var_and_offset): Handle MINUS_EXPR
	properly.
	* tree-vect-loop.c (vect_analyze_loop_form): Remove unused backedge
	variable.
	(vect_create_epilog_for_reduction): Remove unused bytesize variable.
	* omp-low.c (workshare_safe_to_combine_p): Remove par_entry_bb
	parameter.  Remove unused par_stmt variable.
	(determine_parallel_type): Adjust workshare_safe_to_combine_p caller.
	(expand_omp_sections): Remove unused l1 variable.
	(lower_omp_for): Remove unused ilist variable.
	* tree-loop-distribution.c (mark_nodes_having_upstream_mem_writes):
	Remove unused has_upstream_mem_write_p variable.
	* recog.c (decode_asm_operands): Remove unused noperands variable.
	* tree-ssa-alias.c (refs_may_alias_p_1): Remove unused size1 and
	size2 variable.
	* libgcov.c (__gcov_merge_delta): Remove unused last variable.
	* tree-call-cdce.c (gen_conditions_for_pow_int_base): Remove unused
	base_nm variable.
	(gen_conditions_for_pow): Remove unused ec variable.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Remove unused size
	variable.
	* ipa-struct-reorg.c (program_redefines_malloc_p): Remove unused
	fndecl variable.
	* tree-ssa-sink.c (statement_sink_location): Remove unused code
	variable.
	* regmove.c (copy_src_to_dest): Remove unused insn_uid and move_uid
	variables.
	* tree-complex.c (create_one_component_var): Remove unused inner_type
	variable.
	* calls.c (emit_call_1): Don't GEN_INT (struct_value_size)
	unnecessarily when GEN_*CALL omits that argument.
	* regrename.c (regrename_optimize): Remove unused regs_seen variable.
	(build_def_use): Remove unused icode variable.
	* ipa-pure-const.c (check_call): Remove unused callee and avail
	variables.
	* tree-dfa.c (add_referenced_var): Remove unused v_ann variable.
	* tree-vect-patterns.c (vect_recog_pow_pattern): Remove unused type
	variable.
	(vect_pattern_recog): Remove unused stmt variable.
	* sel-sched-ir.c (make_regions_from_the_rest): Remove unused
	new_regions variable.
	* postreload.c (reload_cse_simplify_operands): Remove unused mode
	variable.
	* tree-parloops.c (create_call_for_reduction_1): Remove unused
	addr_type variable.
	(create_parallel_loop): Remove unused res variable.
	(gen_parallel_loop): Remove unused nloop variable.
	* tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
	* value-prof.c (gimple_mod_subtract_transform,
	gimple_stringops_transform): Remove unused value variable.
	(gimple_stringops_values_to_profile): Remove unused fcode variable.
	* tree-vrp.c (register_new_assert_for): Remove unused found variable.
	(vrp_visit_switch_stmt): Remove unused n variable.
	* tree-vect-stmts.c (vectorizable_conversion): Remove unused expr
	variable.
	(vectorizable_operation): Remove unused shift_p variable.
	(vectorizable_store): Remove unused first_stmt_vinfo variable.
	* tree-ssa-operands.c (add_stmt_operand): Remove unused v_ann variable.
	* tree-vect-data-refs.c (vect_analyze_data_refs): Remove unused bb
	variable.
	(vect_permute_store_chain): Remove unused scalar_dest variable.
	(vect_supportable_dr_alignment): Remove unused invariant_in_outerloop
	variable.
	* tree-ssa-threadupdate.c (thread_single_edge): Remove unused
	local_info variable.
	* tree-optimize.c (tree_rest_of_compilation): Remove unused node
	variable.
	* optabs.c (expand_binop): Remove unused equiv_value variable.
	(emit_libcall_block): Remove unused prev variable.
	(init_optabs): Remove unused int_mode variable.
	* tree-ssa-structalias.c (scc_visit): Remove unused have_ref_node
	variable.
	(do_structure_copy): Remove unused lhsbase and rhsbase variables.
	(find_func_aliases): Remove unused rhstype variable.
	(ipa_pta_execute): Remove unused varid variable.
gcc/objc/
	* objc-act.c (generate_shared_structures): Remove unused sc_spec and
	decl_specs variables.
	(objc_build_message_expr): Remove unused loc variable.
	(objc_finish_message_expr): Remove unused saved_rtype variable.
	(encode_field_decl): Remove unused type variable.
gcc/lto/
	* lto-lang.c (handle_nonnull_attribute): Remove unused attr_arg_num
	variable.

From-SVN: r154726
2009-11-28 17:21:00 +01:00
H.J. Lu b8698a0f37 Remove trailing white spaces.
2009-11-25  H.J. Lu  <hongjiu.lu@intel.com>

	* alias.c: Remove trailing white spaces.
	* alloc-pool.c: Likewise.
	* alloc-pool.h: Likewise.
	* attribs.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* builtins.def: Likewise.
	* c-common.c: Likewise.
	* c-common.h: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-decl.c: Likewise.
	* c-format.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c-opts.c: Likewise.
	* c-parser.c: Likewise.
	* c-pretty-print.c: Likewise.
	* c-tree.h: Likewise.
	* c-typeck.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h: Likewise.
	* cfglayout.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphunit.c: Likewise.
	* cif-code.def: Likewise.
	* collect2.c: Likewise.
	* combine.c: Likewise.
	* convert.c: Likewise.
	* coverage.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* dbgcnt.c: Likewise.
	* dbgcnt.def: Likewise.
	* dbgcnt.h: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* ddg.c: Likewise.
	* ddg.h: Likewise.
	* defaults.h: Likewise.
	* df-byte-scan.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* df.h: Likewise.
	* dfp.c: Likewise.
	* diagnostic.c: Likewise.
	* diagnostic.h: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* double-int.c: Likewise.
	* double-int.h: Likewise.
	* dse.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2asm.h: Likewise.
	* dwarf2out.c: Likewise.
	* ebitmap.c: Likewise.
	* ebitmap.h: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* flags.h: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* fwprop.c: Likewise.
	* gcc.c: Likewise.
	* gcov-dump.c: Likewise.
	* gcov-io.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* genchecksum.c: Likewise.
	* genconfig.c: Likewise.
	* genflags.c: Likewise.
	* gengtype-parse.c: Likewise.
	* gengtype.c: Likewise.
	* gengtype.h: Likewise.
	* genmddeps.c: Likewise.
	* genmodes.c: Likewise.
	* genopinit.c: Likewise.
	* genpreds.c: Likewise.
	* gensupport.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc-zone.c: Likewise.
	* ggc.h: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple.c: Likewise.
	* gimple.def: Likewise.
	* gimple.h: Likewise.
	* gimplify.c: Likewise.
	* graphds.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* gthr-nks.h: Likewise.
	* gthr-posix.c: Likewise.
	* gthr-posix.h: Likewise.
	* gthr-posix95.h: Likewise.
	* gthr-single.h: Likewise.
	* gthr-tpf.h: Likewise.
	* gthr-vxworks.h: Likewise.
	* gthr.h: Likewise.
	* haifa-sched.c: Likewise.
	* hard-reg-set.h: Likewise.
	* hooks.c: Likewise.
	* hooks.h: Likewise.
	* hosthooks.h: Likewise.
	* hwint.h: Likewise.
	* ifcvt.c: Likewise.
	* incpath.c: Likewise.
	* init-regs.c: Likewise.
	* integrate.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-struct-reorg.c: Likewise.
	* ipa-struct-reorg.h: Likewise.
	* ipa-type-escape.c: Likewise.
	* ipa-type-escape.h: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-utils.h: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-int.h: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* lambda-code.c: Likewise.
	* lambda-mat.c: Likewise.
	* lambda-trans.c: Likewise.
	* lambda.h: Likewise.
	* langhooks.c: Likewise.
	* lcm.c: Likewise.
	* libgcov.c: Likewise.
	* lists.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-init.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-iv.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* lto-streamer.h: Likewise.
	* lto-symtab.c: Likewise.
	* lto-wpa-fixup.c: Likewise.
	* matrix-reorg.c: Likewise.
	* mcf.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omega.c: Likewise.
	* omega.h: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* opts-common.c: Likewise.
	* opts.c: Likewise.
	* params.def: Likewise.
	* params.h: Likewise.
	* passes.c: Likewise.
	* plugin.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* predict.def: Likewise.
	* pretty-print.c: Likewise.
	* pretty-print.h: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* read-rtl.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regmove.c: Likewise.
	* regrename.c: Likewise.
	* regs.h: Likewise.
	* regstat.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* resource.c: Likewise.
	* rtl.c: Likewise.
	* rtl.def: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.
	* sbitmap.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-int.h: Likewise.
	* sched-rgn.c: Likewise.
	* sched-vis.c: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-dump.h: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* sel-sched.h: Likewise.
	* sese.c: Likewise.
	* sese.h: Likewise.
	* simplify-rtx.c: Likewise.
	* stack-ptr-mod.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* stringpool.c: Likewise.
	* stub-objc.c: Likewise.
	* sync-builtins.def: Likewise.
	* target-def.h: Likewise.
	* target.h: Likewise.
	* targhooks.c: Likewise.
	* targhooks.h: Likewise.
	* timevar.c: Likewise.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* toplev.h: Likewise.
	* tracer.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-affine.h: Likewise.
	* tree-browser.def: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-dump.h: Likewise.
	* tree-eh.c: Likewise.
	* tree-flow-inline.h: Likewise.
	* tree-flow.h: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-loop-linear.c: Likewise.
	* tree-mudflap.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nomudflap.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-pass.h: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-copyrename.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-operands.h: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vectorizer.h: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.def: Likewise.
	* tree.h: Likewise.
	* treestruct.def: Likewise.
	* unwind-compat.c: Likewise.
	* unwind-dw2-fde-glibc.c: Likewise.
	* unwind-dw2.c: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vec.c: Likewise.
	* vec.h: Likewise.
	* vmsdbgout.c: Likewise.
	* web.c: Likewise.
	* xcoffout.c: Likewise.

From-SVN: r154645
2009-11-25 02:55:54 -08:00
David Binderman 451409e493 builtins.c (apply_args_size, [...]): Remove some set but not used variables.
2009-11-07  David Binderman <dcb314@hotmail.com>

	* builtins.c (apply_args_size, expand_builtin_mathfn, expand_powi,
	expand_builtin_expect, maybe_emit_sprintf_chk_warning): Remove some
	set but not used variables.
	* calls.c (flags_from_decl_or_type): Likewise.
	* genautomata.c (check_regexp_units_distribution): Likewise.

From-SVN: r154001
2009-11-07 20:51:14 +00:00
Jakub Jelinek 78441afbc8 re PR rtl-optimization/41646 (Reload ICE due to combiner extending life time of a hard register)
PR rtl-optimization/41646
	* calls.c (expand_call): For BLKmode types returned in registers
	avoid likely spilled hard regs in copy_blkmode_from_reg generated
	insns.

	* gcc.c-torture/compile/pr41646.c: New test.

From-SVN: r152597
2009-10-09 21:01:53 +02:00
Cary Coutant 77831620cf Add support for debugging with ICF (Identical Code Folding).
gcc/ChangeLog:
	Add support for debugging with ICF (Identical Code Folding).
	* calls.c (debug.h): New #include.
	(emit_call_1): Call virtual_call_token debug hook.
	* common.opt (-fenable-icf-debug): New option.
	* dwarf2out.c (dwarf2_debug_hooks): Add entries for new hooks (two
	locations in the source).
	(poc_label_num): New variable.
	(dcall_entry, vcall_entry): New typedefs.
	(dcall_table, vcall_table): New variables.
	(struct vcall_insn): New type.
	(vcall_insn_table): New variable.
	(DEBUG_DCALL_SECTION, DEBUG_VCALL_SECTION): New macros.
	(size_of_dcall_table): New function.
	(output_dcall_table): New function.
	(size_of_vcall_table): New function.
	(output_vcall_table): New function.
	(dwarf2out_direct_call): New function.
	(vcall_insn_table_hash): New function.
	(vcall_insn_table_eq): New function.
	(dwarf2out_virtual_call_token): New function.
	(dwarf2out_virtual_call): New function.
	(dwarf2out_init): Allocate new tables and sections.
	(prune_unused_types): Mark DIEs referenced from direct call table.
	(dwarf2out_finish): Output direct and virtual call tables.
	* final.c (final_scan_insn): Call direct_call and virtual_call
	debug hooks.
	* debug.h (struct gcc_debug_hooks): Add direct_call,
	virtual_call_token, virtual_call hooks.
	(debug_nothing_uid): New function.
	* debug.c (do_nothing_debug_hooks): Add dummy entries for new hooks.
	(debug_nothing_uid): New function.
	* dbxout.c (dbx_debug_hooks): Add dummy entries for new hooks.
	* sdbout.c (sdb_debug_hooks): Likewise.
	* vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
	* doc/invoke.texi (-fenable-icf-debug): New option.

gcc/testsuite/ChangeLog:
	Add support for debugging with ICF (Identical Code Folding).
	* g++.dg/debug/dwarf2/icf.C: New test.

From-SVN: r152577
2009-10-08 14:00:04 -07:00
Richard Henderson 531ca746f9 re PR target/41246 (should "sorry" when regparm=3 and nested functions are encountered)
PR target/41246
	* target.h (struct gcc_target): Add asm_out.trampoline_template,
	calls.static_chain, calls.trampoline_init,
	calls.trampoline_adjust_address.
	* target-def.h (TARGET_ASM_TRAMPOLINE_TEMPLATE): New.
	(TARGET_STATIC_CHAIN, TARGET_TRAMPOLINE_INIT): New.
	(TARGET_TRAMPOLINE_ADJUST_ADDRESS): New.
	* builtins.c (expand_builtin_setjmp_receiver): Use
	targetm.calls.static_chain; only clobber registers.
	(expand_builtin_init_trampoline): Use targetm.calls.trampoline_init;
	set up memory attributes properly for the trampoline block.
	(expand_builtin_adjust_trampoline): Use
	targetm.calls.trampoline_adjust_address.
	* calls.c (prepare_call_address): Add fndecl argument.  Use
	targetm.calls.static_chain.
	* df-scan.c (df_need_static_chain_reg): Remove.
	(df_get_entry_block_def_set): Use targetm.calls.static_chain;
	consolodate static chain handling.
	* doc/tm.texi: Document new hooks.
	* emit-rtl.c (static_chain_rtx, static_chain_incoming_rtx): Remove.
	(init_emit_regs): Don't initialize them.
	* expr.h (prepare_call_address): Update decl.
	* final.c (profile_function): Use targetm.calls.static_chain.
	* function.c (expand_function_start): Likewise.
	* rtl.h (static_chain_rtx, static_chain_incoming_rtx): Remove.
	* stmt.c (expand_nl_goto_receiver): Use targetm.calls.static_chain;
	only clobber registers.
	* targhooks.c (default_static_chain): New.
	(default_asm_trampoline_template, default_trampoline_init): New.
	(default_trampoline_adjust_address): New.
	* targhooks.h: Declare them.
	* varasm.c (assemble_trampoline_template): Use
	targetm.asm_out.trampoline_template.  Make the memory block const
	and set its size.

From-SVN: r151983
2009-09-22 08:11:37 -07:00
Richard Henderson 1d65f45cfa Squash commit of EH in gimple
From-SVN: r151696
2009-09-14 12:18:58 -07:00
Michael Matz 28ed065ef9 expr.h (emit_storent_insn, [...]): Declare.
* expr.h (emit_storent_insn, expand_expr_real_1,
	expand_expr_real_2): Declare.
	* expr.c (emit_storent_insn, expand_expr_real_1,
	expand_expr_real_2): Export.
	(store_expr): Setting and evaluating dont_return_target is
	useless.
	(expand_expr_real_1, <case GOTO_EXPR, RETURN_EXPR, SWITCH_EXPR,
	LABEL_EXPR and ASM_EXPR>): Move to gcc_unreachable.
	* except.c (expand_resx_expr): Rename to ...
	(expand_resx_stmt): ... this.  Rewrite to take gimple statement.
	* except.h (expand_resx_stmt): Declare.
	* stmt.c: Add include gimple.h
	(expand_asm_expr): Rename to ...
	(expand_asm_stmt): ... this. Rewrite to take gimple statement.
	(expand_case): Rewrite to take gimple statement.
	* tree.h (expand_asm_stmt): Declare.
	(expand_case): Change prototype.
	* Makefile.in (stmt.o): Depend on gimple.h.
	* builtins.c (expand_builtin_synchronize): Build gimple asm
	statement, not an ASM_EXPR.
	* cfgexpand.c (gimple_cond_pred_to_tree, set_expr_location_r,
	gimple_to_tree, release_stmt_tree): Remove.
	(expand_gimple_cond): Don't call gimple_cond_pred_to_tree or
	ggc_free, but hold comparison code and operands separately.
	Call jumpif_1 and jumpifnot_1 instead of jumpif and jumpifnot.
	(expand_call_stmt, expand_gimple_stmt_1,
	expand_gimple_stmt): New helpers.
	(expand_gimple_tailcall): Don't call gimple_to_tree, expand_expr_stmt,
	release_stmt_tree.  Call expand_gimple_stmt instead.
	(expand_gimple_basic_block): Ditto.

	* calls.c (emit_call_1): Don't look at EH regions here, make
	fntree parameter useless.
	(expand_call): New local rettype for TREE_TYPE(exp), use it
	throughout.  Remove local p, use addr instead.
	Don't look at EH regions here.

From-SVN: r151350
2009-09-02 21:13:34 +00:00
Paolo Bonzini 666e3cebe1 tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation for for_return == 2.
2009-08-12  Paolo Bonzini  <bonzini@gnu.org>

	* doc/tm.texi (TARGET_PROMOTE_FUNCTION_MODE): Add documentation
	for for_return == 2.
	* function.c (assign_parm_setup_reg): Use for_return == 2, improve
	comments.
	* calls.c (expand_call): Fix typo.
	* explow.c (promote_decl_mode): Use for_return == 2 for RESULT_DECL
	and PARM_DECL.
	* stmt.c (expand_value_return): Use promote_function_mode to copy out
	of pseudo.
	* targhooks.c (default_promote_function_mode): Handle for_return == 2.
	* config/cris/cris.c (cris_promote_function_mode): Likewise.
	* config/mmix/mmix.c (mmix_promote_function_mode): Likewise.
	* config/pa/pa.c (pa_promote_function_mode): Likewise.

From-SVN: r150700
2009-08-12 16:23:12 +00:00
Richard Earnshaw 390b17c28c Merge ARM/hard_vfp_branch to trunk
From-SVN: r150525
2009-08-06 14:27:45 +00:00
Paolo Bonzini cde0f3fd8a expr.c (store_constructor): Use promote_decl_mode.
2009-04-17  Paolo Bonzini  <bonzini@gnu.org>

	* expr.c (store_constructor): Use promote_decl_mode.  Remove
	now write-only variable unsignedp.
	(expand_expr_real_1): Use promote_decl_mode.
	* expr.h (promote_function_mode, promote_decl_mode): New.
	(promote_mode): Remove last argument.
	* function.c (assign_temp): Drop last argument of promote_mode.
	(assign_parm_find_data_types): Use promote_function_mode.
	(assign_parm_setup_reg): Likewise.
	(expand_function_end): Use promote_function_mode.
	* calls.c (initialize_argument_information): Use promote_function_mode.
	(precompute_arguments): Use promote_mode instead of checking if
	only PROMOTE_FUNCTION_MODE is defined.
	(expand_call): When making sibcall decisions, use promote_function_mode.
	Below, remove an if for targetm.calls.promote_function_return and
	and use promote_function_mode.
	(emit_library_call_value_1): Use promote_function_mode, fix bug
	where promote_mode was passed FOR_CALL == 0 for a return value in an
	assertion.
	* cfgexpand.c (expand_one_register_var): Use promote_decl_mode.
	* explow.c (promote_function_mode, promote_decl_mode): New.
	(promote_mode): Keep only the FOR_CALL == 0 case.
	* combine.c (setup_incoming_promotion): Remove test of
	promote_function_args.  Use promote_function_mode.
	* stmt.c (expand_value_return): Use promote_decl_mode.
	(expand_decl): Use promote_decl_mode.

	* expr.c (store_constructor): Use promote_decl_mode.  Remove
	now write-only variable unsignedp.
	(expand_expr_real_1): Use promote_decl_mode.
	* expr.h (promote_function_mode, promote_decl_mode): New.
	(promote_mode): Remove last argument.
	* function.c (assign_temp): Drop last argument of promote_mode.
	(assign_parm_find_data_types): Use promote_function_mode.
	(assign_parm_setup_reg): Likewise.
	(expand_function_end): Use promote_function_mode.
	* calls.c (initialize_argument_information): Use promote_function_mode.
	(precompute_arguments): Use promote_mode instead of checking if
	only PROMOTE_FUNCTION_MODE is defined.
	(expand_call): When making sibcall decisions, use promote_function_mode.
	Below, remove an if for targetm.calls.promote_function_return and
	and use promote_function_mode.
	(emit_library_call_value_1): Use promote_function_mode, fix bug
	where promote_mode was passed FOR_CALL == 0 for a return value in an
	assertion.
	* cfgexpand.c (expand_one_register_var): Use promote_decl_mode.
	* explow.c (promote_function_mode, promote_decl_mode): New.
	(promote_mode): Keep only the FOR_CALL == 0 case.
	* combine.c (setup_incoming_promotion): Remove test of
	promote_function_args.  Use promote_function_mode.
	* stmt.c (expand_value_return): Use promote_decl_mode.
	(expand_decl): Use promote_decl_mode.

	* explow.c (promote_function_mode): Just call the target hook.
	* targhooks.c (default_promote_function_mode,
	default_promote_function_mode_always_promote): New.
	* targhooks.h (default_promote_function_mode,
	default_promote_function_mode_always_promote): Declare.
	* target.h (promote_function_args, promote_function_return): Remove.
	(promote_function_mode): New.
	* target-def.h (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Remove.
	(TARGET_PROMOTE_FUNCTION_MODE): New.
	(TARGET_CALLS): Adjust.
	* system.h (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, PROMOTE_FUNCTION_MODE): Poison.

	* config/s390/s390.h (PROMOTE_FUNCTION_MODE): Move...
	* config/s390/s390.c (s390_promote_function_mode): ... here,
	with pointer handling.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.

	* config/sparc/sparc.h (PROMOTE_FUNCTION_MODE): Move...
	* config/sparc/sparc.c (sparc_promote_function_mode): ... here,
	with pointer handling.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.
	
	* config/sh/sh-protos.h (sh_promote_function_mode): New.
	* config/sh/sh.c (sh_promote_function_mode): New.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.

	* config/cris/cris.h (PROMOTE_FUNCTION_MODE): Move...
	* config/cris/cris.c (cris_promote_function_mode): ... here.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS): Remove.

	* config/mmix/mmix.h (PROMOTE_FUNCTION_MODE): Move...
	* config/mmix/mmix.c (mmix_promote_function_mode): ... here.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS): Remove.

	* config/arm/arm.h (PROMOTE_FUNCTION_MODE): Move...
	* config/arm/arm.c (arm_promote_function_mode): ... here, without complex
	type handling.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_ARGS, TARGET_PROMOTE_FUNCTION_RETURN): Remove.

	* config/pa/pa.c (pa_promote_function_mode): New.
	(TARGET_PROMOTE_FUNCTION_MODE): Define.
	(TARGET_PROMOTE_FUNCTION_RETURN): Remove.

	* config/alpha/alpha.c (TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Remove.
	(TARGET_PROMOTE_FUNCTION_MODE): Define equivalently.
	* config/xtensa/xtensa.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/picochip/picochip.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/mcore/mcore.c: Likewise.
	* config/score/score.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/ia64/ia64.c: Likewise (disabled though).

	* config/frv/frv.h: Remove pointless remark.

	* doc/tm.texi (PROMOTE_FUNCTION_MODE,
	TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN): Consolidate into...
	(TARGET_PROMOTE_FUNCTION_MODE): ... this.

From-SVN: r150336
2009-08-01 22:03:34 +00:00
Aldy Hernandez db3927fb49 re PR c/40435 (Revision 148442 caused many regressions on trunk)
2009-07-17  Aldy Hernandez  <aldyh@redhat.com>
	    Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR 40435 
	* tree-complex.c, tree-loop-distribution.c,
	tree.c, tree.h, builtins.c, fold-const.c, omp-low.c,
	cgraphunit.c, tree-ssa-ccp.c, tree-ssa-dom.c,
	gimple-low.c, expr.c, tree-ssa-ifcombine.c, c-decl.c,
	stor-layout.c, tree-if-conv.c, c-typeck.c,
	gimplify.c, calls.c, tree-sra.c, tree-mudflap.c,
	tree-ssa-copy.c, tree-ssa-forwprop.c, c-convert.c, c-omp.c,
	varasm.c, tree-inline.c, c-common.c,
	c-common.h, gimple.c, tree-switch-conversion.c, gimple.h,
	tree-cfg.c, c-parser.c, convert.c: Add location
	argument to fold_{unary,binary,ternary}, fold_build[123],
	build_call_expr, build_size_arg, build_fold_addr_expr,
	build_call_array, non_lvalue, size_diffop,
	fold_build1_initializer, fold_build2_initializer,
	fold_build3_initializer, fold_build_call_array,
	fold_build_call_array_initializer, fold_single_bit_test,
	omit_one_operand, omit_two_operands, invert_truthvalue,
	fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
	combine_comparisons, fold_builtin_*, fold_call_expr,
	build_range_check, maybe_fold_offset_to_address, round_up,
	round_down.
objc/
	* objc-act.c: Add location argument to all calls to
	build_fold_addr_expr.
testsuite/
	* gcc.dg/pr36902.c: Add column info.
	* g++.dg/gcov/gcov-2.C: Change count for definition.
cp/
	* typeck.c, init.c, class.c, method.c, rtti.c, except.c, error.c,
	tree.c, cp-gimplify.c, cxx-pretty-print.c, pt.c, semantics.c,
	call.c, cvt.c, mangle.c: Add location argument to
	fold_{unary,binary,ternary}, fold_build[123], build_call_expr,
	build_size_arg, build_fold_addr_expr, build_call_array,
	non_lvalue, size_diffop, fold_build1_initializer,
	fold_build2_initializer, fold_build3_initializer,
	fold_build_call_array, fold_build_call_array_initializer,
	fold_single_bit_test, omit_one_operand, omit_two_operands,
	invert_truthvalue, fold_truth_not_expr, build_fold_indirect_ref,
	fold_indirect_ref, combine_comparisons, fold_builtin_*,
	fold_call_expr, build_range_check, maybe_fold_offset_to_address,
	round_up, round_down.
fortran/
	* trans-expr.c, trans-array.c, trans-openmp.c, trans-stmt.c,
	trans.c, trans-io.c, trans-decl.c, trans-intrinsic.c: Add location
	argument to fold_{unary,binary,ternary}, fold_build[123],
	build_call_expr, build_size_arg, build_fold_addr_expr,
	build_call_array, non_lvalue, size_diffop,
	fold_build1_initializer, fold_build2_initializer,
	fold_build3_initializer, fold_build_call_array,
	fold_build_call_array_initializer, fold_single_bit_test,
	omit_one_operand, omit_two_operands, invert_truthvalue,
	fold_truth_not_expr, build_fold_indirect_ref, fold_indirect_ref,
	combine_comparisons, fold_builtin_*, fold_call_expr,
	build_range_check, maybe_fold_offset_to_address, round_up,
	round_down.

Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>

From-SVN: r149722
2009-07-16 22:29:52 +00:00
Shujing Zhao 481683e1d5 alias.c: Use REG_P...
2009-06-22  Shujing Zhao  <pearly.zhao@oracle.com>

	* alias.c: Use REG_P, MEM_P, CONST_INT_P, LABEL_P, CALL_P, NOTE_P and
	JUMP_TABLE_DATA_P predicates where applicable.
	* auto-inc-dec.c: Ditto.
	* builtins.c: Ditto.
	* caller-save.c: Ditto.
	* calls.c: Ditto.
	* cfgcleanup.c: Ditto.
	* cfglayout.c: Ditto.
	* cfgrtl.c: Ditto.
	* combine.c: Ditto.
	* combine-stack-adj.c: Ditto.
	* cse.c: Ditto.
	* cselib.c: Ditto.
	* dbxout.c: Ditto.
	* df-scan.c: Ditto.
	* dse.c: Ditto.
	* dwarf2asm.c: Ditto.
	* dwarf2out.c: Ditto.
	* emit-rtl.c: Ditto.
	* except.c: Ditto.
	* explow.c: Ditto.
	* expmed.c: Ditto.
	* expr.c: Ditto.
	* final.c: Ditto.
	* function.c: Ditto.
	* fwprop.c: Ditto.
	* gcse.c: Ditto.
	* genpreds.c: Ditto.
	* genrecog.c: Ditto.
	* ifcvt.c: Ditto.
	* ira-costs.c: Ditto.
	* ira-lives.c: Ditto.
	* jump.c: Ditto.
	* loop-iv.c: Ditto.
	* lower-subreg.c: Ditto.
	* modulo-sched.c: Ditto.
	* optabs.c: Ditto.
	* postreload.c: Ditto.
	* print-rtl.c: Ditto.
	* recog.c: Ditto.
	* reginfo.c: Ditto.
	* regmove.c: Ditto.
	* reload1.c: Ditto.
	* reload.c: Ditto.
	* reorg.c: Ditto.
	* rtlanal.c: Ditto.
	* rtl.c: Ditto.
	* sched-vis.c: Ditto.
	* sdbout.c: Ditto.
	* sel-sched-ir.c: Ditto.
	* simplify-rtx.c: Ditto.
	* targhooks.c: Ditto.
	* var-tracking.c: Ditto.
	* vmsdbgout.c: Ditto.

From-SVN: r148786
2009-06-22 10:29:13 +00:00
Maxim Kuvyrkov ee88d9aa55 Revert due to PR40320:
2009-06-01  Maxim Kuvyrkov  <maxim@codesourcery.com>
	* calls.c (emit_library_call_value_1): Don't force_operand for move
	and push insns.

From-SVN: r148046
2009-06-01 14:45:18 +00:00
Maxim Kuvyrkov 0980d7fe0b calls.c (emit_library_call_value_1): Don't force_operand for move and push insns.
* calls.c (emit_library_call_value_1): Don't force_operand for move
	and push insns.

From-SVN: r148039
2009-06-01 11:18:29 +00:00
Ian Lance Taylor 72b5577d91 builtins.c (validate_gimple_arglist): Don't use va_arg with enum type.
./:	* builtins.c (validate_gimple_arglist): Don't use va_arg with
	enum type.
	* calls.c (emit_library_call_value_1): Likewise.

	* c-typeck.c (c_build_va_arg): New function.
	* c-tree.h (c_build_va_arg): Declare.
	* c-parser.c (c_parser_postfix_expression): Call c_build_va_arg
	instead of build_va_arg.
cp/:
	* error.c (cp_printer): Don't use va_arg with enum type.
testsuite/:
	* gcc.dg/Wcxx-compat-11.c: New testcase.

From-SVN: r147989
2009-05-29 22:45:54 +00:00
Michael Matz 9c3d55b457 calls.c (initialize_argument_information): Handle SSA names like decls with a non MEM_P DECL_RTL.
* calls.c (initialize_argument_information): Handle SSA names
        like decls with a non MEM_P DECL_RTL.

From-SVN: r147044
2009-05-01 21:53:15 +00:00
Ian Lance Taylor bbbbb16a88 Fix enum conversions which are invalid in C++:
gcc/:
	Fix enum conversions which are invalid in C++:
	* auto-inc-dec.c (attempt_change): Change 0 to SET in function
	call.
	* calls.c (store_one_arg): Change 0 to EXPAND_NORMAL in function
	call.
	* cse.c (hash_rtx_cb): Change 0 to VOIDmode in function call.
	* dbgcnt.c (dbg_cnt_set_limit_by_name): Add cast to enum type.
	* dbxout.c (dbxout_symbol): Change 0 to VOIDmode in function
	call.
	(dbxout_parms): Likewise.
	* df-core.c (df_set_flags): Change changeable_flags parameter to
	int.
	(df_clear_flags): Likewise.
	* df-problems.c (df_rd_bb_local_compute_process_def): Change
	top_flag parameter to int.
	(df_chain_create_bb_process_use): Likewise.
	(df_chain_add_problem): Change chain_flags parameter to unsigned
	int.  Remove cast.
	* df-scan.c (df_ref_create): Change ref_flags parameter to int.
	(df_ref_create_structure, df_def_record_1): Likewise.
	(df_defs_record, df_uses_record, df_get_call_refs): Likewise.
	(df_notes_rescan): Change 0 to VOIDmode in function call.
	(df_get_call_refs, df_insn_refs_collect): Likewise.
	(df_bb_regs_collect): Likewise.
	(df_entry_block_defs_collect): Likewise.
	(df_exit_block_uses_collect): Likewise.
	* df.h: Update declarations.
	* double-int.c (double_int_divmod): Add cast to enum type.
	* dse.c (replace_inc_dec): Reverse parameters to gen_int_mode.
	* dwarf2out.c (new_reg_loc_descr): Add casts to enum type.
	(based_loc_descr): Likewise.
	(loc_descriptor_from_tree_1): Change first_op and second_op to
	enum dwarf_location_atom.  Add cast to enum type.
	* expmed.c (init_expmed): Change 0 to SET in function call.
	* expr.c (init_expr_target): Change 0 to VOIDmode in function
	call.
	(expand_expr_real_1): Change 0 to EXPAND_NORMAL in function call.
	(do_store_flag): Likewise.
	* fixed-value.h (struct fixed_value): Change mode to enum
	machine_mode.
	* function.c (assign_parms): Change 0 to VOIDmode in function
	call.
	* genautomata.c (insert_automaton_decl): Change 1 to INSERT in
	function call.
	(insert_insn_decl, insert_decl, insert_state): Likewise.
	(automata_list_finish): Likewise.
	* genrecog.c (process_define_predicate): Add cast to enum type.
	* gensupport.c (init_predicate_table): Add cast to enum type.
	* gimple.c (gimple_build_return): Change 0 to ERROR_MARK in
	function call.
	(gimple_build_call_1, gimple_build_label): Likewise.
	(gimple_build_goto, gimple_build_asm_1): Likewise.
	(gimple_build_switch_1, gimple_build_cdt): Likewise.
	* gimple.h (GIMPLE_CHECK): Change 0 to ERROR_MARK in function
	call.
	(enum fallback): Rename from enum fallback_t.
	(fallback_t): Typedef as int.
	* gimple-low.c (lower_builtin_setjmp): Change TSI_SAME_STMT to
	GSI_SAME_STMT in function call.
	* ira.c (setup_class_subset_and_memory_move_costs): Add casts to
	enum type.
	(setup_reg_class_relations): Likewise.
	(setup_reg_class_nregs): Change cl to int.  Add casts to enum
	type.
	(setup_prohibited_class_mode_regs): Add cast to enum type.
	(setup_prohibited_mode_move_regs): Likewise.
	* ira-costs.c (record_reg_classes): Change rclass to enum
	reg_class.
	(record_address_regs): Change i to enum reg_class.
	* lists.c (alloc_EXPR_LIST): Add cast to enum type.
	* machmode.h (GET_MODE_CLASS): Cast value to enum mode_class.
	(GET_MODE_WIDER_MODE): Cast value to enum machine_mode.
	(GET_MODE_2XWIDER_MODE): Likewise.
	(GET_CLASS_NARROWEST_MODE): Likewise.
	* omp-low.c (expand_omp_for): Add cast to enum type.
	* optabs.c (debug_optab_libfuncs): Add casts to enum type.
	* opts.c (enable_warning_as_error): Change kind to diagostic_t.
	* postreload.c (reload_cse_simplify_operands): Change rclass local
	to enum reg_class.
	* predict.c (combine_predictions_for_insn): Change best_predictor
	and predictor to enum br_predictor.
	(combine_predictions_for_bb): Likewise.
	(build_predict_expr): Change assignment to PREDICT_EXPR_OUTCOME to
	use SET_PREDICT_EXPR_OUTCOME.
	* real.c (real_arithmetic): Change icode to code in function
	call.
	* reginfo.c (init_move_cost): Add casts to enum type.
	(init_reg_sets_1, init_fake_stack_mems): Likewise.
	* regmove.c (regclass_compatible_p): Change class0 and class1 to
	enum reg_class.
	* reload.c (find_valid_class): Add casts to enum type.
	(push_reload): Change 0 to NO_REGS in function call.
	(find_reloads): Change this_alternative to array of enum
	reg_class.  Remove some now-unnecessary casts.
	(make_memloc): Change 0 to VOIDmode in function call.
	* reload1.c (reload): Change 0 to VOIDmode in function call.
	(eliminate_regs_1, elimination_effects): Likewise.
	(eliminate_regs_in_insn): Likewise.
	(emit_input_reload_insns): Add cast to enum type.
	(delete_output_reload): Change 0 to VOIDmode in function call.
	* reorg.c (insn_sets_resource_p): Convert include_delayed_effects
	to enum type in function call.
	* tree.h (PREDICT_EXPR_OUTCOME): Add cast to enum type.
	(SET_PREDICT_EXPR_OUTCOME): Define.
	* tree-dump.c (get_dump_file_info): Change phase parameter to
	int.
	(get_dump_file_name, dump_begin, dump_enabled_p): Likewise.
	(dump_initialized_p, dump_flag_name, dump_end): Likewise.
	(dump_function): Likewise.
	* tree-dump.h: Update declarations.
	* tree-pass.h: Update declarations.
	* varasm.c (assemble_integer): Change mclass to enum mode_class.
	* config/arm/arm.c (thumb_legitimize_reload_address): Add cast to
	enum type.
	(arm_rtx_costs_1): Correct parenthesization.
	(arm_rtx_costs): Add casts to enum type.
	(adjacent_mem_locations): Reverse arguments to const_ok_for_op.
	(vfp_emit_fstmd): Use add_rg_note.
	(emit_multi_reg_push, emit_sfm): Likewise.
	(thumb_set_frame_pointer): Likewise.
	(arm_expand_prologue): Likewise.
	(arm_regno_class): Change return type to enum reg_class.
	(thumb1_expand_prologue): Use add_reg_note.
	* config/arm/arm-protos.h (arm_regno_class): Update declaration.
	* config/arm/arm.h (INITIALIZE_TRAMPOLINE): Change 0 to LCT_NORMAL
	in function call.
	* config/arm/gentune.sh: Add cast to enum type.
	* config/arm/arm-tune.md: Rebuild.
	* config/i386/i386.c (ix86_expand_prologue): Use add_reg_note.
	(ix86_split_fp_branch, predict_jump): Likewise.
	(ix86_expand_multi_arg_builtin): Change sub_code from enum
	insn_code to enum rtx_code.
	(ix86_builtin_vectorized_function): Add cast to enum type.
	* config/i386/i386.md (truncdfsf2): Change slot to enum
	ix86_stack_slot.
	(truncxf<mode>2, isinf<mode>2): Likewise.
	* config/i386/i386-c.c (ix86_pragma_target_parse): Add cast to
	enum type.
	* config/ia64/ia64.c (ia64_split_tmode_move): Use add_reg_note.
	(spill_restore_mem, do_spill, ia64_expand_prologue): Likewise.
	(insert_bundle_state): Change 1 to INSERT in function call.
	(ia64_add_bundle_selector_before): Likewise.
	* config/ia64/ia64.md (cpu attr): Add cast to enum type.
	(save_stack_nonlocal): Change 0 to LCT_NORMAL in function call.
	(restore_stack_nonlocal): Likewise.
	* config/mips/mips.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL in
	function call.
	* config/mips/mips.c (mips_binary_cost): Change 0 to SET in
	function call.
	(mips_rtx_costs): Likewise.
	(mips_override_options): Add casts to enum type.
	* config/mips/sdemtk.h (MIPS_ICACHE_SYNC): Change 0 to LCT_NORMAL
	in function call.
	* config/pa/pa.c (legitimize_pic_address): Use add_reg_note.
	(store_reg, set_reg_plus_d): Likewise.
	(hppa_expand_prologue, hppa_profile_hook): Likewise.
	* config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Add
	cast to enum type.
	(altivec_expand_vec_set_builtin): Change 0 to EXPAND_NORMAL in
	function call.
	(emit_unlikely_jump): Use add_reg_note.
	(rs6000_emit_allocate_stack): Likewise.
	(rs6000_frame_related, rs6000_emit_prologue): Likewise.
	(output_toc): Change 1 to INSERT in function call.
	(output_profile_hook): Change 0 to LCT_NORMAL in function call.
	(rs6000_initialize_trampoline): Likewise.
	(rs6000_init_dwarf_reg_sizes_extra): Change 0 to EXPAND_NORMAL in
	function call.
	* config/s390/s390.c (s390_rtx_costs): Add cast to enum type.
	(s390_expand_movmem): Change 0 to OPTAB_DIRECT in function call.
	(s390_expand_setmem, s390_expand_cmpmem): Likewise.
	(save_gprs): Use add_reg_note.
	(s390_emit_prologue): Likewise.
	(s390_expand_builtin): Change 0 to EXPAND_NORMAL in function
	call.
	* config/sparc/sparc.c (sparc_expand_prologue): Use add_reg_note.
	(sparc_fold_builtin): Add cast to enum type.
	* config/spu/spu.c (spu_emit_branch_or_set): Change ior_code to
	enum insn_code.
	(spu_expand_prologue): Use add_reg_note.
	(expand_builtin_args): Change 0 to EXPAND_NORMAL in function
	call.

	* c-parser.c (c_parser_attributes): Change VEC back to tree list.
	(c_parser_postfix_expression_after_primary): Get VEC for list of
	arguments.  Get original types of arguments.  Call
	build_function_call_vec.
	(cached_expr_list_1, cached_expr_list_2): New static variables.
	(c_parser_expr_list): Change return type to VEC *.  Add
	p_orig_types parameter.  Change all callers.
	(c_parser_release_expr): New static function.
	(c_parser_vec_to_tree_list): New static function.
	* c-typeck.c (build_function_call): Rewrite to build a VEC and
	call build_function_call_vec.
	(build_function_call_vec): New function, based on old
	build_function_call.
	(convert_arguments): Remove nargs and argarray parameters.  Change
	values to a VEC.  Add origtypes parameter.
	(build_modify_expr): Add rhs_origtype parameter.  Change all
	callers.
	(convert_for_assignment): Add origtype parameter.  Change all
	callers.  If warn_cxx_compat, check for conversion to an enum
	type when calling a function.
	(store_init_value): Add origtype parameter.  Change all callers.
	(digest_init): Likewise.
	(struct init_node): Add origtype field.
	(add_pending_init): Add origtype parameter.  Change all callers.
	(output_init_element): Likewise.
	(output_pending_init_elements): Pass origtype from init_node to
	output_init_element.
	(process_init_elemnt): Pass origtype from c_expr to
	output_init_element.
	(c_finish_return): Add origtype parameter.  Change all callers.
	* c-common.c (sync_resolve_size): Change params to VEC *.  Change
	caller.
	(sync_resolve_params): Likewise.
	(sync_resolve_return): Change params to first_param.  Change
	caller.
	(resolve_overloaded_builtins): Change params to VEC *.  Change
	callers.   Save first parameter around call to
	build_function_call_vec.
	* c-decl.c (finish_decl): Add origtype parameter.  Change all
	callers.  Call build_function_call_vec rather than
	build_function_call for cleanup.
	* c-tree.h: Update declarations.
	* c-common.h: Update declarations.
	* stub-objc.c (objc_rewrite_function_call): Change parameter from
	params to first_param.
	* target.h (struct gcc_target): Change resolve_overloaded_builtin
	params parameter from tree to void *.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
	Change arglist parameter to have type void *, and to be a pointer
	to a VEC.
	* config/rs6000/rs6000-protos.h
	(altivec_resolve_overloaded_builtin): Update declaration.
	* config/spu/spu-c.c (spu_resolved_overloaded_builtin): Change
	fnargs parameter to have type void *, and to be a pointer to a
	VEC.  Call build_function_call_vec instead of
	build_function_call.
	* config/spu/spu-protos.h (spu_expand_builtin): Update
	declaration.

gcc/cp/:
	* typeck.c (build_function_call_vec): New function.
	(cp_build_function_call): Only pass first parameter to
	objc_rewrite_function_call.
	(build_modify_expr): Add rhs_origtype parameter.  Change all
	callers.
	* decl.c (finish_decl): Add origtype parameter.  Change all
	callers.
	* semantics.c (finish_call_expr): Pass VEC to
	resolve_overloaded_builtin.

gcc/objc:
	* objc-act.c (objc_rewrite_function_call): Change parameter from
	params to first_param.  Change all callers.

gcc/testsuite:
	* gcc.dg/Wcxx-compat-3.c: New testcase.

From-SVN: r146451
2009-04-20 19:35:00 +00:00
Hariharan Sandanagobalane 6bdf8c2e53 calls.c (emit_library_call_value_1): Fix a problem with parameter alignment for library calls.
* calls.c (emit_library_call_value_1): Fix a problem with parameter
alignment for library calls.

From-SVN: r145586
2009-04-06 10:54:42 +00:00
Jaka Mocnik 5bc0807c06 calls.c (emit_library_call_value_1): Use slot_offset instead of offset when calculating bounds for indexing...
* calls.c (emit_library_call_value_1): Use slot_offset instead of
	offset when calculating bounds for indexing stack_usage_map.  Fixes
	a buffer overflow with certain target setups.

From-SVN: r144317
2009-02-20 12:19:34 +01:00
Jakub Jelinek c69cd1f5cd re PR target/39240 (Invalid sibcall optimization with promoted return types and differing signedness)
PR target/39240
	* calls.c (expand_call): Clear try_tail_call if caller and callee
	disagree in promotion of function return value.

	* gcc.c-torture/execute/pr39240.c: New test.

From-SVN: r144316
2009-02-20 11:13:17 +01:00
Jakub Jelinek b545e4117b re PR tree-optimization/38977 (bash no longer builds with profile-feedback)
PR tree-optimization/38977
	PR gcov-profile/38292
	* calls.c (special_function_p): Disregard __builtin_
	prefix.

From-SVN: r143937
2009-02-04 20:50:58 +01:00
Uros Bizjak 576de5cb6e re PR middle-end/38969 (-foptimize-sibling-calls generates wrong code on alpha)
PR middle-end/38969
	* calls.c (initialize_argument_information): Do not wrap complex
	arguments in SAVE_EXPR.

testsuite/ChangeLog:

	PR middle-end/38969
	* gcc.c-torture/execute/pr38969.c: New test.

From-SVN: r143699
2009-01-27 11:18:54 +01:00
Jakub Jelinek 0196c95ed4 re PR rtl-optimization/38245 (stack corruption when a call is removed but not the outgoing argument pushes)
PR rtl-optimization/38245
	* calls.c (expand_call): Add stack arguments to
	CALL_INSN_FUNCTION_USAGE even for pure calls (when
	ACCUMULATE_OUTGOING_ARGS) and even for args partially passed
	in regs and partially in memory or BLKmode arguments.
	(emit_library_call_value_1): Add stack arguments to
	CALL_INSN_FUNCTION_USAGE even for pure calls (when
	ACCUMULATE_OUTGOING_ARGS).
	* dce.c: Include tm_p.h.
	(find_call_stack_args): New function.
	(deletable_insn_p): Call it for CALL_P insns.  Add ARG_STORES
	argument.
	(mark_insn): Call find_call_stack_args for CALL_Ps.
	(prescan_insns_for_dce): Walk insns backwards in bb rather than
	forwards.  Allocate and free arg_stores bitmap if needed, pass it
	down to deletable_insn_p, don't mark stores set in arg_stores
	bitmap, clear the bitmap at the beginning of each bb.
	* Makefile.in (dce.o): Depend on $(TM_P_H).

	* gcc.dg/pr38245-3.c: New test.
	* gcc.dg/pr38245-3.h: New file.
	* gcc.dg/pr38245-4.c: New file.
	* gcc.dg/pr38364.c: New test.

From-SVN: r143387
2009-01-15 09:07:38 +01:00
H.J. Lu 130423d789 re PR middle-end/38556 (Revision 142792 breaks bootstrap)
2008-12-17  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/38556
	* calls.c (expand_call): Check outgoing_reg_parm_stack_space
	only if REG_PARM_STACK_SPACE is defined.

From-SVN: r142794
2008-12-17 09:05:05 -08:00
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