2010-08-04 Richard Guenther <rguenther@suse.de>
PR middle-end/45176
* expr.c (expand_expr_real_1): Also preserve TARGET_MEM_REF
points-to set for original MEM_REF.
From-SVN: r162862
* gcc-interface/decl.c: Do not undefine IN_GCC_FRONTEND and do not
include expr.h.
(gnat_to_gnu_entity) <object>: Force address of -1 at the tree level
for the debug-only entity.
* gcc-interface/Make-lang.in (ada/decl.o): Adjust dependencies.
From-SVN: r162854
* simplify-rtx.c (simplify_binary_operation_1): Try to simplify away
NEG as operand of a MULT by merging it with the other operand.
* combine.c (make_compound_operation): Use trunc_int_for_mode when
generating a MULT with constant. Canonicalize PLUS and MINUS involving
MULT.
* config/arm/constraints.md (M): Examine only 32 bits of a
HOST_WIDE_INT.
* config/arm/predicates.md (power_of_two_operand): Likewise.
From-SVN: r162849
2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* dependency.c (gfc_deb_compare_expr): Remove any integer
conversion functions to larger types from both arguments.
Remove handling these functions futher down.
2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* gfortran.dg/dependency_30.f90: New test.
From-SVN: r162848
* ipa-split.c (struct split_point): Add split_part_set_retval.
(find_retval): Forward declare.
(test_nonssa_use, mark_nonssa_use): Special case return by reference.
(consider_split): Compute current->split_part_set_retval.
(visit_bb): Do not look into return value.
(split_function): Handle !split_part_set_retval
From-SVN: r162842
2010-08-03 Martin Jambor <mjambor@suse.cz>
* tree-sra.c (completely_scalarize_record): New parameter REF, create
its own access->expr intead of using build_ref_for_offset.
From-SVN: r162841
* config/i386/i386.h (ix86_compare_op0, ix86_compare_op1): Remove.
* config/i386/i386.c (ix86_compare_op0, ix86_compare_op1): Remove.
(ix86_expand_branch): Add op0 and op1 arguments. Do not access
ix86_compare_op0 and ix86_compare_op1, use op0 and op1 instead.
Update calls to ix86_expand_compare and ix86_expand_branch.
(ix86_expand_setcc): Add op0 and op1 arguments. Update calls to
ix86_expand_compare.
(ix86_expand_compare): Add op0 and op1 arguments. Do not access
ix86_compare_op0 and ix86_compare_op1, use op0 and op1 instead.
Make static.
(ix86_expand_carry_flag_compare): Do not set ix86_compare_op0
and ix86_compare_op1. Update calls to ix86_expand_compare.
(ix86_expand_int_movcc): Ditto.
(ix86_expand_fp_movcc): Ditto. Update calls to ix86_expand_setcc.
* config/i386/i386-protos.h (ix86_expand_branch): Update prototype.
(ix86_expand_setcc): Ditto.
(ix86_expand_compare): Remove prototype.
* config/i386/i386.md (cbranch<SDWIM:mode>4): Do not set
ix86_compare_op0 and ix86_compare_op1. Update calls
to ix86_expand_branch to directly pass operands[1] and operands[2].
(cbranchxf4): Ditto.
(cbranch<MODEF:mode>4): Ditto.
(cbranchcc4): Ditto.
(cstore<SWIM:mode>4): Do not set ix86_compare_op0 and ix86_compare_op1.
Update calls to ix86_expand_setcc to directly pass operands[2] and
operands[3].
(cstorexf4): Ditto.
(cstore<MODEF:mode>4): Ditto.
(cstorecc4): Ditto.
From-SVN: r162837
2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* depencency.c (gfc_dep_resolver): Fix logic for when a loop
can be reversed.
2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* gfortran.dg/dependency_29.f90: New test.
From-SVN: r162829
2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/36854
* dependency.h: Add prototype for gfc_are_identical_variables.
* frontend-passes.c: Include depencency.h.
(optimimize_equality): Use gfc_are_identical_variables.
* dependency.c (identical_array_ref): New function.
(gfc_are_identical_variables): New function.
(gfc_deb_compare_expr): Use gfc_are_identical_variables.
* dependency.c (gfc_check_section_vs_section). Rename gfc_
prefix from statc function.
(check_section_vs_section): Change arguments to gfc_array_ref,
adjust function body accordingly.
2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/36854
* gfortran.dg/character_comparison_2.f90: New test.
* gfortran.dg/character_comparison_3.f90: New test.
* gfortran.dg/dependency_28.f90: New test.
From-SVN: r162824
* config/arm/arm.c (arm_rtx_costs_1): Remove second clause from the
if statement which adds extra costs to frame-related expressions.
From-SVN: r162816
PR target/40457
* config/arm/arm.h (arm_regs_in_sequence): Declare.
* config/arm/arm-protos.h (emit_ldm_seq, emit_stm_seq,
load_multiple_sequence, store_multiple_sequence): Delete
declarations.
(arm_gen_load_multiple, arm_gen_store_multiple): Adjust
declarations.
* config/arm/ldmstm.md: New file.
* config/arm/arm.c (arm_regs_in_sequence): New array.
(load_multiple_sequence): Now static. New args SAVED_ORDER,
CHECK_REGS. All callers changed.
If SAVED_ORDER is nonnull, copy the computed order into it.
If CHECK_REGS is false, don't sort REGS. Handle Thumb mode.
(store_multiple_sequence): Now static. New args NOPS_TOTAL,
SAVED_ORDER, REG_RTXS and CHECK_REGS. All callers changed.
If SAVED_ORDER is nonnull, copy the computed order into it.
If CHECK_REGS is false, don't sort REGS. Set up REG_RTXS just
like REGS. Handle Thumb mode.
(arm_gen_load_multiple_1): New function, broken out of
arm_gen_load_multiple.
(arm_gen_store_multiple_1): New function, broken out of
arm_gen_store_multiple.
(arm_gen_multiple_op): New function, with code from
arm_gen_load_multiple and arm_gen_store_multiple moved here.
(arm_gen_load_multiple, arm_gen_store_multiple): Now just
wrappers around arm_gen_multiple_op. Remove argument UP, all callers
changed.
(gen_ldm_seq, gen_stm_seq, gen_const_stm_seq): New functions.
* config/arm/predicates.md (commutative_binary_operator): New.
(load_multiple_operation, store_multiple_operation): Handle more
variants of these patterns with different starting offsets. Handle
Thumb-1.
* config/arm/arm.md: Include "ldmstm.md".
(ldmsi_postinc4, ldmsi_postinc4_thumb1, ldmsi_postinc3, ldmsi_postinc2,
ldmsi4, ldmsi3, ldmsi2, stmsi_postinc4, stmsi_postinc4_thumb1,
stmsi_postinc3, stmsi_postinc2, stmsi4, stmsi3, stmsi2 and related
peepholes): Delete.
* config/arm/ldmstm.md: New file.
* config/arm/arm-ldmstm.ml: New file.
testsuite/
PR target/40457
* gcc.target/arm/pr40457-1.c: New test.
* gcc.target/arm/pr40457-2.c: New test.
From-SVN: r162815
* config/arm/thumb2.md (thumb2_movdi, thumb2_movsf_soft_insn,
thumb2_movdf_soft_insn): Delete patterns.
* config/arm/arm.md (arm_pool_range, thumb2_pool_range,
arm_neg_pool_range, thumb2_neg_pool_range): New attributes.
(pool_range, neg_pool_range): Use them to define defaults.
(movdi, arm_movsf_soft_insn, arm_movdf_soft_insn): Define them
and allow for TARGET_32BIT.
From-SVN: r162814
* final.c (final_scan_insn): Call CC_STATUS_INIT unconditionally.
* config/arm/arm.c (thumb1_code): New variable.
(arm_override_options): Set it.
(thumb1_final_prescan_insn): Keep track of condition code status.
(arm_adjust_cost): For Thumb, try to keep cc-setting insns next to
jumps that depend on them.
* config/arm/arm.h (thumb1_code): Declare variable.
(struct machine_function): Guard with #ifndef GENERATOR_FILE. Add
members thumb1_cc_insn, thumb1_cc_op0, thumb1_cc_op1 and
thumb1_cc_mode.
(CC_STATUS_INIT): New macro.
* config/arm/constraints.md (Pd): New constraint.
* config/arm/predicates.md (noov_comparison_operator): New predicate.
* config/arm/arm.md (is_thumb1): New define_attr.
(conds): Set default to "clob" when generating Thumb1 code.
(thumb1_bicsi3): Renamed from bicsi3. All uses changed. Condition
code are set. Use two-operand assembly syntax.
(thumb1_subsi3_insn): Condition codes are set. Now a properly named
pattern.
(thumb1_andsi3_insn, thumb1_iorsi3_insn, thumb1_xorsi3_insn): Condition
codes are set. Use two-operand assembly syntax.
(zero_extendhisi splitter): Remove constraints.
(thumb1_movsi_insn, thumb1_movhi_insn, thumb1_movqi_insn, thumb1_movhf,
thumb1_movsf_insn): Set conds attribute as appropriate.
(cbranchsi4_insn): Use condition code status from struct
machine_function to determine whether the comparison can be eliminated.
Discourage the alternative using high registers.
(movsi_cbranchsi4, andsi3_cbranch, orrsi3_cbranch_scratch,
orrsi3_cbranch, xorsi3_cbranch_scratch, xorsi3_cbranch,
bicsi3_cbranch_scratch, bicsi3_cbranch, subsi3_cbranch_scratch,
subsi3_cbranch): Delete.
(movsi_cbranchsi4 peepholes): Rewrite to generate a sequence of
one subtract and one cbranch insn.
From-SVN: r162813
PR target/45142
* config/i386/sse.md (vec_set<mode>_0): Do not set mode attribute for
alternative 2.
(vec_set<moode>_0 splitter): Use SSEMODE4S mode iterator to also
split V4SI operands.
From-SVN: r162797
gcc/
* tree-ssa-math-opts.c (convert_plusminus_to_widen): Fix type
used in the call to optab_for_tree_code. Fix the second
is_widening_mult_p call. Check that both unwidened operands
have the same sign.
From-SVN: r162784
2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
PR fortran/42051
PR fortran/44064
* symbol.c (changed_syms): Made non-static.
* parse.c (changed_syms): Declare new external.
(next_statement): Assert changed_syms is NULL at the beginning.
From-SVN: r162776
* config/i386/i386.md (mov<SWIM:mode>cc and corresponding splitter):
Use ordered_comparison_operator predicate for operator1.
(add<mode>cc): ditto.
From-SVN: r162775
2010-07-30 Janus Weil <janus@gcc.gnu.org>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/44929
* match.c (match_type_spec): Try to parse derived types before
intrinsic types.
2010-07-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/44929
* gfortran.dg/allocate_derived_3.f90: New.
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>
From-SVN: r162724