aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
AgeCommit message (Collapse)AuthorFilesLines
2006-07-17re PR middle-end/28403 (Missed argument pop after doubleword shift)Richard Sandiford1-0/+2
gcc/ PR middle-end/28403 * optabs.c (expand_doubleword_shift): Wrap the call to do_compare_rtx_and_jump with NO_DEFER_POP and OK_DEFER_POP. gcc/testsuite/ PR middle-end/28403 * gcc.c-torture/execute/pr28403.c: New test. From-SVN: r115525
2006-07-17re PR middle-end/28402 (Doubleword shifts implemented using word_mode libcalls)Richard Sandiford1-1/+1
gcc/ PR middle-end/28402 * optabs.c (expand_binop): Pass next_methods rather than methods to expand_doubleword_shift. gcc/testsuite/ PR middle-end/28402 * gcc.dg/pr28402.c: New test. From-SVN: r115524
2006-07-16optabs.c (maybe_encapsulate_block): New function extracted from...Eric Botcazou1-28/+34
* optabs.c (maybe_encapsulate_block): New function extracted from... (emit_libcall_block): ...here. Invoke it on the block of insns to maybe emit REG_LIBCALL/REG_RETVAL notes around the block. (emit_no_conflict_block): Likewise. From-SVN: r115498
2006-05-28cfgcleanup.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* cfgcleanup.c, cfgexpand.c, cgraphunit.c, config/arm/arm.c, config/fr30/fr30.md, config/i386/i386-interix.h, config/i386/i386.c, config/i386/i386.md, config/sh/superh.h, config/sh/superh64.h, config/v850/v850.c, df-core.c, df-problems.c, df.h, except.c, final.c, haifa-sched.c, lambda-code.c, libgcc2.h, omp-low.c, optabs.c, predict.c, reload.c, tree-flow.h, tree-outof-ssa.c, tree-ssa-dce.c, tree-ssa-pre.c, tree-vect-transform.c: Fix comment typos. Follow spelling conventions. * doc/invoke.texi, doc/rtl.texi, doc/tm.texi: Fix typos. Follow spelling conventions. From-SVN: r114168
2006-04-08builtins.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* builtins.c, config/arm/arm.c, config/i386/cygwin.h, config/i386/i386.c, config/ia64/ia64.c, config/s390/fixdfdi.h, config/sh/sh.c, config/sh/sh.h, df-scan.c, except.c, haifa-sched.c, optabs.c, rtl.h, sched-deps.c, sched-int.h, sched-rgn.c, tree-inline.h, tree-ssa-dom.c, tree-ssa-loop-prefetch.c, tree-ssa-operands.c, tree-vect-patterns.c, tree-vrp.c: Fix comment typos. Follow spelling convensions. * config/ia64/ia64.opt, doc/contrib.texi, doc/invoke.texi, doc/passes.texi, doc/tm.texi, doc/tree-ssa.texi: Fix comment typos. Follow spelling conventions. From-SVN: r112782
2006-02-14optabs.c (expand_abs): Don't call do_jump_by_parts_greater_rtx directly...Roger Sayle1-9/+2
* optabs.c (expand_abs): Don't call do_jump_by_parts_greater_rtx directly, instead let do_compare_rtx_and_jump handle this for us. * expr.c (expand_expr_real_1): Likewise. * dojump.c (do_jump_by_parts_greater_rtx): Make static. Move before do_jump_by_parts_greater. (do_jump_by_parts_greater): Move after do_jump_by_parts_greater_rtx. * expr.h (do_jump_by_parts_greater_rtx): Delete prototype. From-SVN: r110954
2006-01-30optabs.c (prepare_cmp_insn): If unbaised and unsigned then bias the ↵Carlos O'Donell1-9/+15
comparison routine return. gcc/ 2006-01-30 Carlos O'Donell <carlos@codesourcery.com> * optabs.c (prepare_cmp_insn): If unbaised and unsigned then bias the comparison routine return. gcc/testsuite/ 2006-01-30 Carlos O'Donell <carlos@codesourcery.com> * gcc.dg/unsigned-long-compare.c: New test. From-SVN: r110409
2006-01-27rtl.texi (SYMBOL_REF_DATA): Adjust documentation for new opaque type.Richard Sandiford1-1/+1
* doc/rtl.texi (SYMBOL_REF_DATA): Adjust documentation for new opaque type. * optabs.c (init_one_libfunc): Use SET_SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Likewise. (force_const_mem): Use SET_SYMBOL_REF_CONSTANT. * rtl.h (rtunion_def): Remove rt_ptr. (X0PTR): Delete. (SYMBOL_REF_DATA): Use X0ANY instead of X0PTR. (SET_SYMBOL_REF_DECL, SET_SYMBOL_REF_CONSTANT): New macros. * config/i386/winnt.c (i386_pe_mark_dllexport) (i386_pe_mark_dllimport): Use SET_SYMBOL_REF_DECL. From-SVN: r110300
2006-01-25rtl.texi (SYMBOL_REF_CONSTANT, [...]): Document.Richard Sandiford1-1/+1
* doc/rtl.texi (SYMBOL_REF_CONSTANT, SYMBOL_REF_DATA): Document. * gengtype.c (adjust_field_rtx_def): Garbage-collect field 2 of a SYMBOL_REF as either a tree or a constant_descriptor_rtx, depending on the value of CONSTANT_POOL_ADDRESS_P. * optabs.c (init_one_libfunc): Nullify SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * varasm.c (make_decl_rtl, build_constant_desc): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (rtx_constant_pool): Remove const_rtx_sym_htab. (const_desc_rtx_sym_hash, const_desc_rtx_sym_eq): Delete. (init_varasm_status): Don't initialize const_rtx_sym_htab. (force_const_mem): Point SYMBOL_REF_DATA to the constant pool entry. Remove handling of const_rtx_sym_htab. (find_pool_constant): Delete. (get_pool_constant, get_pool_constant_mark): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. (get_pool_constant_for_function): Delete. (get_pool_mode, mark_constant): Use SYMBOL_REF_CONSTANT rather than find_pool_constant. * rtl.h (rtunion_def): Add rt_constant and rt_ptr fields. (X0CONSTANT, X0PTR, SYMBOL_REF_DATA): New macros. (SYMBOL_REF_DECL): Return NULL if CONSTANT_POOL_ADDRESS_P. (SYMBOL_REF_CONSTANT): New macro. (get_pool_constant_for_function): Delete. * config/i386/winnt.c (i386_pe_mark_dllexport): Set SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. (i386_pe_mark_dllimport): Likewise. * config/rs6000/rs6000.c (rs6000_emit_move): Copy SYMBOL_REF_DATA rather than SYMBOL_REF_DECL. * config/darwin.c (machopic_indirect_data_reference): Likewise. (machopic_indirect_call_target): Likewise. From-SVN: r110210
2006-01-20loop-iv.c: Include df.h and hashtab.h.Zdenek Dvorak1-1/+1
* loop-iv.c: Include df.h and hashtab.h. (enum iv_grd_result): New enum. (DF_REF_IV, DF_REF_IV_SET): New macros. (struct biv_entry): New. (df, bivs): New global variables. (struct insn_info, insn_info, last_def, bivs, max_insn_no, max_reg_no, assign_luids, mark_sets, kill_sets, mark_single_set, simple_set_p): Removed. (clear_iv_info, latch_dominating_def, record_iv, iv_analyze_expr, iv_analyze_result, iv_analyze_def, biv_hash, biv_eq, analyzed_for_bivness_p, record_biv): New functions. (iv_analysis_loop_init, iv_get_reaching_def, simple_reg_p, get_biv_step_1, get_biv_step, iv_analyze_biv, iv_analyze_op, iv_analyze, biv_p, iv_analysis_done): Work with df representation of UD chains. (iv_constant, iv_subreg, iv_extend, iv_mult, iv_shift): Do not set analysed. (iv_number_of_iterations): Use new interface to iv analysis. * loop-unroll.c: Do not include varray.h. (analyze_iv_to_split_insn): Use new interface to iv analysis. * loop-unswitch.c (may_unswitch_on): Ditto. * df.c (df_bitmaps_free): Only work for bbs for that structures are allocated. (df_bb_modify): Realloc tables to the new index. (df_find_use): New function. * df.h (df_find_use): Declare. * optabs.c (expand_unop): Make the mode of the REG_EQUAL node be outmode. * cfgloop.h (struct rtx_iv): Remove analysed field. (iv_get_reaching_def): Removed. (iv_analyze_result, iv_analyze_expr, iv_current_loop_df): Declare. * Makefile.in (loop-unroll.o): Remove VARRAY_H dependency. (loop-iv.o): Add df.h and hashtab.h dependency. * df-problems.c (df_ru_alloc, df_rd_alloc): Fix memory reallocation. From-SVN: r110005
2006-01-19Makefile.in (tree-vect-patterns.o): Add rule for new file.Dorit Nuzman1-0/+159
* Makefile.in (tree-vect-patterns.o): Add rule for new file. * tree-vect-analyze.c (vect_determine_vectorization_factor): Use existing STMT_VINFO_VECTYPE if available. (vect_mark_relevant): Add special handling for stmts that are marked as STMT_VINFO_IN_PATTERN_P. (vect_analyze_loop): Call vect_pattern_recog. * tree-vectorizer.c (new_stmt_vec_info): Initialize new fields. * tree-vectorizer.h (in_pattern_p, related_stmt): New fields in stmt_info. (STMT_VINFO_IN_PATTERN_P, STMT_VINFO_RELATED_STMT): New macros. (vect_recog_func_ptr): New function-pointer type. * tree-vect-patterns.c: New file. (vect_recog_widen_sum_pattern, vect_recog_widen_mult_pattern): (vect_recog_dot_prod_pattern, vect_pattern_recog): (vect_pattern_recog_1): New functions. (vect_pattern_recog_funcs): New array of function pointers. * tree-vectorizer.h (ternary_op): New enum value. * tree-vect-transform.c (vect_create_epilog_for_reduction): Added declaration. Revised documentation. Removed redundant dump prints. Removed redundant argument. Added support for reduction patterns. (vectorizable_reduction): Added support for reduction patterns. (vect_transform_stmt): Added support for patterns. * expr.c (expand_expr_real_1): Added case for DOT_PROD_EXPR. * genopinit.c (udot_prod_optab, sdot_prod_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for DOT_PROD_EXPR. (expand_widen_pattern_expr): New function. (init_optabs): Initialize new optabs udot_prod_optab, sdot_prod_optab. * optabs.h (OTI_sdot_prod, OTI_udot_prod): New. (sdot_prod_optab, udot_prod_optab): Define new optabs. (expand_widen_pattern_expr): New function declaration. * tree.def (DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Added cases for new tree-codes DOT_PROD_EXPR, WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-pretty-print.c (dump_generic_node): Likewise. (op_prio): Likewise. (op_symbol): Added cases for WIDEN_SUM_EXPR, WIDEN_MULT_EXPR. * tree-ssa-operands.c (get_expr_operands): Added case for DOT_PROD_EXPR. * tree-vect-patterns.c (widened_name_p): New function. (vect_recog_dot_prod_pattern): Added function implementation. * tree-vect-transform.c (get_initial_def_for_reduction): Added cases for DOT_PROD_EXPR, WIDEN_SUM_EXPR. * config/rs6000/altivec.md (udot_prod<mode>, sdot_prodv8hi): New. * config/i386/sse.md (sdot_prodv8hi, udot_prodv4si): New. * expr.c (expand_expr_real_1): Added case for WIDEN_SUM_EXPR. * genopinit.c (widen_ssum_optab, widen_usum_optab): Initialize. * optabs.c (optab_for_tree_code): Added case for WIDEN_SUM_EXPR. (init_optabs): Initialize new optabs widen_ssum_optab, widen_usum_optab. * optabs.h (OTI_widen_ssum, OTI_widen_usum): New. (widen_ssum_optab, widen_usum_optab): Define new optabs. * tree-vect-generic.c: (expand_vector_operations_1): Check type of use instead of type of def. * tree-vect-patterns.c (vect_recog_widen_sum_pattern): Added function implementation. * config/rs6000/altivec.md (widen_usum<mode>, widen_ssumv16qi, widen_ssumv8hi): New. * doc/tm.texi (ssum_widen, usum_widen, sdot_prod, udot_prod): New patterns. From-SVN: r109954
2006-01-08- Fix up date in ChangeLog. Update copyrights in changed files.Ian Lance Taylor1-1/+1
Co-Authored-By: David Edelsohn <edelsohn@gnu.org> From-SVN: r109475
2006-01-07re PR target/25662 (Unrecognizable insn with -O on PPC)Ian Lance Taylor1-3/+8
2005-01-07 Ian Lance Taylor <ian@airs.com> David Edelsohn <edelsohn@gnu.org> PR rtl-optimization/25662 * optabs.c (simplify_expand_binop): Use simplify_binary_operation for constant operands instead of simplify_gen_binary. * simplify-rtx.c (simplify_gen_binary): Swap commutative operands after trying simplify_binary_operation Co-Authored-By: David Edelsohn <edelsohn@gnu.org> From-SVN: r109456
2005-12-19optabs.c (init_floating_libfuncs): Handle decimal float modes.Jon Grimm1-3/+22
* optabs.c (init_floating_libfuncs): Handle decimal float modes. (init_optabs): Handle libfuncs for decimal float. * genopinit.c (gen_insn): Handle MODE_DECIMAL_FLOAT. * stor-layout.c (int_mode_for_mode): Likewise. * simplify-rtx.c (simplify_immed_subreg): Likewise. (simplify_unary_operation_1): Skip optimisations for decimal float modes. * varasm.c (output_constant_pool_2): Handle MODE_DECIMAL_FLOAT. * emit-rtl.c (gen_const_vector): Add assertion check. (init_emit_once): Populate const_tiny_rtx with constants in each decimal float mode. * expmed.c (extract_high_half, expand_mult_highpart_optab, expand_mult_highpart): Assert that mode is not a scalar float mode. * expr.c (convert_move): Handle conversion between decimal and binary floats of the same size. * convert.c (convert_to_real): Consider decimal float types when folding. * dwarf2out.c (base_type_die): Use DW_ATE_decimal_float to describe decimal floating point types. Co-Authored-By: Ben Elliston <bje@au.ibm.com> Co-Authored-By: Janis Johnson <janis187@us.ibm.com> From-SVN: r108762
2005-12-16re PR rtl-optimization/23837 (Wrong code with REG_NO_CONFLICT notes (caused ↵Steven Bosscher1-15/+7
by combine)) PR rtl-optimization/23837 * optabs.c (expand_binop): For a multi-word rotate, never emit a REG_NO_CONFLICT block. From-SVN: r108690
2005-12-01* optabs.c (expand_vec_cond_expr): Use EXPAND_NORMAL.Richard Henderson1-2/+2
From-SVN: r107834
2005-11-24re PR target/21623 (ICE in reload_cse_simplify_operands, at postreload.c:391)J"orn Rennecke1-2/+0
PR target/21623: * regclass.c (FORBIDDEN_INC_DEC_CLASSES): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. (init_fake_stack_mems): Remove HAVE_SECONDARY_RELOADS test. (memory_move_secondary_cost, init_reg_autoinc): Remove SECONDARY_INPUT_RELOAD_CLASS / SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. (copy_cost): Likewise. Add new parameter prev_sri. Changed all callers. * reload.c (entire file): Remove HAVE_SECONDARY_RELOADS checks. (push_secondary_reload): Use secondary_reload target hook. (secondary_reload_class, scratch_reload_class): New functions. (push_reload): Remove SECONDARY_INPUT_RELOAD_CLASS and SECONDARY_OUTPUT_RELOAD_CLASS tests. Replace SECONDARY_{IN,OUT}PUT_RELOAD_CLASS use with secondary_reload_class call. * reload.h (HAVE_SECONDARY_RELOADS): Don't define nor test. (secondary_reload_class, scratch_reload_class): Declare. * reload1.c: Include target.h. (reload_adjust_reg_for_temp): New function. (reload_adjust_reg_for_icode): Likewise. (choose_reload_regs): Remove SECONDARY_INPUT_RELOAD_CLASS test. Replace SECONDARY_INPUT_RELOAD_CLASS use with secondary_reload_class call. (emit_input_reload_insns): Likewise. Rewrite secondary reload checks for inheritance. Support case when both secondary & tertiary reloads are for intermediate registers. (emit_output_reload_insns): Replace SECONDARY_OUTPUT_RELOAD_CLASS use with secondary_reload_class call. Support case when both secondary & tertiary reloads are for intermediate registers. * target-def.h (TARGET_SECONDARY_RELOAD): Provide default definition. (TARGET_INITIALIZER) Add TARGET_SECONDARY_RELOAD. * target.h (secondary_reload_info): New struct / typedef. (struct gcc_target): New member secondary_reload. * targhooks.c Include reload.h, optabs.h and recog.h. (default_secondary_reload): New function. * targhooks.h (default_secondary_reload): Declare. * doc/tm.texi: Document secondary_reload target hook. Update description of SECONDARY_*RELOAD_CLASS and reload_{in,out}<mode>. * doc/md.texi: Likewise. * sh-protos.h (sh_secondary_reload): Declare. * sh.c (TARGET_SECONDARY_RELOAD): Override. (sh_secondary_reload): New function. * sh.h (SECONDARY_INOUT_RELOAD_CLASS): Don't define. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (SECONDARY_INPUT_RELOAD_CLASS): Likewise. (HAVE_SECONDARY_RELOADS): Define. * sh.md (reload_indf): Rename to: (reload_indf__frn). (reload_outdf): Rename to: (reload_outdf__RnFRm). (reload_insf): Rename to: (reload_insf__frn). (reload_insi): Rename to: (reload_insi__i_fpul). From-SVN: r107468
2005-11-24optabs.c (expand_binop): Use swap_commutative_operands_with_target to order ↵Paolo Bonzini1-6/+25
operands. 2005-11-24 Paolo Bonzini <bonzini@gnu.org> * optabs.c (expand_binop): Use swap_commutative_operands_with_target to order operands. (swap_commutative_operands_with_target): New. From-SVN: r107457
2005-11-24machmode.h (CLASS_HAS_WIDER_MODES_P): New macro.Ben Elliston1-19/+28
* machmode.h (CLASS_HAS_WIDER_MODES_P): New macro. * optabs.c (expand_binop): Use CLASS_HAS_WIDER_MODES_P, improve formatting. (expand_twoval_unop): Likewise. (widen_clz): Likewise. (expand_parity): Likewise. (expand_unop): Likewise. (emit_cmp_and_jmp_insn_1): Likewise. (prepare_float_lib_cmp): Likewise. From-SVN: r107450
2005-11-24optabs.c (prepare_cmp_insn): Use SCALAR_FLOAT_MODE_P.Ben Elliston1-4/+1
* optabs.c (prepare_cmp_insn): Use SCALAR_FLOAT_MODE_P. Remove unused `class' variable. From-SVN: r107449
2005-11-22optabs.c (expand_unop): Call SCALAR_FLOAT_MODE_P on a mode, not a mode_class.Ian Lance Taylor1-2/+2
* optabs.c (expand_unop): Call SCALAR_FLOAT_MODE_P on a mode, not a mode_class. (prepare_cmp_insn): Likewise. From-SVN: r107375
2005-11-22optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing ↵Ben Elliston1-2/+2
GET_MODE_CLASS (x) ==... * optabs.c: Use SCALAR_FLOAT_MODE_P instead of explicitly testing GET_MODE_CLASS (x) == MODE_FLOAT. * config/i386/i386.c: Likewise. * config/rs6000/xcoff.h: Likewise. * config/rs6000/linux64.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/rs6000/rs6000.h: Likewise. * config/rs6000/predicates.md: Likewise. * config/rs6000/sysv4.h: Likewise. From-SVN: r107348
2005-11-22fp-bit.c (clzusi): New function.Joseph Myers1-3/+12
* config/fp-bit.c (clzusi): New function. (si_to_float, usi_to_float): Use it to compute proper shift. (usi_to_float): Preserve guard bits when shifting right. * libgcc-std.ver (GCC_4.2.0): New version. * libgcc2.c (__floatundixf, __floatunditf, __floatundidf, __floatundisf): New functions. * libgcc2.h (__floatundixf, __floatunditf, __floatundidf, __floatundisf): Declare. * mklibgcc.in (lib2funcs): Add _floatundidf, _floatundisf, _floatundixf, and _floatunditf. * optabs.c (expand_float): If target does not define a pattern for signed or unsigned conversion, use an unsigned libcall instead of a signed one. (init_optabs): Initialize ufloat_optab. testsuite: * gcc.c-torture/execute/floatunsisf-1.c: New test. From-SVN: r107345
2005-11-22optabs.c (expand_abs_nojump): Use SCALAR_FLOAT_MODE_P instead of explicitly ↵Ben Elliston1-1/+1
testing GET_MODE_CLASS (x) ==... * optabs.c (expand_abs_nojump): Use SCALAR_FLOAT_MODE_P instead of explicitly testing GET_MODE_CLASS (x) == MODE_FLOAT. * genopinit.c (gen_insn): Likewise. * reload.c (find_equiv_reg): Likewise. * loop.c (load_mems): Likewise. * rtlanal.c (may_trap_p_1, canonicalize_condition): Likewise. * cse.c (find_comparison_args, fold_rtx): Likewise. * dwarf2out.c (add_const_value_attribute): Likewise. * expr.c (convert_move): Likewise. * recog.c (general_operand, register_operand): Likewise. * reg-stack.c (replace_reg): Likewise. * tree-vect-generic.c (type_for_widest_vector_mode): Likewise. * c-common.c (handle_vector_size_attribute): Likewise. * simplify-rtx.c (simplify_const_unary_operation): Likewise. (simplify_binary_operation_1): Likewise. (simplify_const_binary_operation): Likewise. (simplify_relational_operation): Likewise. (simplify_const_relational_operation): Likewise. (simplify_immed_subreg): Likewise. * emit-rtl.c (gen_lowpart_common): Likewise. * expmed.c (expand_mult): Likewise. * stor-layout.c (layout_type): Likewise. From-SVN: r107322
2005-11-20expr.c (expand_expr_real): Use usmul_optab for widening signed * unsigned ↵Bernd Schmidt1-0/+1
multiplies. * expr.c (expand_expr_real): Use usmul_optab for widening signed * unsigned multiplies. * genopinit.c (optabs): Add usmul_widen_optab. * optabs.c (init_optabs): Likewise. * optabs.h (enum optab_index): Add OTI_usmul_widen. (usmul_widen_optab): Define. * config/bfin/bfin.md (usmulhisi3): New pattern. * doc/md.texi (usmulqihi3, usmulhisi3, usmulsidi3): Document. From-SVN: r107258
2005-10-31optabs.c (expand_unop): Take TRULY_NOOP_TRUNCATION into account.J"orn Rennecke1-1/+3
2005-10-31 J"orn Rennecke <joern.rennecke@st.com> * optabs.c (expand_unop): Take TRULY_NOOP_TRUNCATION into account. From-SVN: r106271
2005-09-29* optabs.c (expand_binop): Initialize first_pass_p.Mark Mitchell1-1/+1
From-SVN: r104798
2005-09-29Revert this patch:Paolo Bonzini1-24/+11
2005-09-15 Paolo Bonzini <bonzini@gnu.org> * optabs.c (expand_binop): Use swap_commutative_operands_with_target to order operands. (swap_commutative_operands_with_target): New. From-SVN: r104775
2005-09-29re PR middle-end/17886 (variable rotate and unsigned long long rotate should ↵Mark Mitchell1-0/+19
be better optimized) PR 17886 * expmed.c (expand_shift): Move logic to reverse rotation direction when rotating by constants ... * optabs.c (expand_binop): ... here. * config/i386/i386.md (rotrdi3): Handle 32-bit mode. (ix86_rotrdi3): New pattern. (rotldi3): Handle 32-bit mode. (ix86_rotldi3): New pattern. From-SVN: r104761
2005-09-27optabs.c (no_conflict_move_test): Check if a result of a to-be-moved insn ↵J"orn Rennecke1-2/+8
would be clobbered by an originally... * optabs.c (no_conflict_move_test): Check if a result of a to-be-moved insn would be clobbered by an originally preceding insn. From-SVN: r104709
2005-09-23optabs.c (emit_libcall_block): Use no_conflict_move_test.J"orn Rennecke1-17/+22
* optabs.c (emit_libcall_block): Use no_conflict_move_test. (no_conflict_move_test): Update comments. From-SVN: r104563
2005-09-23re PR rtl-optimization/23837 (Wrong code with REG_NO_CONFLICT notes (caused ↵J"orn Rennecke1-1/+2
by combine)) PR rtl-optimization/23837 * optabs.c (no_conflict_move_test): Don't set must_stay for a clobber / clobber match between dest and p->first. From-SVN: r104562
2005-09-15optabs.c (expand_binop): Use swap_commutative_operands_with_target to order ↵Paolo Bonzini1-11/+24
operands. 2005-09-15 Paolo Bonzini <bonzini@gnu.org> * optabs.c (expand_binop): Use swap_commutative_operands_with_target to order operands. (swap_commutative_operands_with_target): New. From-SVN: r104324
2005-08-19optabs.h: Change CTI_ to COI_.Eric Christopher1-31/+31
2005-08-19 Eric Christopher <echristo@apple.com> * optabs.h: Change CTI_ to COI_. * optabs.c: Ditto. From-SVN: r103295
2005-08-16re PR middle-end/20396 (TRULY_NOOP_TRUNCATION ignored)J"orn Rennecke1-3/+9
2005-08-16 J"orn Rennecke <joern.rennecke@st.com> Richard Shann <rshann@superh.com> PR middle-end/20396: * optabs.c (expand_binop): Take TRULY_NOOP_TRUNCATION into account. Co-Authored-By: Richard Shann <rshann@superh.com> From-SVN: r103153
2005-07-29expr.c (expand_expr_real_1): Do not load mem targets into register.Jan Hubicka1-1/+1
* expr.c (expand_expr_real_1): Do not load mem targets into register. * i386.c (ix86_fixup_binary_operands): Likewise. (ix86_expand_unary_operator): Likewise. (ix86_expand_fp_absneg_operator): Likewise. * optabs.c (expand_vec_cond_expr): Validate dest. From-SVN: r102570
2005-07-12builtins.c: (expand_builtin_memcmp, expand_builtin_strncmp): ↵Adrian Straetling1-0/+3
s/cmpstrsi/cmpstrnsi 2005-07-12 Adrian Straetling <straetling@de.ibm.com> * builtins.c: (expand_builtin_memcmp, expand_builtin_strncmp): s/cmpstrsi/cmpstrnsi (expand_builtin_strcmp): Rewrite to support both 'cmpstrsi' and 'cmpstrnsi'. * optabs.c: (prepare_cmp_insn): Add availability of 'cmpstrn'. (init_optabs): Initialize cmpstrn_optab. * optabs.h: (enum insn_code cmpstrn_optab): Declare. * genopinit.c: (optabs[]): Add 'cmpstrn' to initialisation. * expr.c: (enum insn_code cmpstrn_optab): Declare. * config/i386/i386.md: s/cmpstr/cmpstrn * config/c4x/c4x.md: s/cmpstr/cmpstrn * doc/md.texi: Update documentation. From-SVN: r101916
2005-07-06Removal of -fforce-mem.Fariborz Jahanian1-74/+1
OKed by Richard Henderson. From-SVN: r101666
2005-06-28builtins.c: (expand_builtin_memset): Rewrite to support ↵Adrian Straetling1-1/+1
'set_storage_via_setmem'. 2006-06-28 Adrian Straetling <straetling@de.ibm.com> * builtins.c: (expand_builtin_memset): Rewrite to support 'set_storage_via_setmem'. * expr.c: (enum insn_code setmem_optab): Define. (enum insn_code clrmem_optab): Remove. (set_storage_via_setmem): New function. (clear_storage_via_setmem): Remove. (clear_storage): Replace call to "clear_storage_via_clrmem" with "set_storage_via_setmem". * expr.h: (set_storage_via_setmem): Declare. (CLEAR_RATIO): Redefine using HAVE_setmemM. * optabs.h: (enum insn_code setmem_optab): Declare. (enum insn_code clrmem_optab): Remove. * optabs.c: (init_optabs): Initialize setmem_optab. (enum insn_code clrmem_optab): Remove. * genopinit.c: (otabs): Likewise. * doc/md.texi: Document new standard pattern 'setmem'. Remove 'clrmem'. * config/alpha/alpha.c: (alpha_expand_block_clear): Adjust 'operands' ordering. * config/frv/frv.c: (frv_expand_block_clear): Likewise. * config/rs6000/rs6000.c: (expand_block_clear): Likewise. * config/alpha/alpha.md: ("clrmemqi", "clrmemdi"): Rename to "setmemM". FAIL on operands[2]!=const0_rtx. Adjust 'operands' ordering. * config/avr/avr.md: ("clrmemhi"): Likewise. * config/frv/frv.md: ("clrmemsi"): Likewise. * config/i386/i386.md: ("clrmemsi", "clrmemdi"): Likewise. * config/pa/pa.md: ("clrmemsi", "clrmemdi"): Likewise. * config/rs6000/rs6000.md: ("clrmemsi"): Likewise. * config/s390/s390.md: ("clrmem<mode>"): Likewise. From-SVN: r101386
2005-06-28Makefile.in: Set and use UNWIND_H.Paul Brook1-3/+0
2005-06-28 Paul Brook <paul@codesourcery.com> gcc/ * Makefile.in: Set and use UNWIND_H. Install as unwind.h. * c-decl.c (finish_decl): Call default_init_unwind_resume_libfunc. * except.c (add_ehspec_entry): Generate arm eabi filter lists. (assign_filter_values): Ditto. (output_ttype): New function. (output_function_exception_table): Use output_ttype. Generate arm eabi filter lists. (default_init_unwind_resume_libfunc): New function. * except.h (default_init_unwind_resume_libfunc): Add prototype. * optabs.c (init_optabs): Don't set unwind_resume_libfunc. * opts.c (decode_options): Use targetm.unwind_tables_default. * target-def.h (TARGET_ASM_TTYPE): Provide and use definition. (TARGET_ARM_EABI_UNWINDER, TARGET_UNWIND_TABLES_DEFAULT): Ditto. * target.h (struct gcc_target): Add asm.ttype, unwind_tables_default and arm_eabi_unwinder. * unwind-c.c: Support Arm EABI unwinder. * unwind.h: Rename ... * unwind-generic.h: ... To this. * doc/tm.texi (TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Document. (TARGET_UNWID_TABLES_DEFAULT): Document. * config/arm/arm-protos.h (arm_output_fn_unwind): Add prototype. * config/arm/arm.c (arm_unwind_emit, arm_output_ttype): New functions. (TARGET_UNWIND_EMIT, TARGET_ASM_TTYPE, TARGET_ARM_EABI_UNWINDER): Define. (thumb_pushpop, thumb_output_function_prologue): Output unwinding directives. (arm_unwind_emit_stm, arm_unwind_emit_set): New functions. * config/arm/arm.h (MUST_USE_SJLJ_EXCEPTIONS): Only define when !TARGET_UNWIND_INFO. (ARM_OUTPUT_FN_UNWIND, ARM_EABI_UNWIND_TABLES): Define. * config/arm/bpabi.h (TARGET_UNWIND_INFO): Define. * config/arm/elf.h (ASM_DECLARE_FUNCTION_NAME, ASM_DECLARE_FUNCTION_SIZE): Use ARM_OUTPUT_FN_UNWIND. * config/arm/lib1funcs.asm: Include libunwind.S. * config/arm/libgcc-bpabi.ver: Add unwinding routines. * config/arm/libunwind.S: New file. * config/arm/pr-support.c: New file. * config/arm/t-bpabi (LIB1ASMFUNCS): Add _unwind. (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set. * config/arm/t-symbian (UNWIND_H, LIB2ADDEH, LIB2ADDEHDEP): Set. * config/arm/unwind-arm.c: New file. * config/arm/unwind-arm.h: New file. * config/i386/t-netware (USER_H): Remove unwind.h. * config/ia64/ia64.h (TARGET_UNWIND_TABLES_DEFAULT): Define. gcc/cp/ * Make-lang.in (cp/except.o): Depend on $(TARGET_H) * except.c: Include target.h. (init_exception_processing): Initialize unwind_resume_libfunc. * doc/tm.texi: Document TARGET_ASM_TTYPE gcc/ada/ * misc.c (gnat_init_gcc_eh): Call default_init_unwind_resume_libfunc. gcc/java/ * decl.c (java_init_decl_processing): Call default_init_unwind_resume_libfunc. gcc/objc/ * objc-act.c (objc_init_exceptions): Call default_init_unwind_resume_libfunc. libstdc++/ * acinclude.m4 (GLIBCXX_ENABLE_SJLJ_EXCEPTIONS): Check for __cxa_end_cleanup. * libsupc++/Makefile.am (sources): Add eh_call.c and eh_arm.c. * libsupc++/eh_arm.cc: New file. * libsupc++/eh_call.cc: New file. * libsupc++/eh_catch.cc (__cxa_get_exception_ptr): Use __gxx_caught_object. (__cxa_begin_catch): Ditto. Use __is_gxx_exception_class. Call _Unwind_Complete when using the ARM EABI. (__cxa_end_catch): Use __is_gxx_exception_class. * libsupc++/eh_personality.cc: Define NO_SIZE_OF_ENCODED_VALUE when using the ARM EABI. (save_caught_exception, restore_caught_exception): New functions. (_throw_typet): New typedef. (get_ttype_entry, get_adjusted_ptr, check_exception_spec): Add ARM EABI implementations. (PERSONALITY_FUNCTION): Use new functions. Addd support for ARM EABI unwinding libary. (__cxa_unexpected): Disable when using the ARM EABI. * libsupc++/eh_throw.cc (__cxa_throw): Use __GXX_INIT_EXCEPTION_CLASS. (__cxa_rethrow): Use __is_gxx_exception_class. Call _Unwind_RaiseException when using the ARM EABI. * libsupc++/unwind-cxx.h (struct __cxa_exception): Add fields for ARM EABI semantics. (struct __cxa_eh_globals): Ditto. (__cxa_call_terminate): Add prototype. (__cxa_type_match, __cxa_begin_cleanup, __cxa_end_cleanup): Add prototypes. (__get_exception_header_from_obj, __get_exception_header_from_ue): Move earlier in file. (__is_gxx_exception_class, __GXX_INIT_EXCEPTION_CLASS, __gxx_caught_object): New functions. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libmath/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * src/Makefie.in: Regenerate. * testsuite/makefile.in: Regenerate. From-SVN: r101385
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-21genopinit.c (vec_shl_optab, [...]): Initialize new optabs.Dorit Nuzman1-2/+66
* genopinit.c (vec_shl_optab, vec_shr_optab): Initialize new optabs. (reduc_plus_optab): Removed. Replcaed with... (reduc_splus_optab, reduc_uplus_optab): Initialize new optabs. * optabs.c (optab_for_tree_code): Return reduc_splus_optab or reduc_uplus_optab instead of reduc_plus_optab. (expand_vec_shift_expr): New function. (init_optabs): Initialize new optabs. Remove initialization of reduc_plus_optab. (optab_for_tree_code): Return vec_shl_optab/vec_shr_optab for VEC_LSHIFT_EXPR/VEC_RSHIFT_EXPR. * optabs.h (OTI_reduc_plus): Removed. Replaced with... (OTI_reduc_splus, OTI_reduc_uplus): New. (reduc_plus_optab): Removed. Replcaed with... (reduc_splus_optab, reduc_uplus_optab): New optabs. (vec_shl_optab, vec_shr_optab): New optabs. (expand_vec_shift_expr): New function declaration. * tree.def (VEC_LSHIFT_EXPR, VEC_RSHIFT_EXPR): New tree-codes. * tree-inline.c (estimate_num_insns_1): Handle new tree-codes. * expr.c (expand_expr_real_1): Handle new tree-codes. * tree-pretty-print.c (dump_generic_node, op_symbol, op_prio): Likewise. * tree-vect-generic.c (expand_vector_operations_1): Add assert. * tree-vect-transform.c (vect_create_epilog_for_reduction): Add two alternatives for generating reduction epilog code. (vectorizable_reduction): Don't fail of direct reduction support is not available. (vectorizable_target_reduction_pattern): Likewise. * config/rs6000/altivec.md (reduc_smax_v4si, reduc_smax_v4sf, reduc_umax_v4si, reduc_smin_v4si, reduc_smin_v4sf, reduc_umin_v4si, reduc_plus_v4si, reduc_plus_v4sf): Removed. (vec_shl_<mode>, vec_shr_<mode>, altivec_vsumsws_nomode, reduc_splus_<mode>, reduc_uplus_v16qi): New. From-SVN: r101231
2005-06-18tree.def (REDUC_MAX_EXPR, [...]): New tree-codes.Dorit Nuzman1-0/+15
* tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): New tree-codes. * optabs.h (OTI_reduc_smax, OTI_reduc_umax, OTI_reduc_smin, OTI_reduc_umin, OTI_reduc_plus): New optabs for reduction. (reduc_smax_optab, reduc_umax_optab, reduc_smin_optab, reduc_umin_optab, reduc_plus_optab): New optabs for reduction. * expr.c (expand_expr_real_1): Handle new tree-codes. * tree-inline.c (estimate_num_insns_1): Handle new tree-codes. * tree-pretty-print.c (dump_generic_node, op_prio, op_symbol): Handle new tree-codes. * optabs.c (optab_for_tree_code): Handle new tree-codes. (init_optabs): Initialize new optabs. * genopinit.c (optabs): Define handlers for new optabs. * tree-vect-analyze.c (vect_analyze_operations): Fail vectorization in case of a phi that is marked as relevant. Call vectorizable_reduction. (vect_mark_relevant): Phis may be marked as relevant. (vect_mark_stmts_to_be_vectorized): The use corresponding to the reduction variable in a reduction stmt does not mark its defining phi as relevant. Update documentation accordingly. (vect_can_advance_ivs_p): Skip reduction phis. * tree-vect-transform.c (vect_get_vec_def_for_operand): Takes additional argument. Handle reduction. (vect_create_destination_var): Update call to vect_get_new_vect_var. Handle non-vector argument. (get_initial_def_for_reduction): New function. (vect_create_epilog_for_reduction): New function. (vectorizable_reduction): New function. (vect_get_new_vect_var): Handle new vect_var_kind. (vectorizable_assignment, vectorizable_operation, vectorizable_store, vectorizable_condition): Update call to vect_get_new_vect_var. (vect_transform_stmt): Call vectorizable_reduction. (vect_update_ivs_after_vectorizer): Skip reduction phis. (vect_transform_loop): Skip if stmt is both not relevant and not live. * tree-vectorizer.c (reduction_code_for_scalar_code): New function. (vect_is_simple_reduction): Was empty - added implementation. * tree-vectorizer.h (vect_scalar_var): New enum vect_var_kind value. (reduc_vec_info_type): New enum vect_def_type value. * config/rs6000/altivec.md (reduc_smax_v4si, reduc_smax_v4sf, reduc_umax_v4si, reduc_smin_v4si, reduc_umin_v4sf, reduc_smin_v4sf, reduc_plus_v4si, reduc_plus_v4sf): New define_expands. * tree-vect-analyze.c (vect_determine_vectorization_factor): Remove ENABLE_CHECKING around gcc_assert. * tree-vect-transform.c (vect_do_peeling_for_loop_bound, (vect_do_peeling_for_alignment, vect_transform_loop, vect_get_vec_def_for_operand): Likewise. From-SVN: r101155
2005-06-02optabs.c: (expand_bool_compare_and_swap): Emit barrier after unconditional jump.Adrian Straetling1-0/+1
2005-06-02 Adrian Straetling <straetling@de.ibm.com> * optabs.c: (expand_bool_compare_and_swap): Emit barrier after unconditional jump. From-SVN: r100508
2005-05-13re PR middle-end/20714 (emit_no_conflict_block does invalid reordering)J"orn Rennecke1-18/+41
PR middle-end/20714: * optabs.c (no_conflict_data): New struct. (no_conflict_move_test): New function. (emit_no_conflict_block): Use it. From-SVN: r99674
2005-05-10optabs.c (expand_compare_and_swap_loop): Don't clobber old value before ↵Richard Henderson1-9/+17
comparing it for success. * optabs.c (expand_compare_and_swap_loop): Don't clobber old value before comparing it for success. From-SVN: r99525
2005-04-28bt-load.c, [...]: Use JUMP_P, LABEL_P, REG_P, MEM_P, NONJUMP_INSN_P, and ↵Kazu Hirata1-1/+1
INSN_P where appropriate. * bt-load.c, cfgexpand.c, dwarf2out.c, emit-rtl.c, expr.c, function.c, global.c, lcm.c, loop-invariant.c, optabs.c, reorg.c, resource.c, tree-ssa-loop-ivopts.c, value-prof.c: Use JUMP_P, LABEL_P, REG_P, MEM_P, NONJUMP_INSN_P, and INSN_P where appropriate. From-SVN: r98913
2005-04-21lambda.h (lambda_vector_min_nz): Likewise.Nathan Sidwell1-12/+7
* lambda.h (lambda_vector_min_nz): Likewise. * langhooks.h (struct lang_hooks_for_types, struct lang_hooks): Likewise. * output.h (assemble_integer, this_is_asm_operands): Likewise. * tree.h: Likewise. * vec.h: Likewise. * tree-flow-inline.h (relink_imm_use): Use gcc_assert. * optabs.c (prepare_cmp_insn, emit_cmp_and_jump_insns): Reword comments to avoid 'abort'. Use gcc_assert as necessary. * opts.c (common_handle_option): Likewise. * pretty-print.c (pp_base_format_text): Likewise. * print-rtl.c (print_rtx): Likewise. * read-rtl.c (read_rtx_filename, read_rtx_1): Likewise. * regmove.c (try_auto_increment): Likewise. * reload.c (find_valid_class, find_reloads_toplev, find_equiv_reg): Likewise. * reload1.c (reload, forget_old_reloads_1, function_invariant_p, merge_assigned_reloads): Likewise. * tree-inline.c (inline_forbidden_p_1, estimate_num_insns_1): Likewise. * tree-optimize.c (execute_todo): Likewise. * tree-outof-ssa.c (eliminate_phi): Likewise. * tree-ssa-alias.c (add_pointed_to_expr): Likewise. * tree-ssa-ccp.c (maybe_fold_stmt_indirect): Likewise. * tree-ssa-operands.c (parse_ssa_operands, get_indirect_ref_operands, create_ssa_artficial_load_stmt): Likewise. * tree-ssa-pre.c (find_or_generate_expression): Likewise. * tree-ssanames.c (release_ssa_name): Likewise. * tree.c (int_bit_position, int_byte_position, tree_low_cst, walk_tree): Likewise. * tree-ssa-operands.c (verify_abort): Fold into .. (verify_imm_links): ... here. From-SVN: r98519
2005-04-21* optabs.c (gen_conditional_trap): Restore #define.Nathan Sidwell1-0/+1
From-SVN: r98513
2005-04-21optabs.c (gen_condiational_trap): Remove #define.Nathan Sidwell1-137/+105
* optabs.c (gen_condiational_trap): Remove #define. (add_equal_note): Assertify. Remove explicit indirection from call via function pointer. (expand_ternary_op, expand_simple_binop, expand_binop, expand_twoval_unop, expand_twoval_binop, expand_twoval_binop_libfunc, expand_simple_unop expand_unop, emit_unop_insn, emit_no_conflict_block, prepare_cmp_insn, prepare_operand emit_cmp_and_jump_insn_1, emit_cmp_and_jump_insns, prepare_float_lib_cmp, emit_conditional_move, emit_conditional_add, gen_add2_insn, gen_add3_insn, have_add2_insn, gen_sub2_insn, gen_sub3_insn, have_sub2_insn, expand_float, expand_fix, debug_optab_libfuncs, gen_cond_trap, vector_compare_rtx, expand_vec_cond_expr): Likewise. From-SVN: r98499