Commit Graph

314 Commits

Author SHA1 Message Date
Jakub Jelinek aa326bfb90 cprop.c (cprop_jump): Add missing space in string literal.
* cprop.c (cprop_jump): Add missing space in string literal.
	* tree-ssa-structalias.c (rewrite_constraints): Likewise.
	(get_constraint_for_component_ref): Likewise.
	* df-core.c (df_worklist_dataflow_doublequeue): Likewise.
	* tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
	* lra-constraints.c (process_alt_operands): Likewise.
	* ipa-inline.c (inline_small_functions): Likewise.
	* tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
	* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
	* trans-mem.c (diagnose_tm_1_op): Likewise.
	* omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
	(grid_parallel_clauses_gridifiable): Likewise.
c/
	* c-parser.c (c_parser_oacc_declare): Add missing space in
	diagnostics.
fortran/
	* trans-expr.c (gfc_conv_substring): Add missing space in diagnostics.

From-SVN: r245409
2017-02-13 22:56:13 +01:00
Richard Biener ed20a004e1 re PR rtl-optimization/72488 (wrong code (SIGFPE) at -Os and above on x86_64-linux-gnu (in the 64-bit mode))
2017-01-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/72488
	* tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
	sure to restore SSA info.
	* tree-ssa.c (verify_ssa): Verify SSA info is not shared.

