OSDN Git Service

* fold-const.c (fold_binary): Guard (X-X) -> 0 transformation
[pf3gnuchains/gcc-fork.git] / gcc / ChangeLog
index caad8a0..616bc50 100644 (file)
@@ -1,3 +1,438 @@
+2007-06-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * fold-const.c (fold_binary): Guard (X-X) -> 0 transformation
+       with !HONOR_NANS and !HONOR_INFINITIES.
+       * simplify-rtx.c (simplify_binary_operation_1): Likewise.
+
+2007-06-12  Tristan Gingold  <gingold@adacore.com>
+
+       * gcov.c: Comments updated.
+       (source_info): Add file_time field.
+       (source_index): New variable.
+       (mutiple_files): New variable.
+       (generate_results): New function extracted from process_file.
+       (process_file): Save and restore chain of functions, generate
+       results and free structures only if not merging results.
+       (release_structures): File names are now freed in create_file_names
+       (create_file_names): Free previous file names.
+       (find_source): File date is now read here and modifications in
+       source files is checked here.
+       (read_graph_file): Only reverse order of functions for the current
+       object file.
+       (make_gcov_file_name): Do not generate long names if input_name is
+       NULL.
+       (output_lines): If merging results do not display graph, data and 
+       runs informations.
+       Checking source file modification is done in find_source.
+
+       * doc/gcov.texi: Append an s to sourcefile.
+
+2007-06-12  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+       * config/bfin/bfin.md (UNSPEC_NOP): New constant.
+       (forced_nop): New pattern.
+       * config/bfin/bfin.c: Include "df.h".
+       (add_to_reg): Use df_regs_ever_live_p instead of regs_ever_live.
+       (bfin_discover_loop): Use df_get_live_in instead of
+       global_live_at_start.
+       (bfin_reorder_loops): Pass 0 to cfg_layout_initialize.  Call
+       df_analyze when done.
+       (gen_one_bundle): Don't generate SEQUENCE insns, just put modes on
+       the insns.  Use QImode for the final insn in a bundle.  Call
+       df_insn_rescan on generated NOPs; use gen_forced_nop instead of
+       gen_nop.
+       (reorder_var_tracking_notes): New function.
+       (bfin_reorg): Pass no argument to split_all_insns.  Don't call
+       update_life_info.  Call df_analyze after scheduling and bundle
+       generation.  Call reorder_var_tracking_notes if generating these notes.
+       Call df_finish_pass at the end.
+
+2007-06-12  Dirk Mueller  <dmueller@suse.de>
+
+       * optabs.c (debug_optab_libfuncs): fix gcc_assert to
+       a comparison, not an assignment.
+
+2007-06-12  Olivier Hainque  <hainque@adacore.com>
+
+       * tree-nested.c (convert_local_reference): Handle VIEW_CONVERT_EXPR.
+       Request walking the subtrees only, leaving the current is_lhs/val_only
+       untouched.
+       (convert_non_local_reference): Likewise.
+       
+2007-06-12  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * config/m68k/m68k-devices.def (52221, 52223, 5253): New.
+       
+2007-06-12  Richard Guenther  <rguenther@suse.de>
+
+       PR tree-optimization/15353
+       PR tree-optimization/31657
+       * passes.c (init_optimization_passes): Add pass_tree_ifcombine.
+       * timevar.def: Add TV_TREE_IFCOMBINE.
+       * tree-pass.h (pass_tree_ifcombine): Declare.
+       * tree-ssa-ifcombine.c: New file.
+       * tree-ssa-phiopt.c (blocks_in_phiopt_order): Export.
+       * tree-flow.h (blocks_in_phiopt_order): Declare.
+       * Makefile.in (OBJS-common): Add tree-ssa-ifcombine.o.
+       (tree-ssa-ifcombine.o): New dependencies.
+
+2007-06-12  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR rtl-optimization/32293
+       * combine.c (simplify_if_then_else): Truncate return from
+       nonzero_bits() to correct mode.
+
+2007-06-12  Uros Bizjak  <ubizjak@gmail.com>
+
+       * fold-const (fold_binary) [RDIV_EXPR]: Also optimize a/cbrt(b/c)
+       into a*cbrt(c/b) if flag_unsafe_math_optimizations is set.
+
+2007-06-11  Diego Novillo  <dnovillo@google.com>
+
+       * Makefile.in (reload1.o-warn): Remove.
+
+2007-06-11  Seongbae Park <seongbae.park@gmail.com>
+
+       * combine.c (subst): Use reg_overlap_mentioned_p
+       instead of comparing register numbers directly.
+
+2007-06-11  Kenneth Zadeck <zadeck@naturalbridge.com>
+
+       * reload1.c (mark_home_live_1): Use the mode parameter.
+
+2007-06-11  Kenneth Zadeck <zadeck@naturalbridge.com>
+
+       * df-scan.c (df_insn_delete, df_insn_rescan, df_insn_rescan_all,
+       df_process_deferred_rescans, df_notes_rescan): Fixed spelling of
+       word "deferred".
+       * df-core.c: Ditto.
+       
+2007-06-11  Daniel Berlin  <dberlin@dberlin.org>
+
+       * Merge dataflow-branch into mainline (see ChangeLog.dataflow)
+
+2007-06-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.md ("*movtf_internal): Penalize moves to and
+       from integer registers.
+       (FP mode splitters): Handle TFmode.
+
+2007-06-11  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * tree-ssa-structalias.c (find_what_p_points_to): Return false
+       for ref-all pointers that point-to anything.
+
+2007-06-11  Joseph Myers  <joseph@codesourcery.com>
+
+       * config/arm/arm.c (arm_output_dwarf_dtprel,
+       TARGET_ASM_OUTPUT_DWARF_DTPREL): New.
+
+2007-06-11  Bernd Schmidt  <bernd.schmidt@analog.com>
+
+       * config/bfin/bfin.md (movdi_insn, movsi_insn, movv2hi_insn,
+       movhi_insn, movqi_insn, movsf_insn, movdf_insn): Don't allow constant
+       to memory moves.
+
+2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
+
+       * gcc/tree.c (signed_or_unsigned_type_for): New.
+       (unsigned_type_for): Use signed_or_unsigned_type_for.
+       (signed_type_for): Use signed_or_unsigned_type_for.
+       * gcc/tree.h (signed_or_unsigned_type_for): New.
+       (get_signed_or_unsigned_type): Remove.
+       * gcc/fold-const.c (fold_negate_expr): Use signed_type_for instead of
+       lang_hooks.types.signed_type
+       (size_diffop): Likewise.
+       (all_ones_mask_p): Likewise.
+       (build_range_check): Likewise.
+       (fold_cond_expr_with_comparison): Likewise.
+       (fold_cond_expr_with_comparison): Likewise.
+       (unextend): Likewise.
+       (extract_muldiv_1): Likewise.
+       (fold_single_bit_test_into_sign_test): Likewise.
+       (fold_binary): Likewise.
+       (fold_ternary): Likewise.
+       (operand_equal_for_comparison_p): Use signed_or_unsigned_type_for
+       instead of get_signed_or_unsigned_type.
+       * gcc/c-objc-common.h (LANG_HOOKS_SIGNED_TYPE): Remove.
+       (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
+       * gcc/expr.c (signed_or_unsigned_type_for): Use
+       signed_or_unsigned_type_for instead of get_signed_or_unsigned_type.
+       * gcc/langhooks.c (get_signed_or_unsigned_type): Remove.
+       (lhd_signed_or_unsigned_type): Remove.
+       * gcc/langhooks.h (lang_hooks_for_types): Remove signed_type and
+       signed_or_unsigned_type.
+       (lhd_signed_or_unsigned_type): Remove.
+       * gcc/expmed.c (make_tree): Use signed_type_for instead of
+       lang_hooks.types.signed_type.
+       * gcc/c-common.c (same_scalar_type_ignoring_signedness): Use
+       c_common_signed_type instead of lang_hooks.types.signed_type.
+       (c_common_unsigned_type): New.
+       (c_common_signed_type): Just call c_common_signed_or_unsigned_type.
+       (shorten_compare): Use c_common_unsigned_type instead of
+       c_common_signed_or_unsigned_type.
+       (c_common_nodes_and_builtins): Use c_common_unsigned_type instead of
+       unsigned_type_for.
+       * gcc/convert.c (convert_to_integer): Use signed_type_for instead of
+       lang_hooks.types.signed_type.
+       * gcc/langhooks-def.h (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
+       (LANG_HOOK_FOR_TYPES_INITIALIZER): Remove LANG_HOOKS_SIGNED_TYPE and
+       LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE.
+       * gcc/c-format.c (check_format_types): Use c_common_unsigned_type
+       instead of unsigned_type_for.
+       * gcc/c-decl.c (groakdeclarator): Likewise.
+       * gcc/c-typeck.c (convert_for_assignment): Likewise.
+       * gcc/c-common.h (c_common_unsigned_type): New.
+
+2007-06-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/32280
+       * config/i386/sse.md ("sse2_ashlti", "sse2_lshrti3"): Move ...
+       * config/i386/i386.md ("sse2_ashlti", "sse2_lshrti3"): ... to here.
+
+2007-06-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR middle-end/32279
+       * fold-const (fold_binary) [RDIV_EXPR]: Optimize a/sqrt(b/c)
+       into a*sqrt(c/b) if flag_unsafe_math_optimizations is set.
+
+2007-06-10  Jan Sjodin  <jan.sjodin@amd.com>
+           Sebastian Pop  <sebpop@gmail.com>
+
+       * lambda-code.c (remove_iv): New.
+       (lambda_loopnest_to_gcc_loopnest): Use remove_iv.
+
+2007-06-10  Zdenek Dvorak  <dvorakz@suse.cz>
+
+       * tree-data-ref.c (dr_analyze_alias): Handle case smt is NULL.
+       * tree-predcom.c (mark_virtual_ops_for_renaming): Exported.
+       * tree-ssa-loop-prefetch.c: Include optabs.h.
+       (FENCE_FOLLOWING_MOVNT): New macro.
+       (struct mem_ref): Add independent_p and storent_p fields.
+       (record_ref): Initalize the new fields.
+       (gather_memory_references_ref): Return true if the reference
+       could be analysed.
+       (gather_memory_references): Check whether all memory accesses
+       in loop were recorded.
+       (should_issue_prefetch_p): Return false for nontemporal stores.
+       (nontemporal_store_p, mark_nontemporal_store, emit_mfence_after_loop,
+       may_use_storent_in_loop_p, mark_nontemporal_stores): New functions.
+       (determine_loop_nest_reuse): Detect independent memory references.
+       (loop_prefetch_arrays): Call mark_nontemporal_stores.
+       * tree-flow.h (mark_virtual_ops_for_renaming): Declare.
+       * Makefile.in (tree-ssa-loop-prefetch.o): Add OPTABS_H dependency.
+       * config/i386/i386.h (x86_mfence): Declare.
+       (FENCE_FOLLOWING_MOVNT): Return x86_mfence.
+       * config/i386/i386.c (x86_mfence): New variable.
+       (ix86_init_mmx_sse_builtins): Initialize x86_mfence.
+
+       * tree-pretty-print.c (dump_generic_node): Mark nontemporal stores.
+       * optabs.c (init_optabs): Initialize storent_optab.
+       * optabs.h (enum optab_index): Add OTI_storent.
+       (storent_optab): Declare.
+       * genopinit.c (optabs): Add initialization for storent_optab.
+       * tree.h (MOVE_NONTEMPORAL): New macro.
+       * expr.c (expand_assignment, store_expr, store_constructor_field,
+       store_constructor, store_field, expand_expr_real_1): Propagate
+       nontemporality of the expanded store.
+       (emit_storent_insn): New function.
+       * expr.h (expand_assignment, store_expr): Declaration changed.
+       * function.c (assign_parm_setup_reg): Pass false as nontemporality
+       to expand_assignment.
+       * stmt.c (expand_asm_expr): Ditto.
+       * calls.c (initialize_argument_information): Pass false as
+       nontemporality to store_expr.
+       * config/i386/sse.md (storentv4sf, storentv2df, storentv2di,
+       storentsi): New.
+
+2007-06-09  Daniel Berlin  <dberlin@dberlin.org>
+
+       * tree-ssa-structalias.c (set_uids_in_ptset): Add is_deref'd
+       parameter, use it.
+       (find_what_p_points_to): Pass new parameter to set_uids_in_ptset.
+
+2007-06-09  Daniel Berlin  <dberlin@dberlin.org>
+
+       * tree-data-ref.c (dr_may_alias_p): Check that decl_a != decl_b,
+       and allow DECL_P here.
+
+2007-06-09  Zdenek Dvorak  <dvorakz@suse.cz>
+
+       * tree-scalar-evolution.c (follow_ssa_edge_in_rhs,
+       follow_ssa_edge_in_condition_phi, follow_ssa_edge): Keep more precise
+       track of the size of the expression.
+       * cfghooks.c (merge_blocks): Remove block from loops structure only
+       after call of the merge_blocks hook.
+
+2007-06-09  Tom Tromey  <tromey@redhat.com>
+
+       * c-decl.c (grokdeclarator): Added 'deprecated_state' argument.
+       (deprecated_state): Removed.
+       (start_decl): Update.
+       (enum deprecated_states): Moved earlier.
+       (groktypename): Update.
+       (push_parm_decl): Likewise.
+       (grokfield): Likewise.
+       (start_function): Likewise.
+
+2007-06-09  Ian Lance Taylor  <iant@google.com>
+
+       PR tree-optimization/32169
+       * tree-vrp.c (extract_range_from_unary_expr): For NOP_EXPR and
+       CONVERT_EXPR, check whether min and max both converted to an
+       overflow infinity representation.
+
+2007-06-08  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * reload1.c (fixup_abnormal_edges): Clear bb field for insns
+       not inserted on the edge.
+
+2007-06-08  Bob Wilson  <bob.wilson@acm.org>
+
+       * config/xtensa/lib1funcs.asm (__udivsi3): Use hardware divide
+       instructions if they are supported.
+       (__divsi3, __umodsi3, __modsi3): Likewise.
+       (__ashldi3, __ashrdi3, __lshrdi3): New.
+       * config/xtensa/t-xtensa (LIB1ASMFUNCS): Add DImode shift functions.
+       
+2007-06-08  Harsha Jagasia <harsha.jagasia@amd.com>
+           Tony Linthicum <tony.linthicum@amd.com>
+
+       * doc/extend.texi: Add fvect-cost-model flag.
+       * common.opt (fvect-cost-model): New flag.
+       * tree-vectorizer.c (new_stmt_vec_info): Initialize inside and outside
+       cost fields in stmt_vec_info struct for STMT.
+       * tree-vectorizer.h (stmt_vec_info): Define inside and outside cost
+       fields in stmt_vec_info struct and access functions for the same.
+       (TARG_COND_BRANCH_COST): Define cost of conditional branch.
+       (TARG_VEC_STMT_COST): Define cost of any vector operation, excluding
+       load, store and vector to scalar operation.
+       (TARG_VEC_TO_SCALAR_COST): Define cost of vector to scalar operation.
+       (TARG_VEC_LOAD_COST): Define cost of aligned vector load.
+       (TARG_VEC_UNALIGNED_LOAD_COST): Define cost of misasligned vector load.
+       (TARG_VEC_STORE_COST): Define cost of vector store.
+       (vect_estimate_min_profitable_iters): Define new function.
+       * tree-vect-analyze.c (vect_analyze_operations): Add a compile-time
+       check to evaluate if loop iterations are less than minimum profitable
+       iterations determined by cost model or minimum vect loop bound defined
+       by user, whichever is more conservative.
+       * tree-vect-transform.c (vect_do_peeling_for_loop_bound): Add a
+       run-time check to evaluate if loop iterations are less than minimum
+       profitable iterations determined by cost model or minimum vect loop
+       bound defined by user, whichever is more conservative.
+       (vect_estimate_min_profitable_iterations): New function to estimate
+       mimimimum iterartions required for vector version of loop to be
+       profitable over scalar version.
+        (vect_model_reduction_cost): New function.
+       (vect_model_induction_cost): New function.
+       (vect_model_simple_cost): New function.
+       (vect_cost_strided_group_size): New function.
+       (vect_model_store_cost): New function.
+       (vect_model_load_cost): New function.
+       (vectorizable_reduction): Call vect_model_reduction_cost during
+       analysis phase.
+       (vectorizable_induction): Call vect_model_induction_cost during
+       analysis phase.
+       (vectorizable_load): Call vect_model_load_cost during analysis phase.
+       (vectorizable_store): Call vect_model_store_cost during analysis phase.
+       (vectorizable_call, vectorizable_assignment, vectorizable_operation,
+       vectorizable_promotion, vectorizable_demotion): Call 
+       vect_model_simple_cost during analysis phase.
+
+2007-06-08  Simon Baldwin  <simonb@google.com>
+
+       * reg-stack.c (get_true_reg): Readability change.  Moved default case
+       label into direct switch statement scope.
+
+2007-06-08  Simon Baldwin  <simonb@google.com>
+
+       * tree-flow-inline.h (var_ann): Replaced erroneous '=' assignment
+       in gcc_assert() with '==' comparison.
+
+2007-06-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/i386/i386.c (override_options): Merge TARGET_SSE4_2 and
+       TARGET_ABM handling of x86_popcnt variable.
+
+2007-06-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       * doc/extend.texi (X86 Built-in Functions): Document __builtin_fabsq,
+       __builtin_copysignq and __builtin_infq built-in functions.
+
+2007-06-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       * doc/extend.texi (X86 Built-in Functions): Add missing `@item's in
+       SSE4.2 section.  Correct built-in function names in SSE4A section.
+
+2007-06-08  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR tree-optimization/32243
+       * tree-vect-transform.c (vectorizable_type_promotion): Move check
+       for ncopies after ratio check between nunits_out and nunits_in.
+       (vectorizable_type_demotion): Remove single-use variable "scalar_type".
+
+2007-06-08  Dorit Nuzman  <dorit@il.ibm.com>
+
+       PR tree-optimization/32224
+       * tree-vect-analyze.c (vect_determine_vectorization_factor): Fail
+       vectorization upon a non GIMPLE_MODIFY_STMT.
+
+2007-06-08  Christian Bruel  <christian.bruel@st.com>
+
+       PR target/29953
+       * config/sh/sh.md (doloop_end): New pattern and splitter.
+       * loop-iv.c (simple_rhs_p): Check for hardware registers.
+       
+2007-06-08  Zdenek Dvorak  <dvorakz@suse.cz>
+
+       PR middle-end/32209
+       * dominance.c (debug_dominance_tree, debug_dominance_tree_1): New
+       functions.
+       (verify_dominators): Do not change dominance tree.
+
+2007-06-08  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/constraints.md: New file.
+       * config/sh/sh.c: Include tm-constrs.h.
+       (reg_class_from_letter): Remove.
+       (prepare_cbranch_operands): Use satisfies_constraint_*
+       function instead of macro.
+       (andcosts, broken_move, sh_secondary_reload): Likewise.
+       * config/sh/predicates.md (trapping_target_operand): Likewise.
+       (and_operand, arith_operand, arith_reg_or_0_operand,
+       cmp_operand, logical_operand, target_operand,
+       ua_address_operand, ua_offset, xor_operand): Likewise.
+       * config/sh/sh.md: Include constraints.md.
+       (*movsicc_t_false): Use satisfies_constraint_* function
+       instead of macro.
+       (*movsicc_t_true, ashlsi3_std, ashlhi3_k, lshrsi3_m,
+       lshrsi3_k, movsi_const_16bit+2, *movhi_media+1,
+       movdi_const_16bit+1, beq, bne, *ptb): Likewise.
+       * config/sh/sh.h (reg_class_from_letter): Remove prototype.
+       (OVERRIDE_OPTIONS): Don't modify reg_class_from_letter.
+       (REG_CLASS_FROM_CONSTRAINT): Remove.
+       (CONSTRAINT_LEN, CONST_OK_FOR_I20, CONST_OK_FOR_I,
+       CONST_OK_FOR_J, CONST_OK_FOR_K16, CONST_OK_FOR_K,
+       CONST_OK_FOR_P27, CONST_OK_FOR_P, CONST_OK_FOR_M,
+       CONST_OK_FOR_N, CONST_OK_FOR_CONSTRAINT_P,
+       CONST_DOUBLE_OK_FOR_LETTER_P): Likewise.
+       (SECONDARY_INOUT_RELOAD_CLASS): Use satisfies_constraint_*
+       function instead of macro.
+       (SECONDARY_INPUT_RELOAD_CLASS): Likewise.
+       (EXTRA_CONSTRAINT_Q, EXTRA_CONSTRAINT_A,
+       EXTRA_CONSTRAINT_Bsc, EXTRA_CONSTRAINT_B,
+       EXTRA_CONSTRAINT_Css, EXTRA_CONSTRAINT_Csu): Remove.
+       (IS_PC_RELATIVE_LOAD_ADDR_P): New macro.
+       (IS_LITERAL_OR_SYMBOLIC_S16_P): Likewise.
+       (IS_LITERAL_OR_SYMBOLIC_U16_P): Likewise.
+       (IS_NON_EXPLICIT_CONSTANT_P): Likewise.
+       (EXTRA_CONSTRAINT_Csy, EXTRA_CONSTRAINT_Z, EXTRA_CONSTRAINT_W,
+       EXTRA_CONSTRAINT_Cpg, EXTRA_CONSTRAINT_C,
+       EXTRA_MEMORY_CONSTRAINT, EXTRA_CONSTRAINT_Sr0,
+       EXTRA_CONSTRAINT_Sua, EXTRA_CONSTRAINT_S,
+       EXTRA_CONSTRAINT_STR): Likewise.
+       (GO_IF_LEGITIMATE_INDEX): Fix indentation.
+
 2007-06-07  Geoffrey Keating  <geoffk@apple.com>
 
        * config/i386/darwin.h (STACK_BOUNDARY): Define.
        (ix86_expand_builtin) [IX86_BUILTIN_INFQ]: Expand builtin.
        [IX86_BUILTIN_FABSQ]: Expand builtin using ix86_expand_unop_builtin().
        [IX86_BUILTIN_COPYSIGNQ]: Expand builtin using
-       ix86_expand_unop_builtin().
+       ix86_expand_binop_builtin().
 
 2007-06-07  Bob Wilson  <bob.wilson@acm.org>