2007-09-18 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33340
* tree-ssa-sccvn.c (set_ssa_val_to): Do not set values to
SSA_NAMEs that occur in abnormal PHI nodes.
* g++.dg/torture/pr33340.C: New testcase.
From-SVN: r128571
gcc/
* df-scan.c (df_notes_rescan): Do nothing if the instruction does
not yet have a basic block.
* dse.c (find_shift_sequence): Don't set DF_NO_INSN_RESCAN.
From-SVN: r128563
gcc/
* config/mips/mips.c (mips_output_mi_thunk): Use
mips_function_ok_for_sibcall and const_call_insn_operand
to determine if a direct sibcall is allowed. Use
mips_classify_symbol to determine a global pointer is needed.
From-SVN: r128560
* fixed-obj.mk: New file to support fine-grain fixed-point functions.
* Makefile.in (fixed_point): Define.
Check if fixed_point is yes to build support functions.
* configure.ac: Check for fixed_point support.
* configure: Regenerated.
* gen-fixed.sh: New file to generate lists of fixed-point labels,
funcs, modes, from, to.
Co-Authored-By: Nigel Stephens <nigel@mips.com>
From-SVN: r128557
* tree-sra.c (maybe_lookup_element_for_expr) <COMPONENT_REF>: Return
NULL for variable-sized records too.
(sra_walk_expr) <COMPONENT_REF>: Stop at variable-sized records too.
From-SVN: r128553
* trans-types.c (gfc_get_desc_dim_type): Do not to try
emit debug info.
(gfc_get_array_descriptor_base): Likewise.
(gfc_get_mixed_entry_union): Likewise
(gfc_get_derived_type): Set decl location for fields and
derived type itself.
From-SVN: r128540
PR tree-optimization/33319
* tree-vect-analyze.c (vect_same_range_drs): New.
(vect_vfa_range_equal): New.
(vect_is_duplicate_ddr): Removed.
(vect_mark_for_runtime_alias_test): Do not perform marking when
optimizing for size or max_param for alias checking is zero.
Move the function before vect_analyze_data_ref_dependence.
(vect_analyze_data_ref_dependence): Add call to
vect_mark_for_runtime_alias_test in two cases when dependence
is not clear.
(vect_analyze_data_ref_dependences): Do not call to
vect_mark_for_runtime_alias_test.
(vect_prune_runtime_alias_test_list): New.
(vect_analyze_loop): Add call to vect_prune_runtime_alias_test_list.
* tree-vect-transform.c (vect_estimate_min_profitable_iters):
Update vec_outside_cost.
(vect_vfa_segment_size): More compact code, use TYPE_SIZE_UNIT.
(vect_create_cond_for_alias_checks): Build the base address of data
reference from DR_GROUP_FIRST_DR.
(vect_loop_versioning): New.
(vect_transform_loop): Add a call to vect_loop_versioning.
Remove factored out code.
From-SVN: r128539
2007-09-16 Paolo Carlini <pcarlini@suse.de>
Douglas Gregor <doug.gregor@gmail.com>
* include/tr1_impl/type_traits (aligned_storage): Implement
in the neat and general way.
Co-Authored-By: Douglas Gregor <doug.gregor@gmail.com>
From-SVN: r128532
gcc/
* dse.c (find_shift_sequence): Allow word as well as subword shifts.
Do the tentative shift expansion with the DF_NO_INSN_RESCAN flag set.
Fix the call to insn_rtx_cost. Skip access sizes that require a
real truncation of the store register. Use convert_move instead
of gen_lowpart when narrowing the result.
(replace_read): Use convert_move instead of gen_lowpart when
narrowing the store rhs.
gcc/testsuite/
* gcc.target/mips/dse-1.c: New test.
From-SVN: r128530
cp/
PR c++/32756
* call.c (maybe_handle_implicit_object): Set this_p, clear
rvaluedness_matches_p.
(compare_ics): Do not compare rvaluedness matching when one of the
operands is an implicit object.
testsuite/
PR c++/32756
* g++.dg/overload/operator3.C: New.
From-SVN: r128528
gcc/
* config/mips/mips.md (SHORT): Fix long line.
(SUBDI): New mode iterator. Extend the shift-and-truncate insns
to QImode and HImoe.
gcc/testsuite/
* gcc.target/mips/truncate-1.c: New test.
From-SVN: r128525
2007-09-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29396
PR fortran/29606
PR fortran/30625
PR fortran/30871
* trans.h : Add extra argument to gfc_build_array_ref. Rename
gfc_conv_aliased_arg to gfc_conv_subref_array_arg. Move
prototype of is_aliased_array to gfortran.h and rename it
gfc_is_subref_array. Add field span to lang_decl, add a new
decl lang specific flag accessed by GFC_DECL_SUBREF_ARRAY_P
and a new type flag GFC_DECL_SUBREF_ARRAY_P.
* trans.c (gfc_build_array_ref): Add the new argument, decl.
If this is a subreference array pointer, use the lang_decl
field 'span' to calculate the offset in bytes and use pointer
arithmetic to address the element.
* trans-array.c (gfc_conv_scalarized_array_ref,
gfc_conv_array_ref): Add the backend declaration as the third
field, if it is likely to be a subreference array pointer.
(gfc_conv_descriptor_dimension, gfc_trans_array_ctor_element,
gfc_trans_array_constructor_element, structure_alloc_comps,
gfc_conv_array_index_offset): For all other references to
gfc_build_array_ref, set the third argument to NULL.
(gfc_get_dataptr_offset): New function.
(gfc_conv_expr_descriptor): If the rhs of a pointer assignment
is a subreference array, then calculate the offset to the
subreference of the first element and set the descriptor data
pointer to this, using gfc_get_dataptr_offset.
trans-expr.c (gfc_get_expr_charlen): Use the expression for the
character length for a character subreference.
(gfc_conv_substring, gfc_conv_subref_array_arg): Add NULL for
third argument in call to gfc_build_array_ref.
(gfc_conv_aliased_arg): Rename to gfc_conv_subref_array_arg.
(is_aliased_array): Remove.
(gfc_conv_function_call): Change reference to is_aliased_array
to gfc_is_subref_array and reference to gfc_conv_aliased_arg to
gfc_conv_subref_array_arg.
(gfc_trans_pointer_assignment): Add the array element length to
the lang_decl 'span' field.
* gfortran.h : Add subref_array_pointer to symbol_attribute and
add the prototype for gfc_is_subref_array.
* trans-stmt.c : Add NULL for third argument in all references
to gfc_build_array_ref.
* expr.c (gfc_is_subref_array): Renamed is_aliased_array.
If this is a subreference array pointer, return true.
(gfc_check_pointer_assign): If the rhs is a subreference array,
set the lhs subreference_array_pointer attribute.
* trans-decl.c (gfc_get_symbol_decl): Allocate the lang_decl
field if the symbol is a subreference array pointer and set an
initial value of zero for the 'span' field.
* trans-io.c (set_internal_unit): Refer to is_subref_array and
gfc_conv_subref_array_arg.
(nml_get_addr_expr): Add NULL third argument to
gfc_build_array_ref.
(gfc_trans_transfer): Use the scalarizer for a subreference
array.
2007-09-16 Paul Thomas <pault@gcc.gnu.org>
PR fortran/29396
PR fortran/29606
PR fortran/30625
PR fortran/30871
* gfortran.dg/subref_array_pointer_1.f90: New test.
* gfortran.dg/subref_array_pointer_2.f90: New test.
From-SVN: r128523