Commit Graph

262 Commits

Author SHA1 Message Date
Jan Hubicka 8c99651385 expr.c (emit_block_move_via_libcall): Export.
* expr.c (emit_block_move_via_libcall): Export.
	(clear_storage_via_libcall): Rename to ...
	(set_storage_via_libcall): ... this one; handle arbitrary value to set.
	(clear_storage): Update to set_storage_via_libcall.
	* expr.h (emit_block_move_via_libcall): Declare
	* config/i386/i386.h (stringop_alg): New enum.
	(MAX_STRINGOP_ALGS): New constant.
	(stringop_algs): New struct.
	(processor_costs): Add memcpy/memset descriptors.
	(TARGET_REP_MOVEL_OPTIMAL): Remove.
	* config/i386/i386.md (movsi_insv_1_rex64): New pattern.
	(strmovsi, strmovdi, strsetsi, strsetdi): Update; accept all operands
	for memset.
	* config/i386/i386.opt (minline-stringops-dynamically,
	mstringop-strategy): New
	parameters.
	* config/i386/i386-prostos.h (ix86_expand_movmem): Update prototype.
	(ix86_expand-clrmem): Rename to ...
	(ix86_expand_setmem): ... this one; update prototype.
	* config/i386/i386.c (DUMMY_STRINGOP_ALGS): New constant.
	(size_cost, i386_cost, i486_cost, pentium_cost, pentiumpro_cost,
	geode_cost, k6_cost, athlon_cost, k8_cost, pentium4_cost,
	nocona_cost, core2_cost, generic_cost, generic64_cost,
	generic32_cost): Add memcpy/memset descriptors.
	(x86_rep_movl_optimal): Remove.
	(stringop_alg): New static variable.
	(ix86_expand_aligntest): Handle predictions.
	(override_options): Add strgop_alg handling.
	(predict_jump): New function.
	(scale_counter): New function.
	(expand_set_or_movmem_via_loop): New function.
	(expand_movmem_via_rep_mov): New function.
	(expand_setmem_via_rep_stots): New function.
	(emit_strmov): New function.
	(expand_movmem_epilogue): New function.
	(expand_setmem_epilogue_via_loop): New function.
	(expand_setmem_epilogue): New function.
	(expand_movmem_prologue): New function.
	(expand_setmem_prologue): New function.
	(decide_alg): New function.
	(decide_alignment): New function.
	(ix86_exand_movmem): Rewrite.
	(promote_duplicated_reg): New function.
	(ix86_expand_clrmem): Rename to ...
	(ix86_expand_setmem): ... this one. Rewrite.

	* invoke.texi (minline-stringops-dynamically): New command line option.
	(mstringop-strategy): Likewise.

From-SVN: r119252
2006-11-27 16:00:26 +00:00
Richard Guenther 9714c91192 revert: invoke.texi (-msselibm): Document.
2006-05-22  Richard Guenther  <rguenther@suse.de>
 
 	Revert
 	2006-01-31  Richard Guenther  <rguenther@suse.de>
 
 	* doc/invoke.texi (-msselibm): Document.
 	* target.h (expand_library_builtin): New target hook.
 	* builtins.c (expand_builtin): Use expand_library_builtin.
 	(default_expand_library_builtin): New function.
 	* gcc.c (LINK_GCC_MATH_SPEC): Define.
 	(LINK_COMMAND_SPEC): Handle %(link_gcc_math).
 	(link_gcc_math_spec): Declare.
 	(static_specs): Add link_gcc_math_spec.
 	* expr.h (default_expand_library_builtin): Declare.
 	* target-def.h (TARGET_EXPAND_LIBRARY_BUILTIN): Define.
 	(TARGET_INITIALIZER): Add TARGET_EXPAND_LIBRARY_BUILTIN.
 	* config/i386/i386.h: Provide LINK_GCC_MATH_SPEC.
 	* config/i386/i386.opt (msselibm): New target option.
 	* config/i386/i386.c (ix86_builtin_function_variants): New array.
 	(ix86_init_sse_abi_builtins): New function.
 	(ix86_expand_library_builtin): Likewise.
 	(TARGET_EXPAND_LIBRARY_BUILTIN): Define.
 	(override_options): Handle error conditions wrt -msselibm.
 	(ix86_builtins): Add function codes for SSE2 ABI builtins.
 	(ix86_init_builtins): Call ix86_init_sse_abi_builtins.
 	* doc/extend.texi (__builtin_sse2_*): Document new target specific
 	builtins.
 
 	* gcc.target/i386/sselibm-1.c: New testcase.
 	* gcc.target/i386/sselibm-2.c: Likewise.
 	* gcc.target/i386/sselibm-3.c: Likewise.
 	* gcc.target/i386/sselibm-4.c: Likewise.
 	* gcc.target/i386/sselibm-5.c: Likewise.

From-SVN: r113977
2006-05-22 13:18:15 +00:00
Roger Sayle b6f65e3c5d builtins.c (dummy_object): Use build_int_cst instead of convert.
* builtins.c (dummy_object): Use build_int_cst instead of convert.
	* tree-ssa-ccp.c (maybe_fold_stmt_addition): Use fold_convert
	instead of convert.
	* dojump.c (do_jump): Likewise.
	* expr.h (ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE): Likewise.
	* gimplify.c (gimple_boolify, gimplify_init_constructor,
	gimplify_boolean_expr): Likewise.
	* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
	* varasm.c (array_size_for_constructor): Likewise.
	* tree-object-size.c (compute_object_offset): Likewise.

