* config/mn10300/mn10300.c (mn10300_split_and_operand_count):
Return a positive value to indicate that the bits at the
bottom of the register should be cleared.
From-SVN: r178724
2011-09-09 Richard Guenther <rguenther@suse.de>
PR middle-end/50333
* tree-data-ref.c (split_constant_offset): Do not try to handle
ternary ops.
* gcc.dg/torture/pr50333.c: New testcase.
From-SVN: r178720
* gcc-interface/utils.c (unchecked_convert): Use a field of the right
precision when converting to or from an integral type whose precision
is not equal to its size.
From-SVN: r178711
2011-09-08 Andrew Stubbs <ams@codesourcery.com>
PR tree-optimization/50318
gcc/
* tree-ssa-math-opts.c (convert_plusminus_to_widen): Correct
typo in use of mult_rhs1 and mult_rhs2.
gcc/testsuite/
* gcc.target/arm/pr50318-1.c: New file.
From-SVN: r178708
2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
* trans-array.c (gfc_trans_constant_array_constructor): Remove
superfluous initialisation of DIM field.
(gfc_trans_array_constructor): Assert that DIMEN field is properly set.
(gfc_conv_expr_descriptor): Ditto.
* trans-expr.c (gfc_conv_procedure_call): Ditto.
From-SVN: r178698
gcc/
* c-decl.c (lookup_name): Use the new
maybe_record_typedef_use.
(pushdecl): Use the new
record_locally_defined_typedef.
(store_parm_decls): Allocate cfun->language.
(finish_function): Use the new maybe_warn_unused_local_typedefs,
and free cfun->language.
(c_push_function_context): Allocate cfun->language here only if
needed.
(c_pop_function_context): Likewise, mark cfun->language
for collection only when it should be done.
* c-common.c (handle_used_attribute): Don't ignore TYPE_DECL
nodes.
* c-typeck.c (c_expr_sizeof_type, c_cast_expr): Use the new
maybe_record_local_typedef_use.
gcc/c-family
* c-common.h (struct c_language_function::local_typedefs): New
field.
(record_locally_defined_typedef, maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Declare new functions.
* c-common.c (record_locally_defined_typedef)
(maybe_record_typedef_use)
(maybe_warn_unused_local_typedefs): Define new functions.
* c.opt: Declare new -Wunused-local-typedefs flag.
gcc/cp
* name-lookup.c (pushdecl_maybe_friend_1): Use the new
record_locally_defined_typedef.
* decl.c (finish_function): Use the new
maybe_warn_unused_local_typedefs.
(grokfield): Use the new record_locally_defined_typedef.
* parser.c (lookup_name): Use the new maybe_record_typedef_use.
gcc/doc/
* invoke.texi: Update documentation for -Wunused-local-typedefs.
gcc/testsuite/
* g++.dg/warn/Wunused-local-typedefs.C: New test file.
* c-c++-common/Wunused-local-typedefs.c: Likewise.
libstdc++-v3/
* include/ext/bitmap_allocator.h
(__detail::__mini_vector::__lower_bound): Remove unused typedef.
* src/istream.cc (std::operator>>(basic_istream<char>& __in,
basic_string<char>& __str)): Likewise.
(std::getline): Likewise.
* src/valarray.cc (__valarray_product): Likewise.
From-SVN: r178692
2011-09-08 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/50287
* ipa-split.c (split_function): Do not create SSA names for
non-gimple-registers.
* testsuite/gcc.dg/torture/pr50287.c: New test.
From-SVN: r178688
2011-09-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19831
* tree-ssa-dce.c (mark_all_reaching_defs_necessary_1): Also
skip builtins with vdefs that do not really store something.
(propagate_necessity): For calls to free that we can associate
with an allocation function do not mark the freed pointer
definition necessary.
(eliminate_unnecessary_stmts): Remove a call to free if
the associated call to an allocation function is not necessary.
* gcc.dg/tree-ssa/pr19831-1.c: New testcase.
* gcc.dg/tree-ssa/pr19831-2.c: Likewise.
* gcc.dg/tree-ssa/pr19831-3.c: Likewise.
* gcc.dg/errno-1.c: Adjust.
From-SVN: r178687
2011-09-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19831
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Do not mark
allocation functions as necessary.
* gcc.dg/tree-ssa/ssa-dce-8.c: New testcase.
From-SVN: r178683
PR target/50310
* config/i386/i386.c (ix86_prepare_sse_fp_compare_args): Return
code early if TARGET_AVX.
(ix86_expand_fp_vcond): Handle LTGT and UNEQ.
* gcc.c-torture/execute/ieee/pr50310.c: New test.
* gcc.dg/pr50310-2.c: New test.
From-SVN: r178673
* bb-reorder.c (insert_section_boundary_note): Don't check
optimize_function_for_speed_p.
(gate_handle_partition_blocks): Do it here instead.
(gate_handle_reorder_blocks): Move preliminary checks here ...
(rest_of_handle_reorder_blocks): ... from here.
From-SVN: r178657
* regrename.c (struct du_head): Make nregs signed.
(closed_chains): Remove.
(create_new_chain): Return the new chain.
(chain_from_id): New static function.
(dump_def_use_chain): Change argument to be an int, indicating
the first ID to print. All callers changed.
(merge_overlapping_regs): Use chain_from_id. Assert that
chains don't conflict with themselves.
(rename_chains): Take no argument. Iterate over id_to_chain
rather to find chains to rename. Clear tick before the main
loop.
(struct incoming_reg_info): New struct.
(struct bb_rename_info): New struct.
(init_rename_info, set_incoming_from_chain, merge_chains): New
static functions.
(regrename_analyze): New static function, broken out of
regrename_optimize. Record and make use of open chain information
at basic block boundaries, and merge chains where possible.
(scan_rtx_reg): Make this_nregs signed. Don't update
closed_chains.
(build_def_use): Return a bool to indicate success. All callers
changed. Don't initialize global data here.
(regrename_optimize): Move most code out of here into
regrename_analyze.
* regs.h (add_range_to_hard_reg_set, remove_range_from_hard_reg_set,
range_overlaps_hard_reg_set_p, range_in_hard_reg_set_p): New
static inline functions.
* vec.h (FOR_EACH_VEC_ELT_FROM): New macro.
From-SVN: r178645
2011-09-07 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/49911
* tree-sra.c (analyze_access_subtree): Change type of to-be-replaced
enumerations to the corresponding plain integer type.
* testsuite/g++.dg/tree-ssa/pr49911.C: New test.
From-SVN: r178639
2011-09-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50319
* tree-if-conv.c (set_bb_predicate): Assert we only set
canonical predicates.
(add_to_predicate_list): Simplify. Allow TRUTH_NOT_EXPR
around canonical predicates.
(predicate_bbs): Do not re-gimplify already canonical
predicates. Properly unshare them though.
(find_phi_replacement_condition): Simplify.
From-SVN: r178638