From-SVN: r244623
2017-01-19 12:00:42 +00:00
Jakub Jelinek bd2c62704b re PR translation/79019 (translatable string typo in cif-code.def:141)
PR translation/79019
	PR translation/79020
	* params.def (PARAM_INLINE_MIN_SPEEDUP,
	PARAM_IPA_CP_SINGLE_CALL_PENALTY,
	PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
	in descriptions.
	* config/avr/avr.opt (maccumulate-args): Likewise.
	* config/msp430/msp430.opt (mwarn-mcu): Likewise.
	* common.opt (freport-bug): Likewise.
	* cif-code.def (CIF_FINAL_ERROR): Likewise.
	* doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
	* config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
	translatable string.
	* config/i386/i386.c (function_value_32): Likewise.
	* config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
	* config/msp430/msp430.c (msp430_option_override, msp430_attr):
	Likewise.
	* config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
	* common/config/msp430/msp430-common.c (msp430_handle_option):
	Likewise.
	* symtab.c (symtab_node::verify_base): Likewise.
	* opts.c (set_debug_level): Likewise.
	* tree.c (verify_type_variant): Likewise.  Fix typo in comment.
	* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
	missing whitespace to translatable strings.
	* config/avr/avr.md (bswapsi2): Fix typo in comment.
	* config/sh/superh.h: Likewise.
	* config/i386/xopintrin.h: Likewise.
	* config/i386/znver1.md: Likewise.
	* config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
	* ipa-inline-analysis.c (compute_inline_parameters): Likewise.
	* double-int.h (struct double_int): Likewise.
	* double-int.c (div_and_round_double): Likewise.
	* wide-int.cc: Likewise.
	* tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
	* cfgcleanup.c (crossjumps_occured): Renamed to ...
	(crossjumps_occurred): ... this.
	(try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
	Adjust all uses.
cp/
	* semantics.c (finish_omp_clauses): Add missing whitespace to
	translatable strings.
	* cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
lto/
	* lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
fortran/
	* decl.c (attr_decl1): Fix spelling in translatable string.
	* intrinsic.texi: Fix spelling - invokation -> invocation.
	* lang.opt (faggressive-function-elimination, gfc_convert): Fix
	typos in descriptions.
	* openmp.c (resolve_omp_clauses): Add missing whitespace to
	translatable strings.
c-family/
	* c.opt (Wnormalized=): Fix typo in description.
testsuite/
	* c-c++-common/goacc/host_data-2.c (f): Adjust expected spelling of
	diagnostics.
	* gfortran.dg/initialization_17.f90: Likewise.

From-SVN: r244245
2017-01-09 22:48:33 +01:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Richard Biener 14e7281244 fold-const.c (tree_swap_operands_p): Remove unused arg.
2016-11-09  Richard Biener  <rguenther@suse.de>

	* fold-const.c (tree_swap_operands_p): Remove unused arg.
	* fold-const.c (tree_swap_operands_p): Likewise.
	(fold_binary_loc): Adjust.
	(fold_ternary_loc): Likewise.
	* genmatch.c (dt_operand::gen_gimple_exp): Likewise.
	* gimple-fold.c (fold_stmt_1): Likewise.
	* gimple-match-head.c (gimple_resimplify2): Likewise.
	(gimple_resimplify3): Likewise.
	(gimple_simplify): Likewise.
	* tree-ssa-dom.c (record_equality): Likewise.
	* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Likewise.
	* tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise.
	* tree-ssa-threadedge.c (simplify_control_stmt_condition_1): Likewise.

From-SVN: r242004
2016-11-09 15:15:28 +00:00
Thomas Preud'homme 4d0cdd0ce6 Move MEMMODEL_* from coretypes.h to memmodel.h
2016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition
    into ...
    * memmodel.h: This file.
    * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c,
      caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c,
      cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c,
      combine-stack-adj.c, common/config/aarch64/aarch64-common.c,
      common/config/arm/arm-common.c, common/config/bfin/bfin-common.c,
      common/config/c6x/c6x-common.c, common/config/i386/i386-common.c,
      common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c,
      compare-elim.c, config/aarch64/aarch64-builtins.c,
      config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c,
      config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c,
      config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c,
      config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c,
      config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c,
      config/darwin.c, config/epiphany/epiphany.c,
      config/epiphany/mode-switch-use.c,
      config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c,
      config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c,
      config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c,
      config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c,
      config/m68k/m68k.c, config/mcore/mcore.c,
      config/microblaze/microblaze.c, config/mmix/mmix.c,
      config/mn10300/mn10300.c, config/moxie/moxie.c,
      config/msp430/msp430.c, config/nds32/nds32-cost.c,
      config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
      config/nds32/nds32-memory-manipulation.c,
      config/nds32/nds32-predicates.c, config/nds32/nds32.c,
      config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c,
      config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c,
      config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c,
      config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc,
      config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c,
      config/stormy16/stormy16.c, config/tilegx/tilegx.c,
      config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c,
      config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c,
      coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c,
      df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c,
      dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c,
      expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c,
      ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c,
      ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c,
      ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c,
      loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c,
      lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c,
      lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c,
      lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c,
      postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c,
      recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c,
      reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c,
      rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c,
      sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c,
      stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c,
      targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c,
      tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c,
      tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c,
      tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c,
      var-tracking.c, varasm.c: Include memmodel.h.
    * genattrtab.c (write_header): Include memmodel.h in generated file.
    * genautomata.c (main): Likewise.
    * gengtype.c (open_base_files): Likewise.
    * genopinit.c (main): Likewise.
    * genconditions.c (write_header): Include memmodel.h earlier in
    generated file.
    * genemit.c (main): Likewise.
    * genoutput.c (output_prologue): Likewise.
    * genpeep.c (main): Likewise.
    * genpreds.c (write_insn_preds_c): Likewise.
    * genrecog.c (write_header): Likewise.
    * Makefile.in (PLUGIN_HEADERS): Include memmodel.h

    gcc/ada/
    * gcc-interface/utils2.c: Include memmodel.h.

    gcc/c-family/
    * c-cppbuiltin.c: Include memmodel.h.
    * c-opts.c: Likewise.
    * c-pragma.c: Likewise.
    * c-warn.c: Likewise.

    gcc/c/
    * c-typeck.c: Include memmodel.h.

    gcc/cp/
    * decl2.c: Include memmodel.h.
    * rtti.c: Likewise.

    gcc/fortran/
    * trans-intrinsic.c: Include memmodel.h.

    gcc/go/
    * go-backend.c: Include memmodel.h.

    libgcc/
    * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_*
    equivalent.
    * config/tilepro/atomic.c: Likewise and stop casting model to
    enum memmodel.

From-SVN: r241121
2016-10-13 14:17:52 +00:00
Richard Biener 37f6a157f5 re PR tree-optimization/77839 (Memory- and compile time hog at -O1 and above)
2016-10-06  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77839
	* tree-ssa-sccvn.c (set_ssa_val_to): Forbid value -> constant value
	lattice transition.

	* gcc.dg/torture/pr77839.c: New testcase.

From-SVN: r240829
2016-10-06 08:54:37 +00:00
Richard Biener ca0e1607e9 re PR bootstrap/77768 (LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: internal compiler error: Segmentation fault)
2016-09-29  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77768
	* tree-ssa-sccvn.c (visit_reference_op_store): Properly deal
	with stores to a place we know has a constant value.

From-SVN: r240610
2016-09-29 07:15:13 +00:00
Richard Biener 59896334f9 re PR tree-optimization/77745 (Inconsistent application of aliasing rules)
2016-09-27  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77745
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	When removing redundant stores make sure to check compatibility
	of the TBAA state for downstream accesses.
	* tree-ssa-sccvn.c (visit_reference_op_store): Likewise for when
	value-numbering virtual operands for store matches.

	* g++.dg/torture/pr77745.C: New testcase.

From-SVN: r240534
2016-09-27 12:56:38 +00:00
Richard Biener 113d06a486 tree-ssa-sccvn.c (visit_reference_op_call): Value number virtual definition to virtual use if...
2016-09-23  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (visit_reference_op_call): Value number
	virtual definition to virtual use if the call devirtualizes
	to a const or pure function.
	(visit_use): Also visit calls we can devirtualize to a
	const or pure function.

	* gcc.dg/tree-ssa/ssa-fre-56.c: New testcase.

From-SVN: r240431
2016-09-23 12:39:05 +00:00
Jakub Jelinek 199d1d488f ipa-cp.c (ipcp_store_vr_results): Avoid static local var zero.
* ipa-cp.c (ipcp_store_vr_results): Avoid static local
	var zero.
	* sreal.h (sreal::min, sreal::max): Avoid static local vars,
	construct values without normalization.
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Don't initialize
	static local lhs_ops to vNULL.
cp/
	* name-lookup.c (store_bindings, store_class_bindings): Don't
	initialize static local bindings_need_stored to vNULL.

From-SVN: r240408
2016-09-23 11:43:09 +02:00
Richard Biener b5bbe47bb3 re PR tree-optimization/77646 (GCC Segfault with -O3)
2016-09-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77646
	* tree-ssa-sccvn.c (visit_reference_op_call): Always value-number
	a VDEF.

	* gcc.dg/torture/pr77646.c: New testcase.

From-SVN: r240261
2016-09-20 12:20:37 +00:00
Kugan Vivekanandarajah 46aa019a01 Iterator to visit SSA
Iterator to visit SSA
gcc/ChangeLog:

2016-09-15  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* tree-ssanames.h (FOR_EACH_SSA_NAME): New.
	* cfgexpand.c (update_alias_info_with_stack_vars): Use
	FOR_EACH_SSA_NAME to iterate over SSA variables.
	(pass_expand::execute): Likewise.
	* omp-simd-clone.c (ipa_simd_modify_function_body): Likewise.
	* tree-cfg.c (dump_function_to_file): Likewise.
	* tree-into-ssa.c (pass_build_ssa::execute): Likewise.
	(update_ssa): Likewise.
	* tree-ssa-alias.c (dump_alias_info): Likewise.
	* tree-ssa-ccp.c (ccp_finalize): Likewise.
	* tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise.
	(create_outofssa_var_map): Likewise.
	(coalesce_ssa_name): Likewise.
	* tree-ssa-operands.c (dump_immediate_uses): Likewise.
	* tree-ssa-pre.c (compute_avail): Likewise.
	* tree-ssa-sccvn.c (init_scc_vn): Likewise.
	(scc_vn_restore_ssa_info): Likewise.
	(free_scc_vn): Likwise.
	(run_scc_vn): Likewise.
	* tree-ssa-structalias.c (compute_points_to_sets): Likewise.
	* tree-ssa-ter.c (new_temp_expr_table): Likewise.
	* tree-ssa-copy.c (fini_copy_prop): Likewise.
	* tree-ssa.c (verify_ssa): Likewise.

From-SVN: r240152
2016-09-15 02:03:51 +00:00
Richard Biener e4969090b6 re PR tree-optimization/73434 (Wrong code with casting, branches and aliasing)
2016-08-15  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/73434
	* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Preserve
	TBAA info on the base when forwarding a non-invariant address.

	* gcc.dg/torture/pr73434.c: New testcase.

From-SVN: r239471
2016-08-15 09:56:00 +00:00
Richard Biener 13e889530d gimple-fold.c (get_base_constructor): Add VIEW_CONVERT case, handle all tcc_constant bases and valueize SSA names.
2016-07-19  Richard Biener  <rguenther@suse.de>

	* gimple-fold.c (get_base_constructor): Add VIEW_CONVERT case,
	handle all tcc_constant bases and valueize SSA names.
	* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle
	tcc_constant bases.

	* c-c++-common/vector-subscript-6.c: New testcase.
	* c-c++-common/vector-subscript-7.c: Likewise.

From-SVN: r238475
2016-07-19 14:16:54 +00:00
Richard Biener cef5388d95 re PR tree-optimization/71901 (ice in find_or_generate_expression)
2016-07-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71901
	* tree-ssa-sccvn.h (struct vn_reference_op_struct): Add
	align member, group stuff with the bitfield.
	(vn_ref_op_align_unit): New inline.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): For ARRAY_REFs
	record element alignment and operand 3 unchanged.
	(ao_ref_init_from_vn_reference): Adjust.
	(valueize_refs_1): Likewise.
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.

	* gcc.dg/torture/pr71901.c: New testcase.

From-SVN: r238468
2016-07-19 10:19:46 +00:00
Richard Biener 2e7565b268 re PR tree-optimization/71893 (gfortran.dg ICEs in gcc/tree-ssa-pre.c; -fcode-hoisting?)
2016-07-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71893
	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Compensate
	for sizetype cast added by array_ref_element_size.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.

From-SVN: r238426
2016-07-18 08:46:42 +00:00
Richard Biener 351168fe55 re PR tree-optimization/71866 (gcc locks up after fix for PR70159)
2016-07-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71866
	* tree-ssa-pre.c (get_constant_for_value_id): Remove.
	(do_hoist_insertion): Avoid endless recursion when we
	didn't insert anything because we managed to simplify
	things down to a constant or SSA name.
	(fully_constant_expression): Re-write in terms of ...
	* tree-ssa-sccvn.h (vn_nary_simplify): ... this.  Declare.
	* tree-ssa-sccvn.c (vn_nary_simplify): New wrapper around
	vn_nary_build_or_lookup_1.
	(vn_nary_build_or_lookup_1): Added flag and renamed from ...
	(vn_nary_build_or_lookup): ... this which now wraps it.

	* gcc.dg/torture/pr71866.c: New testcase.

From-SVN: r238334
2016-07-14 12:15:38 +00:00
Trevor Saunders 8c6812476a use auto_vec for more local variables
gcc/c/ChangeLog:

2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* c-parser.c (c_parser_generic_selection): Make type of variable
	auto_vec.
	(c_parser_omp_declare_simd): Likewise.

gcc/ChangeLog:

2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* cfgexpand.c (expand_used_vars): Make the type of a local variable auto_vec.
	* genmatch.c (lower_for): Likewise.
	* haifa-sched.c (haifa_sched_init): Likewise.
	(add_to_speculative_block): Likewise.
	(create_check_block_twin): Likewise.
	* predict.c (handle_missing_profiles): Likewise.
	* tree-data-ref.c (loop_nest_has_data_refs): Likewise.
	* tree-diagnostic.c (maybe_unwind_expanded_macro_loc): Likewise.
	* tree-ssa-loop-niter.c (discover_iteration_bound_by_body_walk): Likewise.
	(maybe_lower_iteration_bound): Likewise.
	* tree-ssa-sccvn.c (DFS): Likewise.
	* tree-stdarg.c (reachable_at_most_once): Likewise.
	* tree-vect-stmts.c (vectorizable_conversion): Likewise.
	(vectorizable_store): Likewise.

From-SVN: r238285
2016-07-13 02:44:52 +00:00
Trevor Saunders fcd215916e tree-ssa-sccvn.c: use auto_vec for sccvn_dom_walker::cond_stack
gcc/ChangeLog:

2016-07-12  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* tree-ssa-sccvn.c (sccvn_dom_walker::~sccvn_dom_walker): remove.
	(sccvn_dom_walker): make cond_stack an auto_vec.

From-SVN: r238284
2016-07-13 02:44:35 +00:00
Richard Biener 3c5b29f561 tree-ssa-pre.c: Include alias.h.
2016-07-07  Richard Biener  <rguenther@suse.de>

	* tree-ssa-pre.c: Include alias.h.
	(compute_avail): If we have multiple VN_REFERENCEs with the
	same hashtable entry adjust that to make it a valid replacement
	for all of them with respect to alignment and aliasing
	when doing insertion.
	* tree-ssa-sccvn.h (vn_reference_operands_for_lookup): Declare.
	* tree-ssa-sccvn.c (vn_reference_operands_for_lookup): New function.

From-SVN: r238078
2016-07-07 07:43:35 +00:00
Eric Botcazou ec67c62e3c tree-ssa-sccvn.c (vn_reference_lookup_3): Use a uniform test and update shared_lookup_references only once after changing...
* tree-ssa-sccvn.c (vn_reference_lookup_3): Use a uniform test and
	update shared_lookup_references only once after changing operands.

From-SVN: r237388
2016-06-13 17:44:12 +00:00
Richard Biener 1ef33ef304 re PR tree-optimization/71059 (gcc ICE at -O3 on valid code on x86_64-linux-gnu in "vn_nary_op_insert_into")
2016-05-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71059
	* tree-ssa-pre.c (phi_translate_1): Fully fold translated
	nary before looking up or entering the expression into the VN
	hashes.
	* tree-ssa-sccvn.c (vn_nary_build_or_lookup): Fix comment typo.
	Make sure to re-use NARYs without result as inserted by
	phi-translation.

	* gcc.dg/torture/pr71059.c: New testcase.

From-SVN: r236175
2016-05-12 13:46:26 +00:00
Richard Biener f35ea97de8 re PR tree-optimization/71055 (FAIL: gcc.dg/torture/pr53663-1.c -Os execution test)
2016-05-11  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/71055
	* tree-ssa-sccvn.c (vn_reference_lookup_3): When native-interpreting
	sth with precision not equal to access size verify we don't chop
	off bits.

	* gcc.dg/torture/pr71055.c: New testcase.

From-SVN: r236122
2016-05-11 14:04:32 +00:00
Richard Biener 64ea4e151b re PR tree-optimization/70497 (Missed CSE of subregs on GIMPLE)
2016-05-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70497
	PR tree-optimization/28367
	* tree-ssa-sccvn.c (vn_nary_build_or_lookup): New function
	split out from ...
	(visit_reference_op_load): ... here.
	(vn_reference_lookup_3): Use it to handle subreg-like accesses
	with simplified BIT_FIELD_REFs.
	* tree-ssa-pre.c (eliminate_insert): Handle inserting BIT_FIELD_REFs.
	* tree-complex.c (extract_component): Handle BIT_FIELD_REFs
	correctly.

	* gcc.dg/torture/20160404-1.c: New testcase.
	* gcc.dg/tree-ssa/ssa-fre-54.c: Likewise.
	* gcc.dg/tree-ssa/ssa-fre-55.c: Likewise.

From-SVN: r236066
2016-05-10 08:20:43 +00:00
Richard Sandiford 8de73453a4 Support << and >> for offset_int and widest_int
Following on from the comparison patch, I think it makes sense to
support << and >> for offset_int (int128_t) and widest_int (intNNN_t),
with >> being arithmetic shift.  It doesn't make sense to use
logical right shift on a potentially negative offset_int, since
the precision of 128 bits has no meaning on the target.

Tested on x86_64-linux-gnu and aarch64-linux-gnu.

gcc/
	* wide-int.h: Update offset_int and widest_int documentation.
	(WI_SIGNED_SHIFT_RESULT): New macro.
	(wi::binary_shift): Define signed_shift_result_type for
	shifts on offset_int- and widest_int-like types.
	(generic_wide_int): Support <<= and >>= if << and >> are supported.
	* tree.h (int_bit_position): Use shift operators instead of wi::
	 shifts.
	* alias.c (adjust_offset_for_component_ref): Likewise.
	* expr.c (get_inner_reference): Likewise.
	* fold-const.c (fold_comparison): Likewise.
	* gimple-fold.c (fold_nonarray_ctor_reference): Likewise.
	* gimple-ssa-strength-reduction.c (restructure_reference): Likewise.
	* tree-dfa.c (get_ref_base_and_extent): Likewise.
	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Likewise.
	(stmt_kills_ref_p): Likewise.
	* tree-ssa-ccp.c (bit_value_binop_1): Likewise.
	* tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
	(ao_ref_init_from_vn_reference): Likewise.

gcc/cp/
	* init.c (build_new_1): Use shift operators instead of wi:: shifts.

From-SVN: r235720
2016-05-02 09:39:38 +00:00
Richard Biener 65f52ee9b9 re PR tree-optimization/70724 (Miscompiles python3 with FDO)
2016-04-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70724
	* tree-ssa-sccvn.c (scc_vn_restore_ssa_info): Split SSA info
	restoring out from ...
	(free_scc_vn): ... here.
	* tree-ssa-sccvn.h (scc_vn_restore_ssa_info): Declare.
	* tres-ssa-pre.c (pass_pre::execute): Restore SSA info before
	tail merging.
	(pass_fre::execute): Restore SSA info.

	* gcc.dg/torture/pr70724.c: New testcase.

From-SVN: r235203
2016-04-19 13:22:19 +00:00
Richard Biener edd048e29a re PR tree-optimization/70701 (incomplete value numbering when memcpy-ing from array)
2016-04-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70701
	* tree-ssa-sccvn.c (vn_reference_lookup_3): Resolve fully constant
	references after translating through a memcpy.

	* gcc.dg/tree-ssa/ssa-fre-53.c: New testcase.

From-SVN: r235131
2016-04-18 11:39:04 +00:00
Jakub Jelinek 511e5c4889 re PR middle-end/70239 (ICE in ggc_set_mark)
PR middle-end/70239
	* tree-ssa-sccvn.c (VN_INFO_GET): Use safe_grow_cleared instead
	of safe_grow.

From-SVN: r234221
2016-03-15 17:10:59 +01:00
Richard Biener 87440c298e re PR tree-optimization/69776 (Wrong optimization with aliasing)
2016-02-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69776
	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Get alias
	sets from caller.
	(indirect_refs_may_alias_p): Likewise.
	(refs_may_alias_p_1): Pass alias sets as from ao_ref.
	* tree-ssa-sccvn.c (vn_reference_lookup): Also adjust vr alias-set
	according to tbaa_p.
	* tree-ssa-dom.c (lookup_avail_expr): Add tbaa_p flag.
	(optimize_stmt): For redundant store discovery do not allow tbaa.

	* gcc.dg/torture/pr69776-2.c: New testcase.

From-SVN: r233453
2016-02-16 15:00:45 +00:00
Richard Biener 1c48bff185 re PR tree-optimization/69776 (Wrong optimization with aliasing)
2016-02-15  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69776
	* tree-ssa-sccvn.h (vn_reference_lookup): Adjust prototype.
	* tree-ssa-sccvn.c (vn_reference_lookup): Add parameter to
	indicate whether we can use TBAA to disambiguate against stores.
	Use alias-set zero if not.
	(visit_reference_op_store): Do not use TBAA when looking up
	redundant stores.
	* tree-ssa-pre.c (compute_avail): Use TBAA here.
	(eliminate_dom_walker::before_dom_children): But not when looking
	up redundant stores.

	* gcc.dg/torture/pr69776.c: New testcase.

From-SVN: r233418
2016-02-15 08:42:38 +00:00
Richard Biener fa4511c2f4 re PR tree-optimization/69376 (wrong code at -Os and above on x86_64-linux-gnu)
2016-01-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69376
	* tree-ssa-sccvn.h (struct vn_ssa_aux): Add range_info_anti_range_p
	flag.
	(VN_INFO_ANTI_RANGE_P): New inline.
	(VN_INFO_RANGE_TYPE): Likewise.
	* tree-ssa-sccvn.c (set_ssa_val_to): Also record and copy
	SSA_NAME_ANTI_RANGE_P.
	(free_scc_vn): Restore SSA_NAME_ANTI_RANGE_P.
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Properly query VN_INFO_RANGE_TYPE.

	* gcc.dg/torture/pr69376.c: New testcase.

From-SVN: r232786
2016-01-25 09:05:47 +00:00
Richard Biener fac40b023f re PR tree-optimization/69378 (FAIL: g++.dg/tree-ssa/pr61034.C)
2016-01-21  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/69378
	* tree-ssa-sccvn.c (dominated_by_p_w_unex): New function.
	(set_ssa_val_to): Use it for dominance checks taking into
	account not executable edges.

From-SVN: r232666
2016-01-21 08:50:38 +00:00
Richard Biener dd6f2cf98c re PR target/69345 (459.GemsFDTD regression)
2016-01-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69345
	* tree-ssa-sccvn.h (VN_INFO_RANGE_INFO): New inline function.
	(VN_INFO_PTR_INFO): Likewise.
	* tree-ssa-sccvn.c (set_ssa_val_to): Avoid clearing points-to
	info when it is equal between non-dominating SSA names.
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Make sure to look at original SSA infos.

From-SVN: r232603
2016-01-20 08:36:32 +00:00
Richard Biener e93c66bc45 re PR tree-optimization/69117 (wrong code at -O1 -fstrict-aliasing)
2016-01-15  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69117
	* tree-ssa-sccvn.h (struct vn_ssa_aux): Add info member.
	* tree-ssa-sccvn.c (set_ssa_val_to): Save and adjust SSA name info
	of the leader conservatively.
	(free_scc_vn): Restore original SSA name infos.

	* gcc.dg/torture/pr69117.c: New testcase.

From-SVN: r232401
2016-01-15 08:16:08 +00:00
Richard Biener 40311329e5 re PR tree-optimization/69242 (ICE in visit_reference_op_load, at tree-ssa-sccvn.c:3224)
2016-01-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69242
	* tree-ssa-sccvn.c (visit_reference_op_load): Replace bogus
	assert with a check.

	* gcc.dg/torture/pr69242.c: New testcase.

From-SVN: r232315
2016-01-13 08:27:42 +00:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jeff Law 3daacdcd5f re PR tree-optimization/68619 (error: loop with header 6 not in loop tree)
2015-12-10  Jeff Law  <law@redhat.com>

	PR tree-optimization/68619
	* tree-ssa-dom.c (dom_opt_dom_walker::before_dom_children): Propgate
	return value from optimize_stmt.
	(dom_opt_dom_walker): Add new argument to dom_walker constructor.
	(pass_dominator:execute): If a block has an unreachable edge,
	remove all jump threads through any successor of the affected block.
	(record_equivalences_from_phis): Ignore alternative if the edge
	does not have EDGE_EXECUTABLE set.
	(single_incoming_edge_ignoring_loop_edges): Similarly.
	(optimize_stmt): If a gimple_code has a compile-time constant
	condition, return the edge taken for that constant value.  Also
	change the condition to true/false as necessary.
	* domwalk.h (dom_walker::dom_walker): Add new argument
	skip_unreachable_blocks.  Don't provide empty constructor body.
	(dom_walker::before_dom_children): Change return type.
	(dom_walker::bb_reachable): Declare new private method.
	(dom_walker::propagate_unreachable_to_edges): Likewise.
	(dom_walker::m_unreachable_dom): Declare new private data member.
	(dom_walker::m_skip_unreachable_blocks): Likewise.
	* domwalk.c: Include dumpfile.h.
	(dom_walker::dom_walker): New constructor.  Initialize private data
	members.  If needed, set EDGE_EXECUTABLE for all edges in the CFG,
	extracted from tree-ssa-sccvn.c.
	(dom_walker::bb_reachable): New method extracted from tree-ssa-sccvn.c
	(dom_walker::propagate_unreachable_to_edges): Likewise.
	(dom_walker::walk): Only call before_dom_children on reachable
	blocks.  If before_dom_children returns an edge, then clear
	EDGE_EXECUTABLE for all other outgoing edges from the same block.
	For unreachable blocks, call propagate_unreachable_to_edges.
	Similarly, only call after_dom_children on reachable blocks.  For
	unreachable blocks, conditionally clear m_unreachable_dom.
	* tree-ssa-sccvn.c (sccvn_dom_walker::unreachable_dom): Remove
	private data member.
	(sccvn_dom_walker::after_dom_children): Use methods from dom_walker
	class.
	(run_scc_vn): Likewise.
	(sccvn_dom_walker::before_dom_children): Likewise.  Return the taken
	outgoing edge if a COND, SWITCH, or GOTO are optimized.
	* compare-elim.c (find_comparison_dom_walker::before_dom_children):
	Change return type to an edge.  Always return NULL.
	* fwprop.c (single_def_use_dom_walker::before_dom_children): Likewise.
	* gimple-ssa-strength-reduction.c
	(find_candidates_dom_walker::before_dom_children): Likewise.
	* ipa-prop.c (analysis_dom_walker::before_dom_children): Likewise.
	(ipcp_modif_dom_walker::before_dom_children): Likewise.
	* tree-into-ssa.c (rewrite_dom_walker::before_dom_children): Likewise.
	(rewrite_update_dom_walker::before_dom_children): Likewise.
	(mark_def_dom_children::before_dom_children): Likewise.
	* tree-ssa-dse.c (dse_dom_walker::before_dom_children): Likewise.
	* tree-ssa-loop-im.c
	(invariantness_dom_walker::before_dom_children): Likewise.
	(move_computations_dom_walker::before_dom_walker): Likewise.
	* tree-ssa-phiopt.c
	(nontrapping_dom_walker::before_dom_children): Likewise.
	* tree-ssa-pre.c
	(eliminate_dom_walker::before_dom_children): Likewise.
	* tree-ssa-propagate.c
	(substitute_and_fold_dom_walker::before_dom_children): Likewise.
	* tree-ssa-strlen.c
	(strlen_dom_walker::before_dom_children): Likewise.
	* tree-ssa-uncprop.c
	(uncprop_dom_walker::before_dom_children): Likewise.

	PR tree-optimization/68619
	* gcc.dg/tree-ssa/pr68619-1.c: New test.
	* gcc.dg/tree-ssa/pr68619-2.c: New test.
	* gcc.dg/tree-ssa/pr68619-3.c: New test.
	* gcc.dg/tree-ssa/pr68619-4.c: New test.
	* gcc.dg/tree-ssa/pr68619-5.c: New test.

From-SVN: r231527
2015-12-10 09:34:43 -07:00
Jakub Jelinek 1ff0a84c3d re PR middle-end/68785 (valgrind reports issues with folding on x86_64)
PR tree-optimization/68785
	* gimple-fold.c (fold_ctor_reference): Pass return value from
	native_encode_expr to native_interpret_expr.
	* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.

	* gcc.dg/pr68785.c: New test.

From-SVN: r231499
2015-12-10 11:14:38 +01:00
Richard Biener 1d6e77c504 tree-ssa-sccvn.c (sccvn_dom_walker): Add unreachable_dom member and initialize it.
2015-12-04  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (sccvn_dom_walker): Add unreachable_dom
	member and initialize it.
	(sccvn_dom_walker::after_dom_children): Reset unreachable_dom
	if necessary.
	(sccvn_dom_walker::before_dom_children): If unreachable_dom
	is set BB is not reachable either.  Set unreachable_dom
	if not set and BB is unreachable.

From-SVN: r231262
2015-12-04 12:32:26 +00:00
Richard Biener 8ab1d9d72c re PR middle-end/68221 (libgomp reduction-11/12 failures)
2015-11-24  Richard Biener  <rguenther@suse.de>

	PR middle-end/68221
	* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Properly
	use mem_ref_offset.

From-SVN: r230793
2015-11-24 09:17:40 +00:00
Richard Biener 3789bf8412 re PR tree-optimization/68465 (pass_lim doesn't detect identical loop entry conditions)
2015-11-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68465
	* tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children):
	Also record equalities from multiple predecessor blocks if
	only one non-backedge exists.

	* gcc.dg/tree-ssa/ssa-fre-52.c: New testcase.

From-SVN: r230764
2015-11-23 15:21:32 +00:00
Richard Biener 94852c8ec4 re PR tree-optimization/68240 (compilation hangs on valid code at -O1 and above on x86_64-linux-gnu)
2015-11-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68240
	* tree-ssa-sccvn.c (cond_stmts_equal_p): Handle commutative compares
	properly.
	(visit_phi): For PHIs with just a single executable edge
	take its value directly.
	(expressions_equal_p): Handle VN_TOP properly.

	* gcc.dg/torture/pr68240.c: New testcase.

From-SVN: r230095
2015-11-10 10:14:02 +00:00
Eric Botcazou ee45a32dae Merge of the scalar-storage-order branch.
From-SVN: r229965
2015-11-08 18:33:42 +00:00
Richard Biener ff56974436 tree-ssa-sccvn.c (class sccvn_dom_walker): Add destructor.
2015-11-06  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (class sccvn_dom_walker): Add destructor.
	* lra.c (init_reg_info): Truncate copy_vec instead of
	re-allocating a new one and leaking the old.
	* ipa-inline-analysis.c (estimate_function_body_sizes): Free
	bb_infos vec.
	* sched-deps.c (sched_deps_finish): Free the dn/dl pools.
	* postreload-gcse.c (free_mem): Free modify_mem_list and
	canon_modify_mem_list.

From-SVN: r229850
2015-11-06 13:45:54 +00:00
Andrew MacLeod 957060b5c5 alias.c: Reorder #include statements and remove duplicates.
2015-10-29  Andrew MacLeod  <amacleod@redhat.com>

	* alias.c: Reorder #include statements and remove duplicates.
	* asan.c: Likewise.
	* attribs.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* auto-profile.c: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* ccmp.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* combine-stack-adj.c: Likewise.
	* combine.c: Likewise.
	* compare-elim.c: Likewise.
	* convert.c: Likewise.
	* coverage.c: Likewise.
	* cppbuiltin.c: Likewise.
	* cprop.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* data-streamer.c: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* ddg.c: Likewise.
	* debug.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dfp.c: Likewise.
	* dojump.c: Likewise.
	* dominance.c: Likewise.
	* double-int.c: Likewise.
	* dse.c: Likewise.
	* dumpfile.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* fixed-value.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* fwprop.c: Likewise.
	* gcse.c: Likewise.
	* generic-match-head.c: Likewise.
	* ggc-common.c: Likewise.
	* gimple-builder.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-match-head.c: Likewise.
	* gimple-pretty-print.c: Likewise.
	* gimple-ssa-isolate-paths.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple-streamer-out.c: Likewise.
	* gimple-walk.c: Likewise.
	* gimple.c: Likewise.
	* gimplify-me.c: Likewise.
	* gimplify.c: Likewise.
	* godump.c: Likewise.
	* graph.c: Likewise.
	* graphite-poly.c: Likewise.
	* haifa-sched.c: Likewise.
	* hw-doloop.c: Likewise.
	* ifcvt.c: Likewise.
	* incpath.c: Likewise.
	* init-regs.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa-chkp.c: Likewise.
	* ipa-comdats.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-icf-gimple.c: Likewise.
	* ipa-icf.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-polymorphic-call.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-ref.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-visibility.c: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* langhooks.c: Likewise.
	* lcm.c: Likewise.
	* lists.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-init.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-iv.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lra-assigns.c: Likewise.
	* lra-coalesce.c: Likewise.
	* lra-constraints.c: Likewise.
	* lra-eliminations.c: Likewise.
	* lra-lives.c: Likewise.
	* lra-remat.c: Likewise.
	* lra-spills.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* plugin.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* real.c: Likewise.
	* realmpfr.c: Likewise.
	* recog.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regrename.c: Likewise.
	* regstat.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* rtl-chkp.c: Likewise.
	* rtl-error.c: Likewise.
	* rtlanal.c: Likewise.
	* rtlhooks.c: Likewise.
	* sanopt.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* sese.c: Likewise.
	* shrink-wrap.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stack-ptr-mod.c: Likewise.
	* statistics.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* stringpool.c: Likewise.
	* symtab.c: Likewise.
	* target-globals.c: Likewise.
	* targhooks.c: Likewise.
	* toplev.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chkp-opt.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.c: Likewise.
	* tree-nrv.c: Likewise.
	* tree-object-size.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-copy.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop-ch.c: Likewise.
	* tree-ssa-loop-im.c: Likewise.
	* tree-ssa-loop-ivcanon.c: Likewise.
	* tree-ssa-loop-ivopts.c: Likewise.
	* tree-ssa-loop-manip.c: Likewise.
	* tree-ssa-loop-niter.c: Likewise.
	* tree-ssa-loop-prefetch.c: Likewise.
	* tree-ssa-loop-unswitch.c: Likewise.
	* tree-ssa-loop.c: Likewise.
	* tree-ssa-math-opts.c: Likewise.
	* tree-ssa-operands.c: Likewise.
	* tree-ssa-phiopt.c: Likewise.
	* tree-ssa-phiprop.c: Likewise.
	* tree-ssa-pre.c: Likewise.
	* tree-ssa-propagate.c: Likewise.
	* tree-ssa-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-scopedtables.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-ter.c: Likewise.
	* tree-ssa-threadedge.c: Likewise.
	* tree-ssa-threadupdate.c: Likewise.
	* tree-ssa-uncprop.c: Likewise.
	* tree-ssa-uninit.c: Likewise.
	* tree-ssa.c: Likewise.
	* tree-ssanames.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-switch-conversion.c: Likewise.
	* tree-tailcall.c: Likewise.
	* tree-vect-data-refs.c: Likewise.
	* tree-vect-generic.c: Likewise.
	* tree-vect-loop-manip.c: Likewise.
	* tree-vect-loop.c: Likewise.
	* tree-vect-patterns.c: Likewise.
	* tree-vect-slp.c: Likewise.
	* tree-vect-stmts.c: Likewise.
	* tree-vectorizer.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* value-prof.c: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vtable-verify.c: Likewise.
	* web.c: Likewise.
	* wide-int-print.cc: Likewise.
	* wide-int.cc: Likewise.
	* xcoffout.c: Likewise.

From-SVN: r229526
2015-10-29 13:57:32 +00:00
Richard Biener 87961d1b29 tree-ssa-sccvn.c (cond_stmts_equal_p): Compare two GIMPLE cond stmts, enhanced and split out from ...
2015-10-21  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (cond_stmts_equal_p): Compare two GIMPLE
	cond stmts, enhanced and split out from ...
	(vn_phi_eq): ... here.

From-SVN: r229119
2015-10-21 08:12:15 +00:00
Richard Biener e6503e0a45 re PR tree-optimization/67975 (Failure to optimise equality between two call sequences)
2015-10-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67975
	* tree-cfg.h (extract_true_false_controlled_edges): Declare.
	* tree-cfg.c (extract_true_false_controlled_edges): Split out
	core worker from ...
	* tree-ssa-loop-im.c (extract_true_false_args_from_phi): ... here.
	* tree-ssa-sccvn.c (vn_phi_compute_hash): Hash number of args
	instead of block number for PHIs with two or one args.
	(vn_phi_eq): Compare edge predicates of PHIs that are in different
	blocks.

	* gcc.dg/tree-ssa/ssa-fre-50.c: New testcase.

From-SVN: r228971
2015-10-19 14:00:28 +00:00
Richard Biener c0f6274015 re PR middle-end/67891 (FAIL: gcc.dg/pr43300.c (internal compiler error) on alpha-linux-gnu)
2015-10-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/67891
	* gimple-match.h (gimple_simplified_result_is_gimple_val):
	New helper.
	(gimple_resimplify1): Declare.
	(gimple_resimplify2): Likewise.
	(gimple_resimplify3): Likewise.
	* gimple-match-head.c (gimple_resimplify1): Export.
	(gimple_resimplify2): Likewise.
	(gimple_resimplify3): Likewise.
	(maybe_push_res_to_seq): Use gimple_simplified_result_is_gimple_val.
	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
	* tree-ssa-sccvn.c (visit_reference_op_load): Use gimple_resimplify1
	to avoid creating stmts without VN info.

	* gcc.dg/tree-ssa/pr67891.c: New testcase.

From-SVN: r228635
2015-10-09 08:12:18 +00:00
Richard Biener 6a8b77b2fa tree-ssa-sccvn.c (has_VN_INFO): New function.
2015-10-02  Richard Biener  <rguenther@suse.de>

	* tree-ssa-sccvn.c (has_VN_INFO): New function.
	(free_scc_vn): Use it.
	(visit_use): Remove dead code and refactor to use gassign
	and use less indentation.

From-SVN: r228369
2015-10-02 07:34:53 +00:00