From-SVN: r112633
2006-04-03 03:07:40 +00:00
Kazu Hirata 2f8dc5bb4c expmed.c (expand_mult_add): Remove.
* expmed.c (expand_mult_add): Remove.
	* expr.h: Remove the prototype for expand_mult_add.

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

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

From-SVN: r111254
2006-02-18 22:06:53 +00:00
Roger Sayle 3bf78d3be2 optabs.c (expand_abs): Don't call do_jump_by_parts_greater_rtx directly...
* optabs.c (expand_abs): Don't call do_jump_by_parts_greater_rtx
	directly, instead let do_compare_rtx_and_jump handle this for us.
	* expr.c (expand_expr_real_1): Likewise.
	* dojump.c (do_jump_by_parts_greater_rtx): Make static.  Move
	before do_jump_by_parts_greater.
	(do_jump_by_parts_greater): Move after do_jump_by_parts_greater_rtx.
	* expr.h (do_jump_by_parts_greater_rtx): Delete prototype.

From-SVN: r110954
2006-02-14 02:59:42 +00:00
Roger Sayle feb0478035 re PR middle-end/25724 (Emits call to __cmpdi2 for long long comparison in switches)
PR middle-end/25724
	* dojump.c (do_jump): Call do_compare_rtx_and_jump.
	(do_jump_parts_zero_rtx): New function renamed from
	do_jump_parts_equality_rtx.  Made static.  Add a mode argument.
	(do_jump_parts_equality_rtx): New function split out from
	do_jump_parts_equality.  Old implementation renamed as above.
	Call do_jump_parts_zero_rtx if either operand is zero.
	(do_jump_parts_equality): Call do_jump_parts_equality_rtx to
	do all of the heavy lifting.
	(do_compare_rtx_and_jump): Handle multi-word comparisons by
	calling either do_jump_by_parts_greater_rtx or
	do_jump_by_parts_equality_rtx.
	* expr.h (do_jump_by_parts_equality_rtx): Remove prototype.
	* expmed.c (do_cmp_and_jump): Now multi-word optimization has
	moved to do_compare_rtx_and_jump, call it directly.
	* stmt.c (do_jump_if_equal): Remove static prototype.  Add a
	mode argument.  Call do_compare_rtx_and_jump.
	(emit_case_nodes): Update calls to do_jump_if_equal.

From-SVN: r110906
2006-02-13 01:55:37 +00:00
Richard Guenther ee96318165 invoke.texi (-msselibm): Document.
2006-01-31  Richard Guenther  <rguenther@suse.de>

	* doc/invoke.texi (-msselibm): Document.
	* target.h (expand_library_builtin): New target hook.
	* builtins.c (expand_builtin): Use expand_library_builtin.
	(default_expand_library_builtin): New function.
	* gcc.c (LINK_GCC_MATH_SPEC): Define.
	(LINK_COMMAND_SPEC): Handle %(link_gcc_math).
	(link_gcc_math_spec): Declare.
	(static_specs): Add link_gcc_math_spec.
	* expr.h (default_expand_library_builtin): Declare.
	* target-def.h (TARGET_EXPAND_LIBRARY_BUILTIN): Define.
	(TARGET_INITIALIZER): Add TARGET_EXPAND_LIBRARY_BUILTIN.
	* config/i386/i386.h: Provide LINK_GCC_MATH_SPEC.
	* config/i386/i386.opt (msselibm): New target option.
	* config/i386/i386.c (ix86_builtin_function_variants): New array.
	(ix86_init_sse_abi_builtins): New function.
	(ix86_expand_library_builtin): Likewise.
	(TARGET_EXPAND_LIBRARY_BUILTIN): Define.
	(override_options): Handle error conditions wrt -msselibm.
	(ix86_builtins): Add function codes for SSE2 ABI builtins.
	(ix86_init_builtins): Call ix86_init_sse_abi_builtins.
	* doc/extend.texi (__builtin_sse2_*): Document new target specific
	builtins.

	* gcc.target/i386/sselibm-1.c: New testcase.
	* gcc.target/i386/sselibm-2.c: Likewise.
	* gcc.target/i386/sselibm-3.c: Likewise.
	* gcc.target/i386/sselibm-4.c: Likewise.
	* gcc.target/i386/sselibm-5.c: Likewise.

From-SVN: r110439
2006-01-31 15:34:52 +00: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
Kazu Hirata b79de014cc expmed.c (const_mult_add_overflow_p): Remove.
* expmed.c (const_mult_add_overflow_p): Remove.
	* expr.h: Remove the prototype for const_mult_add_overflow_p.

From-SVN: r110334
2006-01-28 22:01:54 +00:00
Richard Henderson 1e188d1e13 re PR middle-end/23714 (ICE in expand_assignment)
PR 23714
        * builtins.c (expand_builtin_trap): Export.
        * expr.h (expand_builtin_trap): Declare.
        * expr.c (expand_assignment): Emit a trap for integral offsets
        from registers that weren't reduced to bitpos.

        * tree-cfg.c (mark_array_ref_addressable_1): Remove.
        (mark_array_ref_addressable): Remove.
        * tree-flow.h (mark_array_ref_addressable): Remove.
        * tree-optimize.c (execute_cleanup_cfg_post_optimizing): Don't call it.

