summaryrefslogtreecommitdiffstats
path: root/gcc/builtins.c
Commit message (Collapse)AuthorAgeFilesLines
* 2011-07-29 Richard Guenther <rguenther@suse.de>rguenth2011-07-291-2/+3
| | | | | | | | * builtins.c (fold_builtin_signbit): Build the comparison with a proper type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176922 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-07-20 Kai Tietz <ktietz@redhat.com>ktietz2011-07-201-12/+14
| | | | | | | | | * builtins.c (fold_builtin_expect): See through the cast from truthvalue_type_node to long. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176526 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2011-07-191-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/rtl.texi (MEM_OFFSET_KNOWN_P): Document. (MEM_OFFSET): Change from returning an rtx to returning a HOST_WIDE_INT. * rtl.h (MEM_OFFSET_KNOWN_P): New macro. (MEM_OFFSET): Return a HOST_WIDE_INT rather than an rtx. * emit-rtl.h (set_mem_offset): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_offset): Declare. * alias.c (ao_ref_from_mem): Adjust uses of MEM_OFFSET, using MEM_OFFSET_KNOWN_P to test whether the offset is known, and MEM_OFFSET to get a HOST_WIDE_INT offset. (nonoverlapping_memrefs_p): Likewise. Adjust calls to... (adjust_offset_for_component_ref): Take a bool "known_p" parameter and a HOST_WIDE_INT "offset" parameter. * builtins.c (get_memory_rtx): As for ao_ref_from_mem. Adjust calls to set_mem_offset, passing a HOST_WIDE_INT rather than an rtx. Use clear_mem_offset to clear the offset. * cfgcleanup.c (merge_memattrs): Likewise. * dwarf2out.c (tls_mem_loc_descriptor): Likewise. * function.c (assign_parm_find_stack_rtl): Likewise. (assign_parm_setup_stack): Likewise. * print-rtl.c (print_rtx): Likewise. * reload.c (find_reloads_subreg_address): Likewise. * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise. * var-tracking.c (INT_MEM_OFFSET): Likewise. * emit-rtl.c (set_reg_attrs_from_value): Likewise. (get_mem_align_offset): Likewise. (set_mem_offset): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_offset): New function. * config/mips/mips.c (r10k_safe_mem_expr_p): Take a HOST_WIDE_INT offset rather than an rtx. Assume both the expressio and offset are available. (r10k_needs_protection_p_1): Update accordingly, checking the expression and offset availability here instead. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176477 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2011-07-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/rtl.texi (MEM_SIZE_KNOWN_P): Document. (MEM_SIZE): Change from returning an rtx to returning a HOST_WIDE_INT. * rtl.h (MEM_SIZE_KNOWN_P): New macro. (MEM_SIZE): Return a HOST_WIDE_INT rather than an rtx. * emit-rtl.h (set_mem_size): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_size): Declare. * emit-rtl.c (set_mem_size): Take a HOST_WIDE_INT rather than an rtx. (clear_mem_size): New function. * alias.c (ao_ref_from_mem): Adjust uses of MEM_SIZE, using MEM_SIZE_KNOWN_P to test whether the size is known, and MEM_SIZE to get a HOST_WIDE_INT size. Adjust calls to set_mem_size, passing a HOST_WIDE_INT rather than an rtx. Use clear_mem_size to clear the size. (nonoverlapping_memrefs_p): Likewise. * builtins.c (get_memory_rtx, expand_builtin_memcmp): Likewise. (expand_builtin_init_trampoline): Likewise. * calls.c (compute_argument_addresses): Likewise. * cfgcleanup.c (merge_memattrs): Likewise. * dce.c (find_call_stack_args): Likewise. * dse.c (record_store, scan_insn): Likewise. * dwarf2out.c (dw_sra_loc_expr): Likewise. * expr.c (emit_block_move_hints): Likewise. * function.c (assign_parm_find_stack_rtl): Likewise. * print-rtl.c (print_rtx): Likewise. * reload.c (find_reloads_subreg_address): Likewise. * rtlanal.c (may_trap_p_1): Likewise. * var-tracking.c (track_expr_p): Likewise. * varasm.c (assemble_trampoline_template): Likewise. * config/arm/arm.c (arm_print_operand): Likewise. * config/h8300/h8300.c (h8sx_emit_movmd): Likewise. * config/i386/i386.c (expand_movmem_via_rep_mov): Likewise. (expand_setmem_via_rep_stos, expand_constant_movmem_prologue) (expand_constant_setmem_prologue): Likewise. * config/mips/mips.c (mips_get_unaligned_mem): Likewise. * config/rs6000/rs6000.c (expand_block_move): Likewise. (adjacent_mem_locations): Likewise. * config/s390/s390.c (s390_expand_setmem): Likewise. (s390_expand_insv): Likewise. * config/s390/s390.md (*extzv<mode>, *extv<mode>): Likewise. (*extendqi<mode>2_short_displ): Likewise. * config/sh/sh.c (expand_block_move): Likewise. * config/sh/sh.md (extv, extzv): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176476 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-07-19 Richard Guenther <rguenther@suse.de>rguenth2011-07-191-25/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tree.h (fold_build_pointer_plus_loc): New helper function. (fold_build_pointer_plus_hwi_loc): Likewise. (fold_build_pointer_plus): Define. (fold_build_pointer_plus_hwi): Likewise. * builtins.c (std_gimplify_va_arg_expr): Use fold_build_pointer_plus. (fold_builtin_memory_op): Likewise. (fold_builtin_stpcpy): Likewise. (fold_builtin_memchr): Likewise. (fold_builtin_strstr): Likewise. (fold_builtin_strchr): Likewise. (fold_builtin_strrchr): Likewise. (fold_builtin_strpbrk): Likewise. (fold_builtin_strcat): Likewise. (expand_builtin_memory_chk): Likewise. (fold_builtin_memory_chk): Likewise. * c-typeck.c (build_unary_op): Likewise. * cgraphunit.c (thunk_adjust): Likewise. * fold-const.c (build_range_check): Likewise. (fold_binary_loc): Likewise. * omp-low.c (extract_omp_for_data): Likewise. (expand_omp_for_generic): Likewise. (expand_omp_for_static_nochunk): Likewise. (expand_omp_for_static_chunk): Likewise. * tree-affine.c (add_elt_to_tree): Likewise. * tree-data-ref.c (split_constant_offset_1): Likewise. * tree-loop-distribution.c (generate_memset_zero): Likewise. * tree-mudflap.c (mf_xform_derefs_1): Likewise. * tree-predcom.c (ref_at_iteration): Likewise. * tree-ssa-address.c (tree_mem_ref_addr): Likewise. (add_to_parts): Likewise. (create_mem_ref): Likewise. * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise. * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Likewise. (number_of_iterations_le): Likewise. * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Likewise. * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise. (vect_create_addr_base_for_vector_ref): Likewise. * tree-vect-loop-manip.c (vect_update_ivs_after_vectorizer): Likewise. (vect_create_cond_for_alias_checks): Likewise. * tree-vrp.c (extract_range_from_assert): Likewise. * config/alpha/alpha.c (alpha_va_start): Likewise. (alpha_gimplify_va_arg_1): Likewise. * config/i386/i386.c (ix86_va_start): Likewise. (ix86_gimplify_va_arg): Likewise. * config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise. * config/mep/mep.c (mep_expand_va_start): Likewise. (mep_gimplify_va_arg_expr): Likewise. * config/mips/mips.c (mips_va_start): Likewise. (mips_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_va_start): Likewise. (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_va_start): Likewise. (s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_va_start): Likewise. (sh_gimplify_va_arg_expr): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_va_start): Likewise. (spu_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start): Likewise. (xstormy16_gimplify_va_arg_expr): Likewise. * config/xtensa/xtensa.c (xtensa_va_start): Likewise. (xtensa_gimplify_va_arg_expr): Likewise. c-family/ * c-common.c (pointer_int_sum): Use fold_build_pointer_plus. * c-omp.c (c_finish_omp_for): Likewise. cp/ * call.c (build_special_member_call): Use fold_build_pointer_plus. * class.c (build_base_path): Likewise. (convert_to_base_statically): Likewise. (dfs_accumulate_vtbl_inits): Likewise. * cp-gimplify.c (cxx_omp_clause_apply_fn): Likewise. * except.c (expand_start_catch_block): Likewise. * init.c (expand_virtual_init): Likewise. (build_new_1): Likewise. (build_vec_delete_1): Likewise. (build_vec_delete): Likewise. * rtti.c (build_headof): Likewise. (tinfo_base_init): Likewise. * typeck.c (get_member_function_from_ptrfunc): Likewise. (cp_build_addr_expr_1): Likewise. * typeck2.c (build_m_component_ref): Likewise. fortran/ * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus. (gfc_trans_string_copy): Likewise. * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise. * trans-types.c (gfc_get_array_descr_info): Likewise. * trans.c (gfc_build_array_ref): Likewise. java/ * builtins.c (static): Use fold_build_pointer_plus. * class.c (make_class_data): Likewise. (build_symbol_entry): Likewise. * except.c (build_exception_object_ref): Likewise. * expr.c (build_java_arrayaccess): Likewise. (build_field_ref): Likewise. (build_known_method_ref): Likewise. (build_invokevirtual): Likewise. objc/ * objc-next-runtime-abi-02.c (objc_v2_build_ivar_ref): Use fold_build_pointer_plus. (objc2_build_ehtype_initializer): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176461 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2011-06-291-3/+24
| | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175627 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtin-types.def (BT_FN_PTR_CONST_PTR_SIZE_VAR): New.jakub2011-06-271-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175541 138bc75d-0d04-0410-961f-82ee72b054a4
* cosmetic. Add sync_ to all the expand_builtin defines which do not match the ↵amacleod2011-06-211-116/+118
| | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175270 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/49489jakub2011-06-211-2/+24
| | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175265 138bc75d-0d04-0410-961f-82ee72b054a4
* libgcc/bernds2011-06-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175261 138bc75d-0d04-0410-961f-82ee72b054a4
* Properly expand strlen to Pmode.hjl2011-06-141-2/+9
| | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175034 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-06-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>wschmidt2011-06-061-472/+1
| | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174701 138bc75d-0d04-0410-961f-82ee72b054a4
* * function.h (struct stack_usage): Remove dynamic_alloc_count field.ebotcazou2011-06-021-29/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174564 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-23 Richard Guenther <rguenther@suse.de>rguenth2011-05-231-11/+7
| | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174065 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-29 Richard Guenther <rguenther@suse.de>rguenth2011-04-291-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173167 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-29 Richard Guenther <rguenther@suse.de>rguenth2011-04-291-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173157 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h (ALLOCA_FOR_VAR_P): Rename to CALL_ALLOCA_FOR_VAR_P.matz2011-04-151-1/+1
| | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172516 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-14 Richard Guenther <rguenther@suse.de>rguenth2011-04-141-6/+19
| | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172424 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (build_va_arg_indirect_ref): Usematz2011-03-311-1/+1
| | | | | | | build_simple_mem_ref_loc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171789 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2011-03-281-5/+6
| | | | | | | | | | 2011-03-28 Richard Sandiford <richard.sandiford@linaro.org> * builtins.c (expand_builtin_memset_args): Use gen_int_mode instead of GEN_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171632 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2011-03-241-2/+1
| | | | | | | | * builtins.c (expand_movstr): Fix endp == 1 adjustment after last commit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171397 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2011-03-231-98/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171341 138bc75d-0d04-0410-961f-82ee72b054a4
* PR tree-optimization/48129jakub2011-03-151-3/+2
| | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170985 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/47917jakub2011-03-141-1/+129
| | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170959 138bc75d-0d04-0410-961f-82ee72b054a4
* * explow.c (emit_stack_save): Remove 'after' parameter.rth2011-03-031-8/+8
| | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170663 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-02-02 Richard Guenther <rguenther@suse.de>rguenth2011-02-021-3/+4
| | | | | | | | | | PR tree-optimization/47566 * builtins.c (builtin_save_expr): No SAVE_EXPR for SSA_NAMEs. * gcc.dg/lto/20110201-1_0.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169518 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (c_readstr): Fix byte order if BYTES_BIG_ENDIAN !=pkoning2011-01-241-1/+1
| | | | | | WORDS_BIG_ENDIAN. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@169174 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (SLOW_UNALIGNED_ACCESS): Remove.jiez2010-12-281-3/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168293 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 42694: add checks to make sure sqrt is supportedmeissner2010-12-081-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167594 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.c (build_common_builtin_nodes): Do not initializehubicka2010-12-011-29/+0
| | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167342 138bc75d-0d04-0410-961f-82ee72b054a4
* * hwint.c: New. Extracted from toplev.c.jsm282010-11-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167301 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/46647jakub2010-11-261-2/+2
| | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167170 138bc75d-0d04-0410-961f-82ee72b054a4
* Properly cast integer constant char. hjl2010-11-251-2/+2
| | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167146 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/46534jakub2010-11-181-6/+19
| | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166918 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (expand_builtin_mathfn_2, expand_builtin_mathfn): Do nothubicka2010-11-171-1/+5
| | | | | | | expand errno setting variant when optimizing for size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166879 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (std_gimplify_va_arg_expr): Usefroydnj2010-11-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166803 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-11-04 Richard Guenther <rguenther@suse.de>rguenth2010-11-041-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166304 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-11-03 Richard Guenther <rguenther@suse.de>rguenth2010-11-031-2/+7
| | | | | | | | | | | PR middle-end/46251 * builtins.c (expand_builtin_sincos): Properly build MEM_REFs, not INDIRECT_REFs. * gcc.dg/pr46251.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166235 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/froydnj2010-11-031-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166227 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h (EXPR_LOC_OR_HERE): New macro.jason2010-11-011-4/+1
| | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166123 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-10-27 Steve Ellcey <sje@cup.hp.com>sje2010-10-271-2/+2
| | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@166021 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix PR 46041meissner2010-10-181-8/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165666 138bc75d-0d04-0410-961f-82ee72b054a4
* Add fma supportmeissner2010-10-151-0/+87
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165515 138bc75d-0d04-0410-961f-82ee72b054a4
* PR rtl-opt/33721rth2010-10-091-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165240 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (fold_call_stmt): Don't copy gimple call argumentsfroydnj2010-10-091-11/+5
| | | | | | | into a temporary array. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165213 138bc75d-0d04-0410-961f-82ee72b054a4
* * builtins.c (rewrite_call_expr): Move code to...froydnj2010-10-081-220/+107
| | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165146 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:jsm282010-09-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164723 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-09-17 Richard Guenther <rguenther@suse.de>rguenth2010-09-171-14/+35
| | | | | | | | | PR middle-end/45678 * builtins.c (fold_builtin_memory_op): Always properly adjust alignment of memory accesses. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164356 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/45567jakub2010-09-141-17/+18
| | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164274 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-09-06 Richard Guenther <rguenther@suse.de>rguenth2010-09-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163915 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud