2011-10-05 Richard Guenther <rguenther@suse.de>
* gimple-fold.c (gimple_fold_stmt_to_constant_1): For
ternary ops with an embedded expression valueize and fold
that as well.
* tree-ssa-sccvn.c (try_to_simplify): Also allow SSA name
results from gimple_fold_stmt_to_constant_1.
From-SVN: r179543
2011-10-05 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* expmed.c (expand_mult_highpart_optab): Replace optab_handler
with the new widening_optab_handler.
From-SVN: r179541
* config/i386/i386.c (ix86_emit_binop): New static function.
(ix86_split_lea_for_addr): Use ix86_emit_binop to emit add and shl
instructions.
(x86_output_mi_thunk): Use ix86_emit_binop to emit add instructions.
From-SVN: r179537
PR tree-optimization/50604
* builtins.c (fold_builtin_strcpy, fold_builtin_stpcpy,
fold_builtin_strncpy, fold_builtin_stxcpy_chk): Ensure
last argument to memcpy has size_type_node type instead of
ssizetype.
* tree-ssa-strlen.c (handle_builtin_memcpy): Use size_type_node
instead of TREE_TYPE (len) as type for newlen.
* gcc.dg/pr50604.c: New test.
From-SVN: r179508
Currently when reading in LTO sections from ld -r files they can
get randomly reordered based on hash tables and random IDs.
This causes reordering later when the final code is generated and
also makes crashes harder to reproduce.
This patch maintains explicit lists based on the input order and uses
those lists to preserve that order when starting the rest of the
LTO passes.
This is the first step to working -fno-toplevel-reorder for
LTO. But this needs more changes because the LTO partitioner
can still reorder.
This add two lists: one for the section and another one for
the file_decl_datas. This is needed because the sections are
walked twice through different data structures.
In addition some code becomes slightly cleaner because we don't need
to pass state through abstract callbacks anymore, but
can just use direct type safe calls.
gcc/lto/:
2011-10-02 Andi Kleen <ak@linux.intel.com>
* lto-object.c (lto_obj_add_section_data): Add list.
(lto_obj_add_section): Fill in list.
(ltoobj_build_section_table): Pass through list.
* lto.c (file_data_list): Declare.
(create_subid_section_table): Pass arguments directly.
Fill in list of file_datas.
(lwstate): Delete.
(lto_create_files_from_ids): Pass in direct arguments.
Don't maintain list.
(lto_file_read): Use explicit section and file data lists.
(lto_read_all_file_options): Pass in section_list.
* lto.h (lto_obj_build_section_table): Add list.
(lto_section_slot): Add next.
(lto_section_list): Declare.
From-SVN: r179505
* fold-const.c (fold_unary_loc): Don't optimize
POINTER_PLUS_EXPR casted to TYPE_RESTRICT pointer by
casting the inner pointer if it isn't TYPE_RESTRICT.
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Don't through
casts from non-TYPE_RESTRICT pointer to TYPE_RESTRICT pointer.
* gcc.dg/tree-ssa/restrict-4.c: New test.
From-SVN: r179500
2011-10-04 Artem Shinkarov <artyom.shinkaroff@gmail.com>
* gcc.c-torture/execute/vector-compare-1.c: Fix trailing white
spaces.
(main): Use __typeof to get result type of comparison.
From-SVN: r179497
* lto-streamer.h (lto_input_toplevel_asms): Add order_base parameter.
* lto-streamer-in.c (lto_input_toplevel_asms): Stream in order.
* lto-streamer-out.c (lto_output_toplevel_asms): Stream out order.
* lto-cgraph.c (order_base): New static var.
(lto_output_node): Stream in order.
(lto_output_varpool_node): Stream out order.
(input_node): Stream in order.
(input_varpool_node): Stream out order.
(input_cgraph_1): Initialize order base; update call of
lto_input_toplevel_asms.
From-SVN: r179496
2011-10-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* longlong.h (smul_ppmm, sdiv_qrnnd): Add underscores to the local
variables. Fix second operand of DR. Swap inputs for sdiv_qrnnd.
From-SVN: r179491
(check_effective_target_vect_multiple_sizes):
Make et_vect_multiple_sizes_saved global.
(check_effective_target_vect64): Make et_vect64_saved global.
From-SVN: r179490
* config/sparc/sparc.md (fpack16_vis, fpackfix_vis, fpack32_vis): Make
GSR_REG an input operand to UNSPEC instead of a parallel USE.
(faligndata<V64I:mode>_vis): Likewise and use DI mode.
(alignaddrsi_vis, alignaddrdi_vis, alignaddrlsi_vis, alignaddrldi_vis):
Reference GSR_REG in DI mode, simplify convoluted expressions by using
zero_extract.
(bshuffle<V64I:mode>_vis): Reference GSR_REG in DI mode.
From-SVN: r179489
* godump.c (go_output_typedef): Support printing enum values that
don't fit in a signed HOST_WIDE_INT.
Co-Authored-By: Ian Lance Taylor <iant@google.com>
From-SVN: r179477
* config/sparc/sparc.md (bmask<P:mode>_vis): Split into explicit 'di'
and 'si' patterns which describe the GSR changes explicitly in the
RTL using zero_extract.
(bshuffle<V64I:mode>_vis): Put the GSR use inside of the unspec.
From-SVN: r179465