From-SVN: r105449
2005-10-15 17:07:17 -07: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
Adrian Straetling 57e84f1840 builtins.c: (expand_builtin_memset): Rewrite to support 'set_storage_via_setmem'.
2006-06-28  Adrian Straetling  <straetling@de.ibm.com>

	* builtins.c: (expand_builtin_memset): Rewrite to support
	'set_storage_via_setmem'.
	* expr.c: (enum insn_code setmem_optab): Define.
	(enum insn_code clrmem_optab): Remove.
	(set_storage_via_setmem): New function.
	(clear_storage_via_setmem): Remove.
	(clear_storage): Replace call to "clear_storage_via_clrmem" with
	"set_storage_via_setmem".
	* expr.h: (set_storage_via_setmem): Declare.
	(CLEAR_RATIO): Redefine using HAVE_setmemM.
	* optabs.h: (enum insn_code setmem_optab): Declare.
	(enum insn_code clrmem_optab): Remove.
	* optabs.c: (init_optabs): Initialize setmem_optab.
	(enum insn_code clrmem_optab): Remove.
	* genopinit.c: (otabs): Likewise.
	* doc/md.texi: Document new standard pattern 'setmem'. Remove
	  'clrmem'.
	* config/alpha/alpha.c: (alpha_expand_block_clear): Adjust
	'operands' ordering.
	* config/frv/frv.c: (frv_expand_block_clear): Likewise.
	* config/rs6000/rs6000.c: (expand_block_clear): Likewise.
	* config/alpha/alpha.md: ("clrmemqi", "clrmemdi"): Rename to "setmemM".
	FAIL on operands[2]!=const0_rtx. Adjust 'operands' ordering.
	* config/avr/avr.md: ("clrmemhi"): Likewise.
	* config/frv/frv.md: ("clrmemsi"): Likewise.
	* config/i386/i386.md: ("clrmemsi", "clrmemdi"): Likewise.
	* config/pa/pa.md: ("clrmemsi", "clrmemdi"): Likewise.
	* config/rs6000/rs6000.md: ("clrmemsi"): Likewise.
	* config/s390/s390.md: ("clrmem<mode>"): Likewise.

From-SVN: r101386
2005-06-28 19:56:23 +00:00
Kelley Cook 366ccddb2b Update FSF address.
From-SVN: r101317
2005-06-25 02:02:01 +00:00
Kazu Hirata 0fa2e4df47 c-common.c, [...]: Fix comment typos.
* c-common.c, c-parser.c, cfgbuild.c, cfghooks.c, cfghooks.h,
	cfgrtl.c, cgraphunit.c, ddg.c, expr.h, gcse.c, ggc-page.c,
	ggc-zone.c, gimplify.c, ipa-inline.c, longlong.h, targhooks.c,
	tree-flow-inline.h, tree-pass.h, tree-ssa-dse.c,
	tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c,
	tree-ssa-operands.c, tree-vect-analyze.c,
	tree-vect-transform.c, tree-vectorizer.c, tree.c,
	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
	config/frv/frv.md, config/i386/i386.c, config/i386/sse.md,
	config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
	config/mcore/mcore.c, config/mips/mips.c, config/mips/mips.md,
	config/rs6000/darwin-ldouble.c, config/rs6000/rs6000.c,
	config/rs6000/rs6000.h, config/sh/sh.c, config/sh/sh.md,
	config/sh/ushmedia.h, config/sparc/sparc.c,
	config/sparc/sparc.md, config/stormy16/stormy-abi: Fix comment
	typos.  Follow spelling conventions.
	* doc/invoke.texi, doc/tm.texi, doc/tree-ssa.texi: Fix typos.
	Follow spelling conventions.

From-SVN: r100218
2005-05-26 18:15:27 +00:00
Jakub Jelinek 8148fe656d re PR middle-end/21265 (GCC fails to optimize tail call to memset)
PR middle-end/21265
	* expr.h (enum block_op_methods): Add BLOCK_OP_TAILCALL.
	(clear_storage): Add argument.
	* expr.c (emit_block_move_via_libcall, clear_storage_via_libcall):
	Add tailcall argument, set CALL_EXPR_TAILCALL of the CALL_EXPR to
	tailcall.
	(emit_block_move): Handle BLOCK_OP_TAILCALL method.
	(clear_storage): Add method argument, handle BLOCK_OP_TAILCALL.
	(store_expr, store_constructor): Adjust callers.
	* builtins.c (expand_builtin_memcpy): Pass BLOCK_OP_TAILCALL
	to emit_block_move if CALL_EXPR_TAILCALL (exp).
	(expand_builtin_memmove): Add ORIG_EXP argument, copy
	CALL_EXPR_TAILCALL from ORIG_EXP to the new CALL_EXPR.
	(expand_builtin_bcopy): Replace ARGLIST and TYPE arguments
	with EXP.  Pass EXP to expand_builtin_memmove.
	(expand_builtin_memset): Add ORIG_EXP argument, pass
	BLOCK_OP_TAILCALL to clear_storage if CALL_EXPR_TAILCALL (orig_exp).
	(expand_builtin_bzero): Replace ARGLIST argument with EXP.
	Pass EXP to expand_builtin_memset.
	(expand_builtin_strcmp): Copy CALL_EXPR_TAILCALL from EXP to
	the new CALL_EXPR.
	(expand_builtin_strncmp): Likewise.
	(expand_builtin_printf): Replace ARGLIST argument with EXP.
	Copy CALL_EXPR_TAILCALL from EXP to the new CALL_EXPR.
	(expand_builtin_fprintf): Likewise.
	(expand_builtin): Adjust calls to
	expand_builtin_{memmove,bcopy,memset,bzero,{,f}printf}.

	* gcc.dg/20050503-1.c: New test.

