Age | Commit message (Collapse) | Author | Files | Lines |
|
gcc/
PR tree-optimization/49545
* builtins.c (get_object_alignment_1): Update function comment.
Do not use DECL_ALIGN for functions, but test
TARGET_PTRMEMFUNC_VBIT_LOCATION instead.
* fold-const.c (get_pointer_modulus_and_residue): Don't check
for functions here.
* tree-ssa-ccp.c (get_value_from_alignment): Likewise.
gcc/testsuite/
* gcc.dg/torture/pr49169.c: Restrict to ARM and MIPS targets.
From-SVN: r175627
|
|
* builtin-types.def (BT_FN_PTR_CONST_PTR_SIZE_VAR): New.
* builtins.def (BUILT_IN_ASSUME_ALIGNED): New builtin.
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call,
find_func_clobbers): Handle BUILT_IN_ASSUME_ALIGNED.
* tree-ssa-ccp.c (bit_value_assume_aligned): New function.
(evaluate_stmt, execute_fold_all_builtins): Handle
BUILT_IN_ASSUME_ALIGNED.
* tree-ssa-dce.c (propagate_necessity): Likewise.
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1,
call_may_clobber_ref_p_1): Likewise.
* builtins.c (is_simple_builtin, expand_builtin): Likewise.
(expand_builtin_assume_aligned): New function.
* doc/extend.texi (__builtin_assume_aligned): Document.
* c-common.c (check_builtin_function_arguments): Handle
BUILT_IN_ASSUME_ALIGNED.
* gcc.dg/builtin-assume-aligned-1.c: New test.
* gcc.dg/builtin-assume-aligned-2.c: New test.
* gcc.target/i386/builtin-assume-aligned-1.c: New test.
From-SVN: r175541
|
|
actual builtin_sync_ names.
2011-06-21 Andrew MacLeod <amacleod@redhat.com>
* builtins.c: Add sync_ or SYNC__ to builtin names.
* sync-builtins.def: Add sync_ or SYNC__ to builtin names.
* omp-low.c: Add sync_ or SYNC__ to builtin names.
* c-family/c-common.c: Add sync_ or SYNC__ to builtin names.
* c-family/c-omp.c: Add sync_ or SYNC__ to builtin names.
* java/builtins.c: Add sync_ or SYNC__ to builtin names.
* java/expr.c: Add sync_ or SYNC__ to builtin names.
* cp/semantics.c: Add sync_ or SYNC__ to builtin names.
* fortran/trans-openmp.c: Add sync_ or SYNC__ to builtin names.
* fortran/trans-stmt.c: Add sync_ or SYNC__ to builtin names.
* fortran/trans-decl.c: Add sync_ or SYNC__ to builtin names.
From-SVN: r175270
|
|
x86_64-linux)
PR middle-end/49489
* builtins.c (expand_builtin_unop): Call expand_unop with 0 as
unsignedp argument instead of 1 for clrsb_optab.
(fold_builtin_bitop): Fix masking for width > HOST_BITS_PER_WIDE_INT
and < 2 * HOST_BITS_PER_WIDE_INT. Optimize BUILT_IN_CLRSB*.
(fold_builtin_1): Call fold_builtin_binop for BUILT_IN_CLRSB*.
* optabs.c (widen_leading): Call widen_operand and expand_unop
with 0 as unsignedp argument instead of 1 for clrsb_optab.
(expand_unop): Subtract difference of mode sizes also for
clrsb_optab.
From-SVN: r175265
|
|
libgcc/
* Makefile.in (lib2funcs): Add _clrsbsi2 and _clrsbdi2.
* libgcc-std.ver.in (GCC_4.7.0): New section.
gcc/
* doc/extend.texi (__builtin_clrsb, __builtin_clrsbl,
__builtin_clrsbll): Document.
* doc/rtl.texi (clrsb): New entry.
* optabs.c (widen_leading): Renamed from widen_clz. New argument
UNOPTAB. All callers changed. Use UNOPTAB instead of clz_optab.
(expand_unop): Handle clrsb_optab.
(init_optabs): Initialize it.
* optabs.h (enum optab_index): New entry OTI_clrsb.
(clrsb_optab): Define.
* genopinit.c (optabs): Add an entry for it.
* builtins.c (expand_builtin): Handle clrsb builtin functions.
* builtins.def (BUILT_IN_CLRSB, BUILT_IN_CLRSBIMAX, BUILT_IN_CLRSBL,
BUILT_IN_CLRSBLL): New.
* rtl.def (CLRSB): New code.
* dwarf2out.c (mem_loc_descriptor): Handle it.
* simplify-rtx.c (simplify_const_unary_operation): Likewise.
Use op_mode rather than mode when optimizing ffs, clz, ctz, parity
and popcount.
* libgcc2.c (__clrsbSI2, __clrsbDI2): New functions.
* libgcc2.h (__clrsbSI2, __clrsbDI2): Define and declare.
(__ctzDI2): Move declaration.
* config/bfin/bfin.md (clrsbsi2): New expander.
(signbitssi2): Use the CLRSB rtx.
(clrsbhi2): Renamed from signbitshi2. Use the CLRSB rtx.
* config/bfin/bfin.c (bdesc_1arg): Changed accordingly.
gcc/testsuite/
* gcc.c-torture/excute/builtin-bitops-1.c (MAKE_FUNS): Make
my_clrsb test functions.
(main): Test clrsb.
* gcc.dg/builtin-protos-1.c (test_s, test_u, test_sl, test_ul,
test_sll, test_ull): Add clrsb tests.
* gcc.dg/torture/builtin-attr-1.c: Add tests for clrsb, clrsbl,
clrsbll.
From-SVN: r175261
|
|
2011-06-14 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/47364
* builtins.c (expand_builtin_strlen): Expand strlen to Pmode
and properly handle result not in Pmode.
From-SVN: r175034
|
|
0.75)+y on powerpc)
2011-06-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/46728
* builtins.c (powi_table): Remove.
(powi_lookup_cost): Remove.
(powi_cost): Remove.
(expand_powi_1): Remove.
(expand_powi): Remove.
(expand_builtin_pow_root): Remove.
(expand_builtin_pow): Remove.
(expand_builtin_powi): Eliminate handling of constant exponent.
(expand_builtin): Use expand_builtin_mathfn_2 for BUILT_IN_POW.
From-SVN: r174701
|
|
* function.h (struct stack_usage): Remove dynamic_alloc_count field.
(current_function_dynamic_alloc_count): Delete.
* builtins.c (expand_builtin_setjmp_setup): Do not set calls_setjmp.
(expand_builtin_nonlocal_goto): Remove obsolete comment.
(expand_builtin_update_setjmp_buf): Remove dead code.
* cse.c (cse_find_path): Do not follow a single abnormal incoming edge.
* explow.c (allocate_dynamic_stack_space): Remove SETJMP_VIA_SAVE_AREA
support.
* function.c (instantiate_virtual_regs): Likewise.
* postreload-gcse.c (bb_has_well_behaved_predecessors): Return false
for a block with a single abnormal incoming edge.
* config/sparc/sparc.h (STACK_SAVEAREA_MODE): Define.
* config/sparc/sparc-protos.h (load_got_register): Declare.
* config/sparc/sparc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
(load_got_register): Make global.
(sparc_frame_pointer_required): Add 'static'.
(sparc_can_eliminate): Likewise. Call sparc_frame_pointer_required.
(sparc_builtin_setjmp_frame_value): New function.
* config/sparc/sparc.md (UNSPECV_SETJMP): Remove.
(save_stack_nonlocal): New expander.
(restore_stack_nonlocal): Likewise.
(nonlocal_goto): Remove modes, adjust predicates and reimplement.
(nonlocal_goto_internal): New insn.
(goto_handler_and_restore): Delete.
(builtin_setjmp_setup): Likewise.
(do_builtin_setjmp_setup): Likewise.
(setjmp): Likewise.
(builtin_setjmp_receiver): New expander.
From-SVN: r174564
|
|
2011-05-23 Richard Guenther <rguenther@suse.de>
PR middle-end/15419
* builtins.c (fold_builtin_memory_op): Be less restrictive about
what pointer types we accept for folding.
* gcc.dg/memcpy-3.c: New testcase.
From-SVN: r174065
|
|
of the result.
2011-04-29 Richard Guenther <rguenther@suse.de>
* builtins.c (fold_builtin_classify_type): Use integer_type_node
for the type of the result.
(fold_builtin_isascii): Likewise.
(fold_builtin_toascii): Use integer_type_node where appropriate.
(fold_builtin_logb): Likewise.
(fold_builtin_frexp): Likewise.
(fold_builtin_strstr): Likewise.
(fold_builtin_strpbrk): Likewise.
(fold_builtin_fputs): Likewise.
(fold_builtin_sprintf): Likewise.
(fold_builtin_snprintf): Likewise.
(fold_builtin_printf): Likewise.
(do_mpfr_remquo): Use a proper type for the assigned constant.
(do_mpfr_lgamma_r): Likewise.
* dwarf2out.c (resolve_one_addr): Use size_int.
* except.c (init_eh): Likewise.
(assign_filter_values): Use integer_type_node for filter values.
(sjlj_emit_dispatch_table): Use integer_type_node for dispatch
indices.
* tree-cfg.c (move_stmt_eh_region_tree_nr): Use integer_type_node
for EH region numbers.
* tree-vrp.c (simplify_div_or_mod_using_ranges): Use integer_type_node
for the shift amount.
From-SVN: r173167
|
|
2011-04-29 Richard Guenther <rguenther@suse.de>
* expr.h (expand_shift): Rename to ...
(expand_variable_shift): ... this.
(expand_shift): Take a constant shift amount.
* expmed.c (expand_shift): Rename to ...
(expand_variable_shift): ... this.
(expand_shift): New wrapper around expand_variable_shift.
* expr.c (convert_move, emit_group_load_1, emit_group_store,
optimize_bitfield_assignment_op, store_field, expand_expr_real_2,
expand_expr_real_1, reduce_to_bit_field_precision): Adjust.
* expmed.c (store_fixed_bit_field, extract_bit_field_1,
extract_fixed_bit_field, extract_split_bit_field, expand_mult_const,
expand_mult, expand_widening_mult, expand_mult_highpart_adjust,
extract_high_half, expand_sdiv_pow2, expand_divmod, emit_cstore,
emit_store_flag_1, emit_store_flag): Likewise.
* builtins.c (expand_builtin_signbit): Likewise.
* calls.c (load_register_parameters): Likewise.
* function.c (assign_parm_setup_block): Likewise.
* lower-subreg.c (resolve_shift_zext): Likewise.
* optabs.c (widen_bswap, expand_abs_nojump,
expand_one_cmpl_abs_nojump, expand_float): Likewise.
* spu/spu.c (spu_expand_extv): Likewise.
* sparc/sparc.c (sparc32_initialize_trampoline): Likewise.
From-SVN: r173157
|
|
* tree.h (ALLOCA_FOR_VAR_P): Rename to CALL_ALLOCA_FOR_VAR_P.
* builtins.c (expand_builtin): Use CALL_ALLOCA_FOR_VAR_P.
* function.c (gimplify_parameters): Ditto.
* gimplify.c (gimplify_vla_decl): Ditto.
* gimple.h (enum gf_mask): Add GF_CALL_ALLOCA_FOR_VAR.
(gimple_call_set_alloca_for_var): New inline function.
(gimple_call_alloca_for_var_p): Ditto.
* gimple.c (gimple_build_call_from_tree): Remember CALL_ALLOCA_FOR_VAR_P
state.
* cfgexpand.c (expand_call_stmt): Restore CALL_ALLOCA_FOR_VAR_P state.
* tree-inline.c (inline_forbidden_p_stmt): Don't reject alloca
calls if they were for VLA objects.
From-SVN: r172516
|
|
2011-04-14 Richard Guenther <rguenther@suse.de>
* tree.h (get_object_alignment_1): Declare.
* builtins.c (get_object_alignment_1): Split out worker from ...
(get_object_alignment): ... here.
* fold-const.c (get_pointer_modulus_and_residue): Use
get_object_alignment_1.
* gcc.dg/fold-bitand-4.c: Move ...
* c-c++-common/fold-bitand-4.c: ... here. Adjust slightly.
From-SVN: r172424
|
|
* builtins.c (build_va_arg_indirect_ref): Use
build_simple_mem_ref_loc.
From-SVN: r171789
|
|
gcc/
2011-03-28 Richard Sandiford <richard.sandiford@linaro.org>
* builtins.c (expand_builtin_memset_args): Use gen_int_mode
instead of GEN_INT.
From-SVN: r171632
|
|
gcc/
* builtins.c (expand_movstr): Fix endp == 1 adjustment after
last commit.
From-SVN: r171397
|
|
"enum insn_code".
gcc/
* optabs.h (emit_unop_insn, maybe_emit_unop_insn): Change insn code
parameter from "int" to "enum insn_code".
(expand_operand_type): New enum.
(expand_operand): New structure.
(create_expand_operand): New function.
(create_fixed_operand, create_output_operand): Likewise
(create_input_operand, create_convert_operand_to): Likewise.
(create_convert_operand_from, create_address_operand): Likewise.
(create_integer_operand): Likewise.
(create_convert_operand_from_type, maybe_legitimize_operands): Declare.
(maybe_gen_insn, maybe_expand_insn, maybe_expand_jump_insn): Likewise.
(expand_insn, expand_jump_insn): Likewise.
* builtins.c (expand_builtin_prefetch): Use the new interfaces.
(expand_builtin_interclass_mathfn, expand_builtin_strlen): Likewise.
(expand_movstr, expand_builtin___clear_cache): Likewise.
(expand_builtin_lock_release): Likewise.
* explow.c (allocate_dynamic_stack_space): Likewise.
(probe_stack_range): Likewise. Allow check_stack to FAIL,
and use the default handling in that case.
* expmed.c (check_predicate_volatile_ok): Delete.
(store_bit_field_1, extract_bit_field_1): Use the new interfaces.
(emit_cstore): Likewise.
* expr.c (emit_block_move_via_movmem): Likewise.
(set_storage_via_setmem, expand_assignment): Likewise.
(emit_storent_insn, try_casesi): Likewise.
(emit_single_push_insn): Likewise. Allow the expansion to fail.
* optabs.c (expand_widen_pattern_expr, expand_ternary_op): Likewise.
(expand_vec_shift_expr, expand_binop_directly): Likewise.
(expand_twoval_unop, expand_twoval_binop): Likewise.
(expand_unop_direct, emit_indirect_jump): Likewise.
(emit_conditional_move, vector_compare_rtx): Likewise.
(expand_vec_cond_expr, expand_val_compare_and_swap_1): Likewise.
(expand_sync_operation, expand_sync_fetch_operation): Likewise.
(expand_sync_lock_test_and_set): Likewise.
(maybe_emit_unop_insn): Likewise. Change icode to an insn_code.
(emit_unop_insn): Likewise.
(expand_copysign_absneg): Change icode to an insn_code.
(create_convert_operand_from_type): New function.
(maybe_legitimize_operand, maybe_legitimize_operands): Likewise.
(maybe_gen_insn, maybe_expand_insn, maybe_expand_jump_insn): Likewise.
(expand_insn, expand_jump_insn): Likewise.
* config/i386/i386.md (setmem<mode>): Use nonmemory_operand rather
than const_int_operand for operand 2.
From-SVN: r171341
|
|
ICE)
PR tree-optimization/48129
* builtins.c (fold_builtin_snprintf): Convert to type of
built_in_decls[BUILT_IN_SNPRINTF] retval instead of
implicit_built_in_decls[BUILT_IN_SNPRINTF] retval.
From-SVN: r170985
|
|
into memcpy)
PR middle-end/47917
* builtins.c (fold_builtin_snprintf): New function.
(fold_builtin_3): Call it for BUILT_IN_SNPRINTF.
(fold_builtin_4): Likewise.
* gcc.c-torture/execute/pr47917.c: New test.
* gcc.dg/pr47917.c: New test.
From-SVN: r170959
|
|
* 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-02-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47566
* builtins.c (builtin_save_expr): No SAVE_EXPR for SSA_NAMEs.
* gcc.dg/lto/20110201-1_0.c: New testcase.
From-SVN: r169518
|
|
* builtins.c (c_readstr): Fix byte order if BYTES_BIG_ENDIAN !=
WORDS_BIG_ENDIAN.
From-SVN: r169174
|
|
From-SVN: r168293
|
|
From-SVN: r167594
|
|
BUILT_IN_PROFILE_FUNC_ENTER and BUILT_IN_PROFILE_FUNC_EXIT.
* tree.c (build_common_builtin_nodes): Do not initialize
BUILT_IN_PROFILE_FUNC_ENTER and BUILT_IN_PROFILE_FUNC_EXIT.
* builtins.c (expand_builtin_profile_func): Remove.
(expand_builtin): Do not handle BUILT_IN_PROFILE_FUNC_ENTER and
BUILT_IN_PROFILE_FUNC_EXIT.
* builtins.def (profile_func_enter, profile_func_exit): Remove stubs.
(__cyg_profile_func_enter, __cyg_profile_func_exit): New.
* gimplify.c (gimplify_function_tree): Reorganize code calling
profiling functions.
From-SVN: r167342
|
|
* hwint.c: New. Extracted from toplev.c.
* hwint.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2):
Move from toplev.h.
* toplev.c (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2):
Move to hwint.c.
* toplev.h (clz_hwi, ctz_hwi, ffs_hwi, exact_log2, floor_log2):
Move to hwint.h.
* builtins.c, combine.c, config/i386/winnt.c, double-int.c,
explow.c, expmed.c, fold-const.c, ggc-page.c, ggc-zone.c, ifcvt.c,
ipa-struct-reorg.c, ira-color.c, matrix-reorg.c, omp-low.c,
real.c, recog.c, reload.c, rtlanal.c, simplify-rtx.c,
stor-layout.c, tree-dfa.c, tree-ssa-alias.c,
tree-ssa-loop-niter.c, tree-vect-data-refs.c,
tree-vect-loop-manip.c, tree-vect-loop.c, tree-vect-stmts.c,
tree-vrp.c: Don't include toplev.h.
* genattrtab.c, genconditions.c, genemit.c, genextract.c,
genoutput.c, genpeep.c, genpreds.c, genrecog.c: Don't include
toplev.h in generated output.
* Makefile.in (OBJS-common): Add hwint.o.
Dependencies for above files changed to remove toplev.h.
(hwint.o): New.
(insn-attrtab.o, insn-emit.o, insn-extract.o, insn-output.o,
insn-peep.o, insn-preds.o, insn-recog.o): Don't depend on
toplev.h.
* config/i386/t-cygming (winnt.o): Don't depend on toplev.h.
* config/i386/t-interix (winnt.o): Don't depend on toplev.h.
fortran:
* trans-common.c: Don't include toplev.h.
java:
* boehm.c: Don't include toplev.h.
* Make-lang.in (java/boehm.o): Don't depend on toplev.h.
lto:
* lto-object.c: Don't include toplev.h.
* Make-lang.in (lto/lto-object.o): Don't depend on toplev.h.
From-SVN: r167301
|
|
PR middle-end/46647
* builtins.c (fold_builtin_memset): Check c is INTEGER_CST instead
of host_integerp check. Use TREE_INT_CST_LOW instead of tree_low_cst.
* gcc.dg/pr46647.c: New test.
From-SVN: r167170
|
|
gcc/
2010-11-25 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/46647
* builtins.c (target_char_cast): Check INTEGER_CST instead of
host_integerp. Replace tree_low_cst with TREE_INT_CST_LOW.
gcc/testsuite/
2010-11-25 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/46647
* gcc.target/i386/pr46647.c: New.
From-SVN: r167146
|
|
PR middle-end/46534
* builtins.c (fold_builtin_printf): Don't copy and modify string
before build_string_literal, instead modify what
build_string_literal returned.
* gcc.c-torture/compile/pr46534.c: New test.
From-SVN: r166918
|
|
variant when optimizing for size.
* builtins.c (expand_builtin_mathfn_2, expand_builtin_mathfn): Do not
expand errno setting variant when optimizing for size.
From-SVN: r166879
|
|
* 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-04 Richard Guenther <rguenther@suse.de>
Richard Henderson <rth@redhat.com>
* tree.def (FMA_EXPR): New tree code.
* expr.c (expand_expr_real_2): Add FMA_EXPR expansion code.
* gimple.c (gimple_rhs_class_table): FMA_EXPR is a GIMPLE_TERNARY_RHS.
* tree-cfg.c (verify_gimple_assign_ternary): Verify FMA_EXPR types.
* tree-inline.c (estimate_operator_cost): Handle FMA_EXPR.
* gimple-pretty-print.c (dump_ternary_rhs): Likewise.
* tree-ssa-math-opts.c (convert_mult_to_fma): New function.
(execute_optimize_widening_mul): Call it. Reorganize to allow
dead stmt removal. Move TODO flags ...
(pass_optimize_widening_mul): ... here.
* flag-types.h (enum fp_contract_mode): New enum.
* common.opt (flag_fp_contract_mode): New variable.
(-ffp-contract): New option.
* opts.c (common_handle_option): Handle it.
* doc/invoke.texi (-ffp-contract): Document.
* tree.h (fold_fma): Declare.
* builtins.c (fold_fma): New function.
(fold_builtin_fma): Likewise.
(fold_builtin_3): Call it for fma.
* fold-const.c (fold_ternary_loc): Fold FMA_EXPR.
* optabs.c (optab_for_tree_code): Handle FMA_EXPR.
* config/i386/sse.md (fms<mode>4, fnma<mode>, fnms<mode>4):
New expanders.
* doc/md.texi (fms<mode>4, fnma<mode>, fnms<mode>4): Document new
named patterns.
* genopinit.c (optabs): Initialize fms_optab, fnma_optab and fnms_optab.
* optabs.h (enum optab_index): Add OTI_fms, OTI_fnma and OTI_fnms.
(fms_optab, fnma_optab, fnms_optab): New defines.
* gimplify.c (gimplify_expr): Handle binary truth expressions
explicitly. Handle FMA_EXPR.
* tree-vect-stmts.c (vectorizable_operation): Handle ternary
operations.
* gcc.target/i386/fma4-vector-2.c: New testcase.
Co-Authored-By: Richard Henderson <rth@redhat.com>
From-SVN: r166304
|
|
-funsafe-math-optimizations -mbionic and __builtin_sincosl())
2010-11-03 Richard Guenther <rguenther@suse.de>
PR middle-end/46251
* builtins.c (expand_builtin_sincos): Properly build MEM_REFs,
not INDIRECT_REFs.
* gcc.dg/pr46251.c: New testcase.
From-SVN: r166235
|
|
gcc/
* builtins.c (fold_builtin_signbit): Use build_zero_cst instead of
fold_convert.
* c-typeck.c (build_function_call_vec): Likewise.
* cfgexpand.c (expand_debug_expr): Likewise.
* cgraphunit.c (assemble_thunk): Likewise.
* config/sparc/sparc.c (sparc_fold_builtin): Likewise.
* fold-const.c (fold_unary_loc, fold_mult_zconjz): Likewise.
(fold_binary_loc, fold_ternary_loc): Likewise.
* gimple-fold.c (get_symbol_constant_value): Likewise.
* gimple-low.c (lower_builtin_setjmp): Likewise.
* gimple.c (gimple_cond_get_ops_from_tree): Likewise.
* gimplify.c (gimplify_init_constructor): Likewise.
* lambda.h (build_linear_expr): Likewise.
* omp-low.c (omp_reduction_init): Likewise.
* tree-inline.c (remap_ssa_name): Likewise.
* tree-object-size.c (compute_object_sizes): Likewise.
* tree-sra.c (init_subtree_with_zero): Likewise.
(sra_ipa_modify_assign): Likewise.
* tree-ssa-copy.c (propagate_tree_value_into_stmt): Likewise.
* tree-ssa-reassoc.c (eliminate_duplicate_pair): Likewise.
(eliminate_plus_minus_pair, eliminate_not_pairs): Likewise.
(undistribute_ops_list): Likewise.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
* tree-vect-stmts.c (vectorizable_call): Likewise.
* tree.c (build_vector_from_ctor, build_one_cst): Likewise.
(build_zero_cst): Handle more cases directly. Update comment.
gcc/cp/
* class.c (build_base_path, add_vcall_offset): Use build_zero_cst
instead of fold_convert.
* init.c (build_zero_init): Likewise.
* typeck.c (cp_build_binary_op): Likewise.
gcc/fortran/
* trans-decl.c (add_argument_checking): Use build_zero_cst instead of
fold_convert.
* trans-expr.c (gfc_conv_missing_dummy, fill_with_spaces): Likewise.
* trans-stmt.c (gfc_trans_do): Likewise.
From-SVN: r166227
|
|
* tree.h (EXPR_LOC_OR_HERE): New macro.
* builtins.c (c_strlen): Use it.
* c-decl.c (build_enumerator): Likewise.
* gimplify.c (internal_get_tmp_var): Likewise.
(shortcut_cond_expr): Likewise.
(gimplify_one_sizepos): Likewise.
c-family/
* c-common.c (conversion_warning, warn_for_collisions_1): Use
EXPR_LOC_OR_HERE.
cp/
* decl.c (pop_switch): Use EXPR_LOC_OR_HERE.
* typeck.c (convert_for_assignment): Likewise.
From-SVN: r166123
|
|
2010-10-27 Steve Ellcey <sje@cup.hp.com>
* doc/tm.texi.in (TARGET_GET_RAW_RESULT_MODE): New.
(TARGET_GET_RAW_ARG_MODE): New.
* doc/tm.texi: Regenerate.
* target.def (get_raw_result_mode): New.
(get_raw_arg_mode): New.
* targhooks.c (default_get_reg_raw_mode): New.
* targhooks.h (default_get_reg_raw_mode): New.
* builtins.c (apply_args_size): Use targetm.calls.get_raw_arg_mode.
(apply_result_size): Ditto.
* config/ia64/ia64.c (ia64_get_reg_raw_mode): New.
(TARGET_GET_RAW_RESULT_MODE): Define.
(TARGET_GET_RAW_ARG_MODE): Ditto.
From-SVN: r166021
|
|
From-SVN: r165666
|
|
From-SVN: r165515
|
|
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
|
|
temporary array.
* builtins.c (fold_call_stmt): Don't copy gimple call arguments
into a temporary array.
From-SVN: r165213
|
|
* builtins.c (rewrite_call_expr): Move code to...
(rewrite_call_expr_valist): ...here. Call
build_call_expr_loc_array.
(rewrite_call_expr_array): New function.
(fold_builtin_sprintf_chk_1): New function.
(fold_builtin_sprintf_chk): Call it.
(gimple_fold_builtin_sprintf_chk): Likewise.
(fold_builtin_snprintf_chk_1): New function.
(fold_builtin_snprintf_chk): Call it.
(gimple_fold_builtin_snprintf_chk): Likewise.
(gimple_rewrite_call_expr): Delete.
From-SVN: r165146
|
|
variables.
gcc:
* optc-gen.awk: Generate global_options initializer instead of
individual variables. Add x_ prefix to names of structure
members.
* opth-gen.awk: Generate gcc_options structure. Add x_ prefix to
names of structure members.
* doc/tm.texi.in (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Document.
* doc/tm.texi: Regenerate.
* alias.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* builtins.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.
* c-parser.c (disable_extension_diagnostics,
restore_extension_diagnostics): Update names of cpp_options
members.
* combine.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* common.opt (fcompare-debug-second): Don't use Var.
* config/alpha/alpha.h (target_flags): Remove.
* config/arm/arm.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
* config/bfin/bfin.h (target_flags): Remove.
* config/cris/cris.h (target_flags): Remove.
* config/i386/i386-c.c (ix86_pragma_target_parse): Update names of
cl_target_option members.
* config/i386/i386.c (ix86_force_align_arg_pointer): Remove.
(ix86_function_specific_print, ix86_valid_target_attribute_tree,
ix86_can_inline_p): Update names of cl_target_option members.
* config/i386/i386.h (ix86_isa_flags): Remove.
* config/lm32/lm32.h (target_flags): Remove.
* config/mcore/mcore.h (mcore_stack_increment): Remove.
* config/mcore/mcore.md (addsi3): Remove extern declaration of
flag_omit_frame_pointer.
* config/mep/mep.h (target_flags): Remove.
* config/mips/mips.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define.
* config/mmix/mmix.h (target_flags): Remove.
* config/rs6000/rs6000.h (rs6000_xilinx_fpu, flag_pic,
flag_expensive_optimizations): Remove.
* config/s390/s390.h (flag_pic): Remove.
* config/score/score-conv.h (target_flags): Remove.
* config/sh/sh.h (sh_fixed_range_str): Remove.
* config/spu/spu.h (target_flags, spu_fixed_range_string): Remove.
* dbxout.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
* df-scan.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* diagnostic.c (diagnostic_initialize): Update names of
diagnostic_context members.
* diagnostic.h (diagnostic_context): Rename inhibit_warnings and
warn_system_headers.
(diagnostic_report_warnings_p): Update for new names.
* dwarf2out.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER
* emit-rtl.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER and
HARD_FRAME_POINTER_IS_ARG_POINTER.
* flags.h (flag_compare_debug): Declare.
* ira.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* opts.c (flag_compare_debug): Define.
(common_handle_option): Update names of diagnostic_context
members. Handle -fcompare-debug-second.
(fast_math_flags_struct_set_p): Update names of cl_optimization
members.
* reginfo.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* regrename.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* reload.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* reload1.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* resource.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER.
* rtl.h (HARD_FRAME_POINTER_IS_FRAME_POINTER,
HARD_FRAME_POINTER_IS_ARG_POINTER): Define and use.
* sel-sched.c: Use HARD_FRAME_POINTER_IS_FRAME_POINTER
* stmt.c: Use HARD_FRAME_POINTER_IS_ARG_POINTER.
gcc/c-family:
* c-common.c (c_cpp_error): Update names of diagnostic_context
members.
* c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
cl_optimization members.
* c-opts.c (warning_as_error_callback, c_common_handle_option,
sanitize_cpp_opts, finish_options): Update names of cpp_options
members.
gcc/fortran:
* cpp.c (cpp_define_builtins): Update names of gfc_option_t
members.
(gfc_cpp_post_options): Update names of cpp_options members.
(cb_cpp_error): Update names of diagnostic_context members.
* f95-lang.c (gfc_init_builtin_functions): Update names of
gfc_option_t members.
* gfortran.h (gfc_option_t): Rename warn_conversion and
flag_openmp.
* intrinsic.c (gfc_convert_type_warn): Update names of
gfc_option_t members.
* options.c (gfc_init_options, gfc_post_options, set_Wall,
gfc_handle_option): Update names of gfc_option_t members.
* parse.c (next_free, next_fixed): Update names of gfc_option_t
members.
* scanner.c (pedantic): Remove extern declaration.
(skip_free_comments, skip_fixed_comments, include_line): Update
names of gfc_option_t members.
* trans-decl.c (gfc_generate_function_code): Update names of
gfc_option_t members.
gcc/java:
* java-tree.h (flag_filelist_file, flag_assert, flag_jni,
flag_force_classes_archive_check, flag_redundant, flag_newer,
flag_use_divide_subroutine, flag_use_atomic_builtins,
flag_use_boehm_gc, flag_hash_synchronization,
flag_check_references, flag_optimize_sci, flag_indirect_classes,
flag_indirect_dispatch, flag_store_check,
flag_reduced_reflection): Remove.
* jcf-dump.c (flag_newer): Remove.
* jcf.h (quiet_flag): Remove.
* parse.h (quiet_flag): Remove.
libcpp:
* include/cpplib.h (cpp_options): Rename warn_deprecated,
warn_traditional, warn_long_long and pedantic.
* directives.c (directive_diagnostics, _cpp_handle_directive):
Update names of cpp_options members.
* expr.c (cpp_classify_number, eval_token): Update names of
cpp_options members.
* init.c (cpp_create_reader, post_options): Update names of
cpp_options members.
* internal.h (CPP_PEDANTIC, CPP_WTRADITIONAL): Update names of
cpp_options members.
* macro.c (parse_params): Update names of cpp_options members.
From-SVN: r164723
|
|
2010-09-17 Richard Guenther <rguenther@suse.de>
PR middle-end/45678
* builtins.c (fold_builtin_memory_op): Always properly adjust
alignment of memory accesses.
From-SVN: r164356
|
|
PR middle-end/45567
* builtins.c (expand_builtin_interclass_mathfn, expand_builtin_cexpi,
expand_builtin_powi): Remove subtarget argument, pass NULL_RTX instead.
(expand_builtin): Adjust caller.
(expand_builtin_unop): Only use subtarget if it has the right mode.
* gcc.dg/pr45567.c: New test.
From-SVN: r164274
|
|
2010-09-06 Richard Guenther <rguenther@suse.de>
* tree.def (MISALIGNED_INDIRECT_REF): Remove.
* tree.h (INDIRECT_REF_P): Only check for INDIRECT_REF.
(build_aligned_type): Declare.
* tree.c (check_qualified_type): Also compare TYPE_ALIGN.
(check_aligned_type): New function.
(build_aligned_type): Likewise.
* expr.c (expand_assignment): Handle misaligned stores via
TARGET_MEM_REF and MEM_REF using movmisalign_optab.
(expand_expr_real_1): Likewise.
(safe_from_p): Remove MISALIGNED_INDIRECT_REF handling.
* tree-vect-stmts.c (vectorizable_store): Do not build
MISALIGNED_INDIRECT_REF but initialize alignment information.
(vectorizable_load): Likewise.
* builtins.c (get_object_alignment): Remove MISALIGNED_INDIRECT_REF
handling.
* cfgexpand.c (expand_debug_expr): Likewise.
* dwarf2out.c (loc_list_from_tree): Likewise.
* fold-const.c (maybe_lvalue_p): Likewise.
(operand_equal_p): Likewise.
(build_fold_addr_expr_with_type_loc): Likewise.
* gimplify.c (gimplify_addr_expr): Likewise.
(gimplify_expr): Likewise.
* tree-cfg.c (verify_types_in_gimple_min_lval): Likewise.
(verify_gimple_assign_single): Likewise.
* tree-dump.c (dequeue_and_dump): Likewise.
(tree_could_trap_p): Likewise.
* tree-predcom.c (ref_at_iteration): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
(op_code_prio): Likewise.
(op_symbol_code): Likewise.
* tree-ssa-ccp.c (get_value_from_alignment): Likewise.
* tree-ssa-loop-im.c (for_each_index): Likewise.
(gen_lsm_tmp_name): Likewise.
* tree-ssa-loop-ivopts.c (idx_find_step): Likewise.
(find_interesting_uses_address): Likewise.
* tree-ssa-loop-prefetch.c (idx_analyze_ref): Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
(ao_ref_init_from_vn_reference): Likewise.
* tree.c (staticp): Likewise.
(build1_stat): Likewise.
(reference_alias_ptr_type): Likewise.
* emit-rtl.c (set_mem_attributes_minus_bitpos): Likewise.
* config/rs6000/rs6000.c (rs6000_check_sdmode): Remove
MISALIGNED_INDIRECT_REF handling.
From-SVN: r163915
|
|
2010-09-03 Richard Guenther <rguenther@suse.de>
* tree.def (TARGET_MEM_REF): Merge TMR_SYMBOL and TMR_BASE.
Move TMR_OFFSET to second operand. Add TMR_INDEX2.
* tree.h (TMR_SYMBOL): Remove.
(TMR_BASE, TMR_OFFSET): Adjust.
(TMR_INDEX2): New.
* alias.c (ao_ref_from_mem): Use TMR_BASE.
* builtins.c (get_object_alignment): Merge TMR_BASE and
TMR_SYMBOL handling.
* cfgexpand.c (expand_debug_expr): Use TMR_BASE.
* gimple.c (get_base_address): Merge MEM_REF and TARGET_MEM_REF
handling. Also allow TARGET_MEM_REF as base address.
(walk_stmt_load_store_addr_ops): TMR_BASE is always non-NULL.
* gimplify.c (gimplify_expr): Gimplify TMR_BASE like MEM_REF
base. Gimplify TMR_INDEX2.
* tree-cfg.c (verify_types_in_gimple_reference): Adjust.
* tree-dfa.c (get_ref_base_and_extent): Likewise.
(get_addr_base_and_unit_offset): Likewise.
* tree-eh.c (tree_could_trap_p): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-address.c (tree_mem_ref_addr): Simplify. Handle
TMR_INDEX2.
(create_mem_ref_raw): Merge symbol and base. Move 2ndary
base to index2.
(get_address_description): Reconstruct addres description
from merged TMR_BASE and TMR_INDEX2.
(maybe_fold_tmr): Fold propagated addresses.
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Merge
MEM_REF and TARGET_MEM_REF paths.
(indirect_refs_may_alias_p): Likewise.
* tree-ssa-live.c (mark_all_vars_used_1): Handle TMR_INDEX2
instead of TMR_SYMBOL.
* tree-ssa-operands.c (get_tmr_operands): Simplify.
* tree-ssa-pre.c (create_component_ref_by_pieces_1): Adjust
according to changes ...
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): ... here.
Split TARGET_MEM_REF into two fields plus the base.
* tree.c (mem_ref_offset): Simplify.
* tree-ssa-loop-im.c (for_each_index): Handle TMR_INDEX2.
* tree-ssa-loop-ivopts.c (find_interesting_uses_address): Likewise.
Strip NOPs when folding MEM_REF addresses.
* tree-ssa-sink.c (is_hidden_global_store): Handle TARGET_MEM_REF.
* gimple-fold.c (maybe_fold_reference): Fold TARGET_MEM_REF here ...
(fold_gimple_assign): ... not here.
From-SVN: r163802
|
|
2010-09-01 Richard Guenther <rguenther@suse.de>
* alias.c (ao_ref_from_mem): Adjust.
* builtins.c (get_object_alignment): Likewise.
* cfgexpand.c (expand_debug_expr): Likewise.
* gimple.c (get_base_address): Likewise.
* tree-dfa.c (get_ref_base_and_extent): Likewise.
(get_addr_base_and_unit_offset): Likewise. Fix for
both TMR_SYMBOL and TMR_BASE being set.
* tree-eh.c (tree_could_trap_p): Likewise.
* gimplify.c (gimplify_expr): Do not attempt to gimplify
TMR_SYMBOL. Always gimplify TMR_BASE.
* tree-cfg.c (verify_types_in_gimple_reference): Verify
TMR_BASE if there is a TMR_SYMBOL.
* tree-pretty-print.c (dump_generic_node): Adjust.
* tree-ssa-address.c (addr_for_mem_ref): Likewise.
(tree_mem_ref_addr): Likewise.
(create_mem_ref_raw): Likewise.
(move_fixed_address_to_symbol): Likewise.
(create_mem_ref): Likewise.
(dump_mem_address): Likewise.
* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Adjust.
Fix for both TMR_SYMBOL and TMR_BASE being set.
(indirect_refs_may_alias_p): Likewise.
* tree-ssa-operands.c (get_tmr_operands): Adjust.
* tree.def (TARGET_MEM_REF): Adjust documentation.
From-SVN: r163733
|
|
with -fshort-enums and va_arg)
PR middle-end/45461
* builtins.c (dummy_object): Return a MEM_REF instead of INDIRECT_REF.
* gcc.dg/pr45461.c: New test.
From-SVN: r163678
|
|
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
|
|
alias)
2010-08-30 Richard Guenther <rguenther@suse.de>
PR tree-optimization/21602
* builtins.c (fold_builtin_memory_op): Fold memmove to memcpy
using points-to information.
From-SVN: r163646
|