* tree-vectorizer.h (vect_recog_func_ptr): Change the first
argument to be a VEC of statements.
* tree-vect-loop.c (vect_determine_vectorization_factor):
Remove the assert that pattern statements have to have their
vector type set.
* tree-vect-patterns.c (vect_recog_widen_sum_pattern):
Change the first argument to be a VEC of statements. Update
documentation.
(vect_recog_dot_prod_pattern, vect_recog_pow_pattern): Likewise.
(vect_handle_widen_mult_by_const): New function.
(vect_recog_widen_mult_pattern): Change the first argument to
be a VEC of statements. Update documentation. Check that the
constant is INTEGER_CST. Support multiplication by a constant
that fits an intermediate type - call
vect_handle_widen_mult_by_const.
(vect_pattern_recog_1): Update vect_recog_func_ptr and its
call. Handle additional pattern statements if necessary.
From-SVN: r175102
2011-06-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/49417
* module.c (mio_component): Make sure the 'class_ok' attribute is set
for use-associated CLASS components.
* parse.c (parse_derived): Check for 'class_ok' attribute.
* resolve.c (resolve_fl_derived): Ditto.
2011-06-16 Janus Weil <janus@gcc.gnu.org>
PR fortran/49417
* gfortran.dg/class_43.f03: New.
From-SVN: r175101
PR target/49427
* config.gcc: Set cpu_type to v850 for any V850 architecture.
(v850*-*-*): Delete explicit setting of tm_p_file, tmake_file,
md_file, extra_modes, out_file and extra_options are these are all
deduced from cpu_type.
From-SVN: r175100
gcc/
PR target/49313
PR target/29524
* longlong.h: Add AVR support:
(count_leading_zeros): New macro.
(count_trailing_zeros): New macro.
(COUNT_LEADING_ZEROS_0): New macro.
* config/avr/t-avr (LIB1ASMFUNCS): Add
_ffssi2, _ffshi2, _loop_ffsqi2,
_ctzsi2, _ctzhi2, _clzdi2, _clzsi2, _clzhi2,
_paritydi2, _paritysi2, _parityhi2,
_popcounthi2,_popcountsi2, _popcountdi2, _popcountqi2,
_bswapsi2, _bswapdi2,
_ashldi3, _ashrdi3, _lshrdi3
(LIB2FUNCS_EXCLUDE): Add _clz.
* config/avr/libgcc.S (XCALL): Move up in file.
(XJMP): New C Macro.
(DEFUN): New asm macro.
(ENDF): New asm macro.
(__ffssi2): New function.
(__ffshi2): New function.
(__loop_ffsqi2): New function.
(__ctzsi2): New function.
(__ctzhi2): New function.
(__clzdi2): New function.
(__clzsi2): New function.
(__clzhi2): New function.
(__paritydi2): New function.
(__paritysi2): New function.
(__parityhi2): New function.
(__popcounthi2): New function.
(__popcountsi2): New function.
(__popcountdi2): New function.
(__popcountqi2): New function.
(__bswapsi2): New function.
(__bswapdi2): New function.
(__ashldi3): New function.
(__ashrdi3): New function.
(__lshrdi3): New function.
Fix suspicous lines.
libgcc/
PR target/49313
PR target/29524
* config/avr/t-avr: Fix line endings.
(intfuncs16): Remove _ffsXX2, _clzXX2, _ctzXX2, _popcountXX2,
_parityXX2.
From-SVN: r175097
2011-06-16 Richard Guenther <rguenther@suse.de>
* gimple.c (canonicalize_cond_expr_cond): (bool)x is not
the same as x != 0.
* fold-const.c (fold_binary_loc): Do not fold X & 1 != 0 to
(bool) X & 1.
* ipa-prop.c (ipa_analyze_indirect_call_uses): Also allow
equality compares against zero for the lower bit.
From-SVN: r175096
2011-06-13 Edmar Wienskoski <edmar@freescale.com>
PR target/44618
* config/rs6000/rs6000.md (save_gpregs_<mode>): Replaced pattern
with a set of similar patterns, where the MATCH_OPERAND for the
function argument is replaced with individual references to hardware
registers.
(save_fpregs_<mode>): Ditto
(restore_gpregs_<mode>): Ditto
(return_and_restore_gpregs_<mode>): Ditto
(return_and_restore_fpregs_<mode>): Ditto
(return_and_restore_fpregs_aix_<mode>): Ditto
* gcc.target/powerpc/outofline_rnreg.c: New testcase.
From-SVN: r175093
2011-06-15 Richard Guenther <rguenther@suse.de>
* expr.c (expand_expr_real_2): Reduce all integral types to
bitfield precision.
(expand_expr_real_1): Likewise.
From-SVN: r175078
PR debug/49382
* dwarf2out.c (dw_loc_list_node): Add force field.
(add_var_loc_to_decl): For PARM_DECL, attempt to keep
the incoming location in the list, even if it is modified
before first real insn.
(output_loc_list): Emit empty ranges with force flag set.
(dw_loc_list): If first range of a PARM_DECL is empty,
set force flag.
From-SVN: r175076
PR target/49349
* sel-sched.c (find_place_for_bookkeeping): Add new parameter
(fence_to_rewind). Use it to notice when bookkeeping will be placed
above a fence. Update comments.
(generate_bookkeeping_insn): Rewind fence when bookkeeping code is
placed just above it. Do not allow NULL place_to_insert.
From-SVN: r175075
* tree-vect-loop-manip.c (remove_dead_stmts_from_loop): Remove.
(slpeel_tree_peel_loop_to_edge): Don't call
remove_dead_stmts_from_loop.
* tree-vect-loop.c (vect_determine_vectorization_factor): Don't
remove irrelevant pattern statements. For irrelevant statements
check if it is the last statement of a detected pattern, use
corresponding pattern statement instead.
(destroy_loop_vec_info): No need to remove pattern statements,
only free stmt_vec_info.
(vect_transform_loop): For irrelevant statements check if it is
the last statement of a detected pattern, use corresponding
pattern statement instead.
* tree-vect-patterns.c (vect_pattern_recog_1): Don't insert
pattern statements. Set basic block for the new statement.
(vect_pattern_recog): Update documentation.
* tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Scan
operands of pattern statements.
(vectorizable_call): Fix printing. In case of a pattern
statement use the lhs of the original statement when creating
a dummy statement to replace the original call.
(vect_analyze_stmt): For irrelevant statements check if it is
the last statement of a detected pattern, use corresponding
pattern statement instead.
* tree-vect-slp.c (vect_schedule_slp_instance): For pattern
statements use gsi of the original statement.
From-SVN: r175074
2011-06-14 Easwaran Raman <eraman@google.com>
PR rtl-optimization/44194
* dse.c: Include tree-flow.h
(insn_info): Add new field non_frame_wild_read.
(group_info): Add new fields escaped_n and escaped_p.
(kill_on_calls): New variable.
(get_group_info): Initialize gi->escaped_n and gi->escaped_p.
(dse_step0): Initialize kill_on_calls.
(can_escape): New function.
(set_usage_bits): Add additional parameter; record information
about escaped locations.
(record_store): Pass EXPR corresponding to MEM to
set_usage_bits.
(dse_step2_nospill): Set kill_on_calls based on
group->escaped_n and group->escaped_n.
(add_wild_read): Refactor into...
(reset_active_stores): ... New method, and
(free_read_records): ... New method.
(add_non_frame_wild_read): New method.
(scan_insn): Call add_non_frame_wild_read on non-const calls.
(scan_reads_nospill): Handle instructions with
non_frame_wild_read.
(dse_step5_nospill): Call scan_reads_nospill for instructions
marked as non_frame_wild_read.
(dse_step7): Free escaped_n, escaped_p and kill_on_calls
bitmaps.
testsuite/ChangeLog
2011-06-14 Easwaran Raman <eraman@google.com>
PR rtl-optimization/44194
* gcc.dg/pr44194-1.c: New test.
* gcc.dg/pr44194-2.c: New test.
From-SVN: r175063
PR c++/49290
* semantics.c (cxx_fold_indirect_ref): Local, more permissive copy
of fold_indirect_ref_1.
(cxx_eval_indirect_ref): Use it.
From-SVN: r175041
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.
From-SVN: r175034
* config/i386/kfreebsd-gnu.h: Resync with `config/i386/linux.h'.
* config/kfreebsd-gnu.h (GNU_USER_DYNAMIC_LINKER): Resync with
`config/linux.h'.
* config/i386/kfreebsd-gnu64.h: New file.
* config.gcc (x86_64-*-kfreebsd*-gnu): Replace `i386/kfreebsd-gnu.h'
with `i386/kfreebsd-gnu64.h'.
* config/i386/linux64.h (GNU_USER_LINK_EMULATION32)
(GNU_USER_LINK_EMULATION64): New macros.
* config/i386/gnu-user64.h (LINK_SPEC): Rely on
`GNU_USER_LINK_EMULATION32' and `GNU_USER_LINK_EMULATION64' instead
of hardcoding `elf_i386' and `elf_x86_64'.
From-SVN: r175031
PR fortran/49103
* tree.h (DECL_NONSHAREABLE): Define.
(struct tree_decl_common): Change decl_common_unused to
decl_nonshareable_flag.
* cfgexpand.c (expand_used_vars_for_block, clear_tree_used):
Ignore vars with DECL_NONSHAREABLE bit set.
* tree-cfg.c (gimple_duplicate_bb): Set DECL_NONSHAREABLE
on stores to automatic aggregate vars.
* gfortran.dg/pr49103.f90: New test.
From-SVN: r175028
2011-06-14 Tom de Vries <tom@codesourcery.com>
PR target/45098
* gcc.target/arm/ivopts-3.c: New test.
* gcc.target/arm/ivopts-4.c: New test.
* gcc.target/arm/ivopts-5.c: New test.
From-SVN: r175025