From-SVN: r99187
2005-05-04 00:22:02 +02:00
Richard Henderson 48ae6c138c re PR middle-end/14311 (builtins for atomic operations needed)
PR middle-end/14311
	* builtin-types.def (BT_BOOL, BT_VOLATILE_PTR, BT_I1, BT_I2,
	BT_I4, BT_I8, BT_FN_VOID_VPTR, BT_FN_I1_VPTR_I1, BT_FN_I2_VPTR_I2,
	BT_FN_I4_VPTR_I4, BT_FN_I8_VPTR_I8, BT_FN_BOOL_VPTR_I1_I1,
	BT_FN_BOOL_VPTR_I2_I2, BT_FN_BOOL_VPTR_I4_I4, BT_FN_BOOL_VPTR_I8_I8,
	BT_FN_I1_VPTR_I1_I1, BT_FN_I2_VPTR_I2_I2, BT_FN_I4_VPTR_I4_I4,
	BT_FN_I8_VPTR_I8_I8): New.
	* builtins.def (DEF_SYNC_BUILTIN): New.
	(BUILT_IN_FETCH_AND_ADD_N, BUILT_IN_FETCH_AND_ADD_1,
	BUILT_IN_FETCH_AND_ADD_2, BUILT_IN_FETCH_AND_ADD_4,
	BUILT_IN_FETCH_AND_ADD_8, BUILT_IN_FETCH_AND_SUB_N,
	BUILT_IN_FETCH_AND_SUB_1, BUILT_IN_FETCH_AND_SUB_2,
	BUILT_IN_FETCH_AND_SUB_4, BUILT_IN_FETCH_AND_SUB_8,
	BUILT_IN_FETCH_AND_OR_N, BUILT_IN_FETCH_AND_OR_1,
	BUILT_IN_FETCH_AND_OR_2, BUILT_IN_FETCH_AND_OR_4,
	BUILT_IN_FETCH_AND_OR_8, BUILT_IN_FETCH_AND_AND_N,
	BUILT_IN_FETCH_AND_AND_1, BUILT_IN_FETCH_AND_AND_2,
	BUILT_IN_FETCH_AND_AND_4, BUILT_IN_FETCH_AND_AND_8,
	BUILT_IN_FETCH_AND_XOR_N, BUILT_IN_FETCH_AND_XOR_1,
	BUILT_IN_FETCH_AND_XOR_2, BUILT_IN_FETCH_AND_XOR_4,
	BUILT_IN_FETCH_AND_XOR_8, BUILT_IN_FETCH_AND_NAND_N,
	BUILT_IN_FETCH_AND_NAND_1, BUILT_IN_FETCH_AND_NAND_2,
	BUILT_IN_FETCH_AND_NAND_4, BUILT_IN_FETCH_AND_NAND_8,
	BUILT_IN_ADD_AND_FETCH_N, BUILT_IN_ADD_AND_FETCH_1,
	BUILT_IN_ADD_AND_FETCH_2, BUILT_IN_ADD_AND_FETCH_4,
	BUILT_IN_ADD_AND_FETCH_8, BUILT_IN_SUB_AND_FETCH_N,
	BUILT_IN_SUB_AND_FETCH_1, BUILT_IN_SUB_AND_FETCH_2,
	BUILT_IN_SUB_AND_FETCH_4, BUILT_IN_SUB_AND_FETCH_8,
	BUILT_IN_OR_AND_FETCH_N, BUILT_IN_OR_AND_FETCH_1,
	BUILT_IN_OR_AND_FETCH_2, BUILT_IN_OR_AND_FETCH_4,
	BUILT_IN_OR_AND_FETCH_8, BUILT_IN_AND_AND_FETCH_N,
	BUILT_IN_AND_AND_FETCH_1, BUILT_IN_AND_AND_FETCH_2,
	BUILT_IN_AND_AND_FETCH_4, BUILT_IN_AND_AND_FETCH_8,
	BUILT_IN_XOR_AND_FETCH_N, BUILT_IN_XOR_AND_FETCH_1,
	BUILT_IN_XOR_AND_FETCH_2, BUILT_IN_XOR_AND_FETCH_4,
	BUILT_IN_XOR_AND_FETCH_8, BUILT_IN_NAND_AND_FETCH_N,
	BUILT_IN_NAND_AND_FETCH_1, BUILT_IN_NAND_AND_FETCH_2,
	BUILT_IN_NAND_AND_FETCH_4, BUILT_IN_NAND_AND_FETCH_8,
	BUILT_IN_BOOL_COMPARE_AND_SWAP_N, BUILT_IN_BOOL_COMPARE_AND_SWAP_1,
	BUILT_IN_BOOL_COMPARE_AND_SWAP_2, BUILT_IN_BOOL_COMPARE_AND_SWAP_4,
	BUILT_IN_BOOL_COMPARE_AND_SWAP_8, BUILT_IN_VAL_COMPARE_AND_SWAP_N,
	BUILT_IN_VAL_COMPARE_AND_SWAP_1, BUILT_IN_VAL_COMPARE_AND_SWAP_2,
	BUILT_IN_VAL_COMPARE_AND_SWAP_4, BUILT_IN_VAL_COMPARE_AND_SWAP_8,
	BUILT_IN_LOCK_TEST_AND_SET_N, BUILT_IN_LOCK_TEST_AND_SET_1,
	BUILT_IN_LOCK_TEST_AND_SET_2, BUILT_IN_LOCK_TEST_AND_SET_4,
	BUILT_IN_LOCK_TEST_AND_SET_8, BUILT_IN_LOCK_RELEASE_N,
	BUILT_IN_LOCK_RELEASE_1, BUILT_IN_LOCK_RELEASE_2,
	BUILT_IN_LOCK_RELEASE_4, BUILT_IN_LOCK_RELEASE_8,
	BUILT_IN_SYNCHRONIZE: New.
	* builtins.c (called_as_built_in): Rewrite from CALLED_AS_BUILT_IN
	as a function.  Accept __sync_ as a prefix as well.
	(expand_builtin_sync_operation, expand_builtin_compare_and_swap,
	expand_builtin_lock_test_and_set, expand_builtin_synchronize,
	expand_builtin_lock_release): New.
	(expand_builtin): Call them.
	* c-common.c (DEF_BUILTIN): Don't require __builtin_ prefix if
	neither BOTH_P nor FALLBACK_P are defined.
	(builtin_type_for_size): New.
	(sync_resolve_size, sync_resolve_params, sync_resolve_return): New.
	(resolve_overloaded_builtin): New.
	* c-common.h (resolve_overloaded_builtin): Declare.
	(builtin_type_for_size): Declare.
	* c-typeck.c (build_function_call): Invoke resolve_overloaded_builtin.
	* expr.c (sync_add_optab, sync_sub_optab, sync_ior_optab,
	sync_and_optab, sync_xor_optab, sync_nand_optab, sync_old_add_optab,
	sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab,
	sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab,
	sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab,
	sync_new_xor_optab, sync_new_nand_optab, sync_compare_and_swap,
	sync_compare_and_swap_cc, sync_lock_test_and_set,
	sync_lock_release): New.
	* optabs.h: Declare them.
	* expr.h (expand_val_compare_and_swap, expand_bool_compare_and_swap,
	expand_sync_operation, expand_sync_fetch_operation,
	expand_sync_lock_test_and_set): Declare.
	* genopinit.c (optabs): Add sync optabs.
	* optabs.c (init_optabs): Initialize sync optabs.
	(expand_val_compare_and_swap_1, expand_val_compare_and_swap,
	expand_bool_compare_and_swap, expand_compare_and_swap_loop,
	expand_sync_operation, expand_sync_fetch_operation,
	expand_sync_lock_test_and_set): New.
	* doc/extend.texi (Atomic Builtins): New section
	* doc/md.texi (Standard Names): Add sync patterns.

From-SVN: r98154
2005-04-14 16:37:47 -07:00
Kazu Hirata bbc8fb000b explow.c (copy_all_reg, stabilize): Remove.
* explow.c (copy_all_reg, stabilize): Remove.
	* expr.h: Remove the corresponding prototypes.

From-SVN: r93683
2005-01-15 04:10:54 +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
Kazu Hirata 0cc1b87903 * expr.h (expand_modifier): Define EXPAND_STACK_PARM as 1.
From-SVN: r92140
2004-12-14 16:24:42 +00:00
Richard Henderson 2039d7aaea alias.c (component_uses_parent_alias_set): Rename from can_address_p.
* alias.c (component_uses_parent_alias_set): Rename from
        can_address_p.  Return bool.  Reverse the sense of the result.
        Reinstate the check for alias set zero.
        (get_alias_set): Update to match.
        * alias.h (component_uses_parent_alias_set): Likewise.
        * emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
        * expr.c (expand_assignment): Likewise.
        * expr.h: Remove commented out prototypes that were moved to alias.h.

From-SVN: r91712
2004-12-03 16:20:31 -08: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
Kazu Hirata ac141aead6 basic-block.h, [...]: Remove unused prototypes.
* basic-block.h, c-common.h, df.h, expr.h, output.h, rtl.h,
	tree-chrec.h, tree-flow.h, tree-scalar-evolution.h,
	tree-ssa-live.h, tree.h: Remove unused prototypes.

From-SVN: r90821
2004-11-17 22:06:00 +00: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 4dd9b0448f c-typeck.c (c_size_in_bytes, [...]): Make them static.
* c-typeck.c (c_size_in_bytes, record_maybe_used_decl):
	Make them static.
	* c-tree.h: Remove the corresponding prototypes.

From-SVN: r90505
2004-11-11 23:14:21 +00:00
Kazu Hirata 04e2b4d390 alias.c (record_alias_subset, [...]): Make them static.
* alias.c (record_alias_subset, addr_side_effect_eval):
	Make them static.
	* alias.h: Remove the prototype for record_alias_subset.
	* expr.h: Remove the commented-out prototype for
	record_alias_subset.
	* rtl.h: Remove the prototype for addr_side_effect_eval.

From-SVN: r90501
2004-11-11 23:08:56 +00: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
Kazu Hirata 54e6279937 builtins.c (expand_builtin_return_addr, [...]): Make them static.
* builtins.c (expand_builtin_return_addr,
	expand_builtin_longjmp, expand_builtin_trap): Make them static.
	* expr.h: Remove the prototypes for expand_builtin_longjmp and
	expand_builtin_trap.
	* tree.h: Remove the prototype for expand_builtin_return_addr.

From-SVN: r90087
2004-11-04 23:17:44 +00:00
Steven Bosscher 75473b0257 cfgloop.h (struct loop): Update comment.
* cfgloop.h (struct loop): Update comment.
	* cse.c (cse_main): Remove obsolete comment.

	* expr.h (gen_cond_trap): Move prototype under functions provided
	by optabs.c.
	(canonicalize_condition, get_condition): Move to...
	* rtl.h (canonicalize_condition, get_condition): ...here.
	(branch_target_load_optimize): Add comment that this function is
	in bt-load.c.
	* loop.c (canonicalize_condition, get_condition): Move to...
	* rtlanal.c (canonicalize_condition, get_condition): ...here.
	* sched-deps.c (get_condition): Rename to sched_get_condition.
	(add_dependence): Update this caller.

From-SVN: r89995
2004-11-02 17:59:46 +00:00
Kazu Hirata e836a5a26a expr.c (expand_assignment): Remove the last argument.
* expr.c (expand_assignment): Remove the last argument.
	Change the return type to void.
	* expr.h: Update the prototype of expand_assignment.
	* function.c (assign_parm_setup_reg): Update a call to
	expand_assignment.
	* stmt.c (expand_asm_expr): Likewise.

From-SVN: r89275
2004-10-19 14:43:56 +00:00
Eric Botcazou a494ed43ab re PR middle-end/17813 (ada bootstrap failure on i486-linux)
PR middle-end/17813
	* dojump.c (discard_pending_stack_adjust): New function.
	(clear_pending_stack_adjust): Call it.
	* expr.h (discard_pending_stack_adjust): Declare it.
	* explow.c (emit_stack_save): Emit pending stack adjustments
	before saving the stack pointer.
	(emit_stack_restore): Discard pending stack adjustments before
	restoring the stack pointer.

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

From-SVN: r89251
2004-10-18 22:06:36 +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
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
Richard Sandiford 45d09c02e5 expr.h (canonicalize_condition, [...]): Add an int argument.
* expr.h (canonicalize_condition, get_condition): Add an int argument.
	* gcse.c (fis_get_condition): Reimplement using get_condition, leaving
	it to check whether the condition is still valid at the jump insn.
	* ifcvt.c (noce_get_condition): Likewise.
	(noce_get_alt_condition): Update call to canonicalize_condition.
	* loop-iv.c (simplify_using_initial_values): Update call to
	get_condition.  Remove FIXME.
	(check_simple_exit): Update call to get_condition.
	* loop-unswitch.c (may_unswitch_on): Likewise.
	* loop.c (check_dbra_loop): Likewise.
	(canonicalize_condition, get_condition): Add an argument to say whether
	the condition must still be valid at INSN.
	(get_condition_for_loop): Update call to get_condition.  Require that
	the condition be valid at INSN.
	* predict.c (estimate_probability): Update call to get_condition.
	Remove unused earliest parameter.
	(expected_value_to_br_prob): Update call to canonicalize_condition.

From-SVN: r85218
2004-07-27 07:27:12 +00:00
Richard Henderson ab8907ef75 expr.c (expand_expr_real_1): Don't handle non-local variables.
* expr.c (expand_expr_real_1): Don't handle non-local variables.
        * expr.h (fix_lexical_addr): Remove.
        * function.c (NEED_SEPARATE_AP): Remove.
        (fix_lexical_addr): Remove.
        * tree-alias-common.c (get_alias_var_decl): Check TREE_STATIC,
        not null decl_function_context.
        (create_alias_vars): Likewise.
        * tree-cfg.c (make_ctrl_stmt_edges): Don't check for non-local labels.
        (simple_goto_p): Likewise.
        * tree-dfa.c (add_referenced_var): Don't check for non-local variables.
        * tree-ssa-ccp.c (get_default_value): Likewise.
        * tree-tailcall.c (suitable_for_tail_opt_p): Likewise.
        * tree.c (needs_to_live_in_memory): Likewise.
        * tree-flow-inline.h (may_be_aliased): Move...
        * tree-ssa-alias.c (may_be_aliased): ... here.  Enhance check for
        when TREE_STATIC variables may be addressable.

From-SVN: r85099
2004-07-23 15:37:23 -07:00
Richard Henderson 77c9db7751 builtins.c (std_expand_builtin_va_arg): Remove.
* builtins.c (std_expand_builtin_va_arg): Remove.
        (expand_builtin_va_arg): Remove.
        * expr.h: Don't declare them.
        * gimplify.c (mark_decls_volatile_r): Remove.
        (copy_if_shared_r): Don't call it.
        * target-def.h: Don't test EXPAND_BUILTIN_VA_ARG.
        * expr.c (expand_expr_real_1): Don't handle VA_ARG_EXPR.
        * gimple-low.c (lower_stmt): Likewise.
        * tree-cfg.c (cfg_remove_useless_stmts_bb): Likewise.
        * tree-gimple.c (is_gimple_tmp_rhs, is_gimple_stmt): Likewise.
        * tree-ssa-operands.c (get_expr_operands): Likewise.
        * doc/tm.texi (TARGET_GIMPLIFY_VA_ARG_EXPR): Don't mention
        EXPAND_BUILTIN_VA_ARG.
        * system.h (EXPAND_BUILTIN_VA_ARG): Poison.
        * config/alpha/alpha.h, config/alpha/unicosmk.h, config/i386/i386.h,
        config/ia64/ia64.h, config/rs6000/rs6000.h, config/s390/s390.h,
        config/sparc/sparc.h (EXPAND_BUILTIN_VA_ARG): Remove.

From-SVN: r84842
2004-07-16 16:25:51 -07: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
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
Roger Sayle a32e70c34d builtins.c (fold_builtin_strcpy): Merge functionality from simplify_builtin_strcpy.
* builtins.c (fold_builtin_strcpy): Merge functionality from
	simplify_builtin_strcpy.  Add additional len argument.  No longer
	static.  Remove function prototype.
	(fold_builtin_strncpy): Likewise integrate functionality from
	simplify_builtin_strncpy.  Add additional slen argument.  No
	longer static.  Remove function prototype.
	(simplify_builtin_strcy, simplify_builtin_strncpy): Delete.
	(simplify_builtin_fputs): Rename to fold_builtin_fputs.  Change
	types of "ignore" and "unlocked" parameters to bool.
	(fold_builtin_1):  Add additional ignore argument.  Call renamed
	fold_builtin_fputs to simplify GCC "fputs" and "fputs_unlocked"
	builtins.  Update arguments to fold_builtin_strncpy and
	fold_builtin_strcpy.  Add function prototype.
	(fold_builtin): Add additional Boolean ignore argument to pass
	to fold_builtin_1.
	(simplify_builtin): Call fold_builtin_fputs, fold_builtin_strcpy
	and fold_builtin_strncpy instead of simplify_builtin_fputs,
	simplify_builtin_strcpy and simplify_builtin_strncpy respectively.

	* expr.h (simplify_builtin_fputs, simplify_builtin_strcpy,
	simplify_builtin_strncpy): Delete function prototypes.
	* tree.h (fold_builtin_fputs, fold_builtin_strcpy,
	fold_builtin_strncpy): Add function prototypes here.
	(fold_builtin): Update function prototype with new "bool ignore".

	* tree-ssa-ccp.c (ccp_fold): Update call to fold_builtin.
	(ccp_fold_builtin):  Update call to fold_builtin.  Call
	fold_builtin_fputs, fold_builtin_strcpy and fold_builtin_strncpy
	instead of simplify_builtin_fputs, simplify_builtin_strcpy and
	simplify_builtin_strncpy respectively.
	* fold-const.c (fold): Update call to fold_builtin.

From-SVN: r84302
2004-07-08 17:40:22 +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
Alexandre Oliva 70128ad9f6 builtins.c: Rename movstr*, except for movstrict*, to movmem* and clrstr* to clrmem*.
gcc/ChangeLog:
* builtins.c: Rename movstr*, except for movstrict*, to
movmem* and clrstr* to clrmem*.
* expr.c: Likewise.
* expr.h: Likewise.
* genopinit.c: Likewise.
* integrate.c: Likewise.
* local-alloc.c: Likewise.
* optabs.c: Likewise.
* optabs.h: Likewise.
* config/alpha/alpha.h: Likewise.
* config/alpha/alpha.md: Likewise.
* config/arm/arm-protos.h: Likewise.
* config/arm/arm.c: Likewise.
* config/arm/arm.md: Likewise.
* config/avr/avr.md: Likewise.
* config/c4x/c4x.c: Likewise.
* config/c4x/c4x.md: Likewise.
* config/frv/frv.md: Likewise.
* config/i386/i386-protos.h: Likewise.
* config/i386/i386.c: Likewise.
* config/i386/i386.h: Likewise.
* config/i386/i386.md: Likewise.
* config/i860/i860.c: Likewise.
* config/i860/i860.md: Likewise.
* config/ip2k/ip2k.md: Likewise.
* config/ip2k/libgcc.S: Likewise.
* config/ip2k/t-ip2k: Likewise.
* config/m32r/m32r.c: Likewise.
* config/m32r/m32r.md: Likewise.
* config/mcore/mcore.md: Likewise.
* config/mips/mips.c: Likewise.
* config/mips/mips.md: Likewise.
* config/ns32k/ns32k.c: Likewise.
* config/ns32k/ns32k.h: Likewise.
* config/ns32k/ns32k.md: Likewise.
* config/pa/pa.c: Likewise.
* config/pa/pa.md: Likewise.
* config/pdp11/pdp11.h: Likewise.
* config/pdp11/pdp11.md: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rs6000/rs6000.md: Likewise.
* config/s390/s390-protos.h: Likewise.
* config/s390/s390.c: Likewise.
* config/s390/s390.md: Likewise.
* config/sh/lib1funcs.asm: Likewise.
* config/sh/sh.c: Likewise.
* config/sh/sh.md: Likewise.
* config/sh/t-sh: Likewise.
* config/sparc/sparc.h: Likewise.
* config/vax/vax.md: Likewise.
* config/xtensa/xtensa.c: Likewise.
* config/xtensa/xtensa.md: Likewise.
* doc/invoke.texi: Likewise.
* doc/md.texi: Likewise.
* doc/rtl.texi: Likewise.
gcc/testsuite/ChangeLog:
* gcc.c-torture/execute/builtins/mempcpy-2.c: Rename movstr*,
except for movstrict*, to movmem* and clrstr* to clrmem*.

From-SVN: r84222
2004-07-07 19:25:01 +00:00
Richard Kenner aa7cb8c39e Add a blank.
From-SVN: r83593
2004-06-24 09:47:49 -04:00
Jerry Quinn 785287145e Makefile.in (EXPR_H): Add insn-config.h...
2004-06-01  Jerry Quinn  <jlquinn@optonline.net>

	* Makefile.in (EXPR_H): Add insn-config.h, function.h,
	$(RTL_H), flags.h, $(TREE_H), $(MACHMODE_H), $(EXPR_H).
	(ALIAS_H, EMIT_RTL_H): New.
	(cselib.o): Replace EXPR_H with EMIT_RTL_H.
	(cfgcleanup.o): Add EMIT_RTL_H.
	(alias.o): Replace EXPR_H with EMIT_RTL_H and ALIAS_H.
	* alias.c: Replace expr.h with emit-rtl.h and alias.h.
	* attribs.c, c-lex.c, c-obj-common.c, c-semantics.c: Remove expr.h.
	* cfgcleanup.c, cselib.c: Replace expr.h with emit-rtl.h.
	* expr.h: Add include guard.  Include function.h, rtl.h, flags.h,
	tree.h, machmode.h, insn-config.h, alias.h, emit-rtl.h.
	(get_varargs_alias_set, get_frame_alias_set, record_base_value,
	record_alias_subset, new_alias_set, can_address_p): Move to alias.h.
	(set_mem_alias_set, set_mem_align, set_mem_expr, set_mem_offset,
	set_mem_size): Move to emit-rtl.h.
	* emit-rtl.h: New.
	* alias.h: New.

From-SVN: r82568
2004-06-02 02:09:45 +00:00
Steven Bosscher 673fda6b48 c-gimplify.c (c_genericize): Replace calls via (*lang_hooks.foo) with lang_hooks.foo.
* c-gimplify.c (c_genericize):
	Replace calls via (*lang_hooks.foo) with lang_hooks.foo.
	* c-parse.in <expr_no_commas>: Likewise.
	<if_prefix>: Likewise.
	<select_or_iter_stmt>: Likewise.
	* expr.c (expand_var, expand_expr_real_1): Likewise.
	* expr.h (expand_expr): Make it a static inline function.
	Move prototype for expand_expr_real up before this.
	* fold-const.c (fold_relational_hi_lo, fold_relational_const):
	Likewise.
	* gimplify.c (gimple_boolify, gimplify_addr_expr,
	gimplify_asm_expr, gimplify_expr): Likewise.
	* tree-cfg.c (dump_tree_cfg, dump_cfg_stats, tree_cfg2vcg,
	dump_function_to_file): Likewise.
	* tree-dfa.c (dump_immediate_uses, dump_dfa_stats): Likewise.
	* tree-inline.c (remap_block, save_body, walk_tree): Likewise.
	* tree-into-ssa.c (dump_tree_ssa): Likewise.
	* tree-mudflap.c (mf_varname_tree, mf_file_function_line_tree):
	Likewise.
	* tree-optimize.c (execute_one_pass): Likewise.
	* tree-pretty-print.c (dump_generic_bb_buff): Likewise.
	* tree-ssa-alias.c (dump_alias_stats, dump_alias_info): Likewise.

objc/
	* objc-act.c (objc_build_try_enter_fragment,
	objc_build_try_epilogue, objc_build_catch_stmt,
	objc_build_finally_prologue): Replace calls via (*lang_hooks.foo)
	with lang_hooks.foo ().

From-SVN: r81907
2004-05-15 23:07:53 +00:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Richard Kenner 6fce44af56 alias.c (get_alias_set): Remove handling of PLACEHOLDER_EXPR.
* alias.c (get_alias_set): Remove handling of PLACEHOLDER_EXPR.
	* emit-rtl.c (component_ref_for_mem_expr): Likewise.
	(set_mem_attributes_minus_bitpos): Call SUBSTITUTE_PLACEHOLDER_IN_EXPR.
	* explow.c (expr_size): Likewise.
	* expr.h (placeholder_list, find_placeholder): Deleted.
	* expr.c (store_constructor): Likewise.
	(get_inner_reference): Likewise.  Also don't call find_placeholder.
	(placeholder_list, find_placeholder): Deleted.
	(is_aligning_offset): Don't handle WITH_RECORD_EXPR, PLACEHOLDER_EXPR.
	(expand_expr_real, cases PLACEHOLDER_EXPR, WITH_RECORD_EXPR): Likewise.
	(highest_pow2_factor, case WITH_RECORD_EXPR): Remove.
	* dojump.c (do_jump, case WITH_RECORD_EXPR): Likewise.
	* dwarf2out.c (loc_descriptor_from_tree, case WITH_RECORD_EXPR):
	Likewise.
	* fold-const.c (invert_truthvalue, case WITH_RECORD_EXPR): Likewise.
	(extract_muldiv, case WITH_RECORD_EXPR): Likewise.
	* tree.c (expr_align, case WITH_RECORD_EXPR): Likewise.
	(contains_placeholder_p): Don't handle WITH_RECORD_EXPR.
	Clean up by using first_rtl_op.
	(substitute_in_expr): Use SUBSTITUTE_IN_EXPR for recursive call.
	(substitute_placeholder_in_expr): New function.
	* tree.def (WITH_RECORD_EXPR): Deleted.
	* tree.h (SUBSTITUTE_IN_EXPR, SUBSTITUTE_PLACEHOLDER_IN_EXPR): New.
	(substitute_placeholder_in_expr): New.

	* ada/decl.c (gnat_to_gnu_entity): Use SUBSTITUTE_PLACEHOLDER_IN_EXPR.
	* ada/trans.c (tree_transform, emit_index_check): Likewise.
	* ada/utils.c (build_template): Likewise.
	(max_size, convert): Remove handling of WITH_RECORD_EXPR.
	(maybe_unconstrained_array, unchecked_convert): Likewise.
	* ada/utils2.c (gnat_truthvalue_conversion, build_binary_op): Likewise.
	(build_unary_op): Likewise.
	(compare_arrays, build_allocator): Use SUBSTITUTE_PLACEHOLDER_IN_EXPR.
	(fill_vms_descriptor): Likewise.
	(build_call_alloc_dealloc): Likewise.
	ALIGN is unsigned.
	* ada/gigi.h (build_call_alloc_dealloc): Alignment is unsigned.

From-SVN: r79789
2004-03-21 13:09:20 -05: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