2010-07-23 Daniel Kraft <d@domob.eu>
PR fortran/44709
* gfortran.h (gfc_find_symtree_in_proc): New method.
* symbol.c (gfc_find_symtree_in_proc): New method.
* match.c (match_exit_cycle): Look for loop name also in parent
namespaces within current procedure.
2010-07-23 Daniel Kraft <d@domob.eu>
PR fortran/44709
* gfortran.dg/exit_1.f08: New test.
* gfortran.dg/exit_2.f08: New test.
From-SVN: r162450
gcc/
* tree-ssa-math-opts.c (is_widening_mult_rhs_p): New function.
(is_widening_mult_p): Likewise.
(convert_to_widen): Use them.
(convert_plusminus_to_widen): Likewise. Handle fixed-point types as
well as integer ones.
From-SVN: r162431
* alias.c (true_dependence_1): New function, merged version of
true_dependence and canon_true_dependence.
(true_dependence): Simplify.
(canon_true_dependence): Simplify.
From-SVN: r162430
PR target/45027
* config/i386/i386.c (setup_incoming_varargs_64): Force the use
of V4SFmode for the SSE saves; increase stack alignment if needed.
(ix86_gimplify_va_arg): Don't increase stack alignment here.
From-SVN: r162429
PR ada/44892
* gcc-interface/utils.c (convert): Fix thinko in test.
(unchecked_convert): When converting from a scalar type to a type with
a different size, pad to have the same size on both sides.
From-SVN: r162425
2010-07-22 Steve Ellcey <sje@cup.hp.com>
PR middle-end/44878
* stmt.c (expand_value_return): Call promote_function_mode with
a for_return argument of 2 when returning by reference.
From-SVN: r162423
Fix PR debug/45024
gcc/ChangeLog:
PR debug/45024
* dwarf2out.c (scope_die_for): Don't fall back to the compilation
unit DIE if we can find the scope DIE.
gcc/testsuite/ChangeLog:
PR debug/45024
* g++.dg/debug/dwarf2/nested-2.C: New test case.
From-SVN: r162420
* ira-build.c (ira_create_object): New arg SUBWORD; all callers changed.
Initialize OBJECT_SUBWORD.
(ira_create_allocno): Clear ALLOCNO_NUM_OBJECTS.
(ira_create_allocno_objects): Renamed from ira_create_allocno_object;
all callers changed.
(merge_hard_reg_conflicts): Iterate over allocno subobjects.
(finish_allocno): Likewise.
(move_allocno_live_ranges, copy_allocno_live_ranges): Likewise.
(remove_low_level_allocnos): Likewise.
(update_bad_spill_attribute): Likewise.
(setup_min_max_allocno_live_range_point): Likewise.
(sort_conflict_id_map): Likewise.
(ira_flattening): Likewise. Use ior_hard_reg_conflicts.
(ior_hard_reg_conflicts): New function.
(ior_allocate_object_conflicts): Renamed first argument to OBJ.
(compress_conflict_vecs): Iterate over objects, not allocnos.
(ira_add_live_range_to_object): New function.
(object_range_compare_func): Renamed from allocno_range_compare_func.
All callers changed.
(setup_min_max_conflict_allocno_ids): For allocnos with multiple
subobjects, widen the min/max range of the lowest-order object to
potentially include all other such low-order objects.
* ira.c (ira_bad_reload_regno_1): Iterate over allocno subobjects.
(check_allocation): Likewise. Use more fine-grained tests for register
conflicts.
* ira-color.c (allocnos_have_intersected_live_ranges_p): Iterate over
allocno subobjects.
(assign_hard_reg): Keep multiple sets of conflicts. Make finer-grained
choices about which bits to set in each set. Don't use
ira_hard_reg_not_in_set_p, perform a more elaborate test for conflicts
using the multiple sets we computed.
(push_allocno_to_stack): Iterate over allocno subobjects.
(all_conflicting_hard_regs_coalesced): New static function.
(setup_allocno_available_regs_num): Use it.
(setup_allocno_left_conflicts_size): Likewise. Iterate over allocno
subobjects.
(coalesced_allocno_conflict): Test subobject 0 in each allocno.
(setup_allocno_priorities): Divide ALLOCNO_EXCESS_PRESSURE_POINTS_NUM
by ALLOCNO_NUM_OBJECTS.
(calculate_spill_cost): Likewise.
(color_pass): Express if statement in a more normal way.
(ira_reassign_conflict_allocnos): Iterate over allocno subobjects.
(slot_coalesced_allocno_live_ranges_intersect_p): Likewise.
(setup_slot_coalesced_allocno_live_ranges): Likewise.
(allocno_reload_assign): Likewise.
(ira_reassign_pseudos): Likewise.
(fast_allocation): Likewise.
* ira-conflicts.c (build_conflict_bit_table): Likewise.
(print_allocno_conflicts): Likewise.
(ira_build_conflicts): Likewise.
(allocnos_conflict_for_copy_p): Renamed from allocnos_conflict_p. All
callers changed. Test subword 0 of each allocno for conflicts.
(build_object_conflicts): Renamed from build_allocno_conflicts. All
callers changed. Iterate over allocno subobjects.
* ira-emit.c (modify_move_list): Iterate over allocno subobjects.
* ira-int.h (struct ira_allocno): New member. num_objects. Rename object
to objects and change it into an array.
(ALLOCNO_OBJECT): Add new argument N.
(ALLOCNO_NUM_OBJECTS, OBJECT_SUBWORD): New macros.
(ira_create_allocno_objects): Renamed from ira_create_allocno_object.
(ior_hard_reg_conflicts): Declare.
(ira_add_live_range_to_object): Declare.
(ira_allocno_object_iterator): New.
(ira_allocno_object_iter_init, ira_allocno_object_iter_cond): New.
(FOR_EACH_ALLOCNO_OBJECT): New macro.
* ira-lives.c (objects_live): Renamed from allocnos_live; all uses changed.
(allocnos_processed): New sparseset.
(make_object_born): Renamed from make_allocno_born; take an ira_object_t
argument. All callers changed.
(make_object_dead): Renamed from make_allocno_dead; take an ira_object t
argument. All callers changed.
(update_allocno_pressure_excess_length): Take an ira_obejct_t argument.
All callers changed.
(mark_pseudo_regno_live): Iterate over allocno subobjects.
(mark_pseudo_regno_dead): Likewise.
(mark_pseudo_regno_subword_live, mark_pseudo_regno_subword_dead): New
functions.
(mark_ref_live): Detect subword accesses and call
mark_pseudo_regno_subword_live as appropriate.
(mark_ref_dead): Likewise for mark_pseudo_regno_subword_dead.
(process_bb_nodes_live): Deal with object-related updates first; set
and test bits in allocnos_processed to avoid computing allocno
statistics more than once.
(create_start_finish_chains): Iterate over objects, not allocnos.
(print_object_live_ranges): New function.
(print_allocno_live_ranges): Use it.
(ira_create_allocno_live_ranges): Allocate and free allocnos_processed
and objects_live.
From-SVN: r162418
2010-07-22 Richard Guenther <rguenther@suse.de>
PR lto/42451
* gimple.c (gtc_next_dfs_num): New global.
(struct sccs): Make value a union, add integer same_p member.
(gtc_visit): New function.
(gimple_types_compatible_p_1): New function, split out from ...
(gimple_types_compatible_p): ... here. Start a DFS walk here.
(iterative_hash_gimple_type): Adjust for sccs change.
* gcc.dg/lto/20100720-3_0.c: New testcase.
* gcc.dg/lto/20100720-3_1.c: Likewise.
From-SVN: r162415
2010-07-22 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/44891
* tree-sra.c: Include gimple-pretty-print.h.
(replace_uses_with_default_def_ssa_name): Renamed to
get_repl_default_def_ssa_name, return the new SSA name instead of
replacing the old one.
(sra_modify_assign): Dump a message when removing a load, if the LHS
is an SSA_NAME, do not do any propagation, just set the RHS to a
default definition SSA NAME, type convert if necessary.
* Makefile.in (tree-sra.o): Add gimple-pretty-print.h to dependencies.
* testsuite/gcc.c-torture/compile/pr44891.c: New test.
From-SVN: r162413
2010-07-22 Richard Guenther <rguenther@suse.de>
lto-plugin/
* Makefile.am: New copy_lto_plugin rule to install the plugin
into ../gcc.
* Makefile.in: Regenerated.
From-SVN: r162412
2010-07-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/45017
* tree-ssa-sccvn.c (vn_reference_eq): Make sure we honor
TYPE_PRECISION of integral types in addition to size.
* gcc.c-torture/execute/pr45017.c: New testcase.
From-SVN: r162411
2010-07-22 Daniel Kraft <d@domob.eu>
* trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
now in the correct place.
From-SVN: r162409
* config/darwin.h (LINK_COMMAND_SPEC): Split into...
(LINK_COMMAND_SPEC_A): New.
(DSYMUTIL): New.
(DSYMUTIL_SPEC): New.
* config/darwin9.h (LINK_COMMAND_SPEC): Remove.
(DSYMUTIL_SPEC): Update for darwin >= 9 requirements.
-This line, and those below, will be ignored--
M ChangeLog
M config/darwin.h
M config/darwin9.h
From-SVN: r162403
* calls.c (load_register_parameters): Move check for zero
sized items so that only the call to
mem_overlaps_already_clobbered_arg_p () is protected.
From-SVN: r162402
* ipa-pure-const.c (varying_state): Break out from ...
(get_function_state): ... here; always return varying_state
when state would be NULL otherwise.
(remove_node_data): Do not free varying state.
From-SVN: r162392
* function.c (record_hard_reg_sets): Restrict the previous change
to cases where the incoming nominal mode is the same as the
incoming promoted mode and everything happens in MODE_INT.
From-SVN: r162391
PR bootstrap/44970
PR middle-end/45009
* postreload.c: Include "target.h".
(reload_combine_closest_single_use): Don't take DEBUG_INSNs
into account.
(fixup_debug_insns): Don't copy the rtx.
(reload_combine_recognize_const_pattern): DEBUG_INSNs can't
have uses. Don't copy when replacing. Call fixup_debug_insns
in the case where we merged one add with another.
(reload_combine_recognize_pattern): Fail if there aren't any
uses. Try harder to determine whether we're picking a valid
index register. Don't set store_ruid for an insn we're going
to scan in the next iteration.
(reload_combine): Remove unused code.
(reload_combine_note_use): When updating use information for
an old insn, ignore a use that occurs after store_ruid.
* Makefile.in (postreload.o): Update dependencies.
From-SVN: r162390
PR debug/45015
* var-tracking.c (adjust_mems): Ignore ASM_OPERANDS with non-zero
ASM_OPERANDS_OUTPUT_IDX.
(adjust_insn): For inline asm with multiple sets ensure first
ASM_OPERANDS vectors are used by all following ASM_OPERANDS in
the insn.
* gcc.target/m68k/pr45015.c: New test.
From-SVN: r162385
2010-07-21 Changpeng Fang <changpeng.fang@amd.com>
PR tree-optimization/44955
* tree-ssa-loop-prefetch.c (analyze_ref): Strip off the real
and imagine parts of a complex, so that they can have the same
base and fall into the same group.
From-SVN: r162381
2010-07-21 Richard Guenther <rguenther@suse.de>
PR lto/45018
* tree.c (find_decls_types_r): Do not follow TREE_CHAIN
of TYPE_DECLs. Do not follow TYPE_NEXT_VARIANT,
TYPE_NEXT_PTR_TO, nor TYPE_NEXT_REF_TO or TYPE_CANONICAL.
* g++.dg/lto/20100721-1_0.C: New testcase.
From-SVN: r162380