PR debug/43092
PR rtl-optimization/43494
* rtl.h (for_each_inc_dec_fn): New type.
(for_each_inc_dec): Declare.
* rtlanal.c (struct for_each_inc_dec_ops): New type.
(for_each_inc_dec_find_inc_dec): New fn.
(for_each_inc_dec_find_mem): New fn.
(for_each_inc_dec): New fn.
* dse.c (struct insn_size): Remove.
(replace_inc_dec, replace_inc_dec_mem): Remove.
(emit_inc_dec_insn_before): New fn.
(check_for_inc_dec): Use it, along with for_each_inc_dec.
(canon_address): Pass mem modes to cselib_lookup.
* cselib.h (cselib_lookup): Add memmode argument. Adjust callers.
(cselib_lookup_from_insn): Likewise.
(cselib_subst_to_values): Likewise.
* cselib.c (find_slot_memmode): New var.
(cselib_find_slot): New fn. Use it instead of
htab_find_slot_with_hash everywhere.
(entry_and_rtx_equal_p): Use find_slot_memmode.
(autoinc_split): New fn.
(rtx_equal_for_cselib_p): Rename and implement in terms of...
(rtx_equal_for_cselib_1): ... this. Take memmode, pass it on.
Deal with autoinc. Special-case recursion into MEMs.
(cselib_hash_rtx): Likewise.
(cselib_lookup_mem): Infer pmode from address mode. Distinguish
address and MEM modes.
(cselib_subst_to_values): Add memmode, pass it on.
Deal with autoinc.
(cselib_lookup): Add memmode argument, pass it on.
(cselib_lookup_from_insn): Add memmode.
(cselib_invalidate_rtx): Discard obsolete push_operand handling.
(struct cselib_record_autoinc_data): New.
(cselib_record_autoinc_cb): New fn.
(cselib_record_sets): Use it, along with for_each_inc_dec. Pass MEM
mode to cselib_lookup. Reset autoinced REGs here instead of...
(cselib_process_insn): ... here.
* var-tracking.c (replace_expr_with_values, use_type): Pass MEM mode
to cselib_lookup.
(add_uses): Likewise, also to cselib_subst_to_values.
(add_stores): Likewise.
* sched-deps.c (add_insn_mem_dependence): Pass mode to
cselib_subst_to_values.
(sched_analyze_1, sched_analyze_2): Likewise. Adjusted.
* gcse.c (do_local_cprop): Adjusted.
* postreload.c (reload_cse_simplify_set): Adjusted.
(reload_cse_simplify_operands): Adjusted.
* sel-sched-dump (debug_mem_addr_value): Pass mode.
From-SVN: r169782
gcc/ChangeLog:
PR tree-optimization/45122
* tree-ssa-loop-niter.c (number_of_iterations_exit): Don't make
unsafe assumptions when there's more than one loop exit.
gcc/testsuite/ChangeLog:
PR tree-optimization/45122
* gcc.dg/tree-ssa/pr45122.c: New.
From-SVN: r169781
PR rtl-optimization/47525
* df-scan.c: Update copyright years.
(df_get_call_refs): Do not mark global registers as DF_REF_REG_USE
and non-clobber DF_REF_REG_DEF for calls to const and pure functions.
From-SVN: r169768
2011-02-02 Janus Weil <janus@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/47082
* trans-expr.c (gfc_trans_class_init_assign): Add call to
gfc_get_derived_type.
* module.c (read_cleanup): Do not use unique_symtrees for vtabs
or vtypes.
2011-02-02 Janus Weil <janus@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>
PR fortran/47082
* gfortran.dg/class_37.f03 : New test.
Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r169767
PR middle-end/47543
* reload.c (find_reloads_address): Handle reg+d address where both
components are invalid by reloading the entire address.
From-SVN: r169533
2011-02-02 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/47576
PR tree-optimization/47555
* doc/invoke.texi (scev-max-expr-complexity): Documented.
* params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
(PARAM_SCEV_MAX_EXPR_COMPLEXITY): Declared.
* tree-scalar-evolution.c (follow_ssa_edge): Use
PARAM_SCEV_MAX_EXPR_COMPLEXITY.
From-SVN: r169530
2011-02-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47566
* builtins.c (builtin_save_expr): No SAVE_EXPR for SSA_NAMEs.
* gcc.dg/lto/20110201-1_0.c: New testcase.
From-SVN: r169518
PR debug/47106
PR debug/47402
* tree-inline.c (declare_return_variable): Add result decl to
local decls only once.
* gimple-low.c (record_vars_into): Mark newly-created variables
as referenced.
From-SVN: r169514
2011-02-01 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/47561
* toplev.c (process_options): Print the Graphite flags. Add
flag_loop_flatten to the list of options requiring Graphite.
From-SVN: r169496
2011-02-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47559
* tree-ssa-loop-im.c (can_sm_ref_p): Do not perform
store-motion on references that can throw.
* g++.dg/torture/pr47559.C: New testcase.
From-SVN: r169487
* tree-dump.c (dump_option_value_info): Add entry for TDF_CSELIB.
* tree-pass.h (TDF_CSELIB): New macro.
* cselib.c (new_cselib_val, expand_loc, cselib_expand_value_rtx_1,
cselib_lookup): Check for it rather than for TDF_DETAILS.
From-SVN: r169482
2011-02-01 H.J. Lu <hongjiu.lu@intel.com>
PR driver/47547
* lto-wrapper.c (run_gcc): Don't add -dumpdir if linker_output
is HOST_BIT_BUCKET.
* opts.c (finish_options): Don't add x_aux_base_name if it is
HOST_BIT_BUCKET.
From-SVN: r169479
2011-02-01 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47555
Revert
2010-07-15 Sebastian Pop <sebastian.pop@amd.com>
* params.def (PARAM_SCEV_MAX_EXPR_SIZE): Bump the value to 100.
* gcc.dg/pr47555.c: New testcase.
From-SVN: r169478