Commit Graph

13 Commits

Author SHA1 Message Date
Richard Biener 7f7e9dae36 re PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)
2017-04-12  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79390
	* gimple-ssa-split-paths.c (is_feasible_trace): Restrict
	threading case even more.

From-SVN: r246869
2017-04-12 09:41:02 +00:00
Richard Biener d081521703 re PR tree-optimization/79389 (30% performance regression in SciMark2 MonteCarlo)
2017-02-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79389
	* gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
	debug insns.

From-SVN: r245713
2017-02-24 11:51:33 +00:00
Richard Biener 7699e88f68 re PR tree-optimization/79389 (30% performance regression in SciMark2 MonteCarlo)
2017-02-24  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/79389
	* gimple-ssa-split-paths.c (is_feasible_trace): Verify more
	properly that a threading opportunity exists.  Detect conditional
	copy/constant propagation opportunities.

	* gcc.dg/tree-ssa/split-path-10.c: New testcase.

From-SVN: r245696
2017-02-24 08:04:31 +00:00
Richard Biener 10b70b8e5e re PR tree-optimization/77283 (Revision 238005 disables loop unrolling)
2017-01-13  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/77283
	* gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
	and ssa-iterators.h.
	(is_feasible_trace): Implement a cost model based on joiner
	PHI node uses.

	* gcc.dg/tree-ssa/split-path-7.c: Adjust.
	* gcc.dg/tree-ssa/split-path-8.c: New testcase.
	* gcc.dg/tree-ssa/split-path-9.c: Likewise.

From-SVN: r244392
2017-01-13 08:11:01 +00:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Richard Biener 1174b21b38 gimple-ssa-split-paths.c (find_block_to_duplicate_for_splitting_pa): Handle empty else block.
2016-07-05  Richard Biener  <rguenther@suse.de>

	* gimple-ssa-split-paths.c (find_block_to_duplicate_for_splitting_pa):
	Handle empty else block.
	(is_feasible_trace): Likewise.
	(split_paths): Likewise.

From-SVN: r238005
2016-07-05 13:25:47 +00:00
Jeff Law 0c6072a3fc re PR tree-optimization/69999 (ICE in verify_loop_structure, at cfgloop.c:1639 (error: loop with header 3 not in loop tree) at -O3 or -Ofast)
PR tree-optimization/69999
	* gimple-ssa-split-paths.c (split_paths): When duplicating a block
	with an outgoing edge marked with EDGE_IRREDUCIBLE_LOOP, schedule
	loop cleanups.

	PR tree-optimization/69999
	* gcc.c-torture/compile/pr69999.c: New test.

From-SVN: r233824
2016-02-29 15:45:41 -07:00
Jeff Law 8981d7127b re PR tree-optimization/68541 (Path splitting causes if-conversion miss)
PR tree-optimization/68541
	* gimple-ssa-split-paths.c: Include tree-cfg.h and params.h.
	(count_stmts_in_block): New function.
	(poor_ifcvt_candidate_code): Likewise.
	(is_feasible_trace): Add some heuristics to determine when path
	splitting is profitable.
	(find_block_to_duplicate_for_splitting_paths): Make sure the graph
	is a diamond with a single exit.

        PR tree-optimization/68541
	* gcc.dg/tree-ssa/split-path-2.c: New test.
	* gcc.dg/tree-ssa/split-path-3.c: New test.
	* gcc.dg/tree-ssa/split-path-4.c: New test.
	* gcc.dg/tree-ssa/split-path-5.c: New test.
	* gcc.dg/tree-ssa/split-path-6.c: New test.
	* gcc.dg/tree-ssa/split-path-7.c: New test.

From-SVN: r233191
2016-02-05 16:49:08 -07:00
Jakub Jelinek 6af801f52a tree-ssanames.c (release_free_names_and_compact_live_names): Replace "the the" with "the" in the comments.
* tree-ssanames.c (release_free_names_and_compact_live_names): Replace
	"the the" with "the" in the comments.
	* ipa-devirt.c (build_type_inheritance_graph,
	update_type_inheritance_graph): Likewise.
	* tree.c (build_function_type_list_1): Likewise.
	* cfgloopmanip.c (scale_loop_profile): Likewise.
	* tree-ssa-loop-ivopts.c (get_shiftadd_cost): Likewise.
	* gimple-ssa-split-paths.c
	(find_block_to_duplicate_for_splitting_paths): Likewise.
	* tree-sra.c (init_subtree_with_zero, clobber_subtree): Likewise.
	* expr.c (convert_move): Likewise.
	* var-tracking.c (vt_stack_adjustments): Likewise.
	* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
	* tree-vrp.c (test_for_singularity): Likewise.

From-SVN: r232765
2016-01-23 15:13:53 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jeff Law 9edb6bb8d3 [PATCH] Avoid unnecessary block copying in path splitting
* gimple-ssa-split-paths.c (split_paths): Avoid unnecessary block
	copying.

From-SVN: r231915
2015-12-22 14:49:12 -07:00
Jeff Law 72ca20f9cb [PATCH] Limit path splitting to loops we optimize for speed
* doc/invoke.texi (-O2 options): Remove -fsplit-paths.
	(-O3 options): Add -fsplit-paths.
	* gimple-ssa-split-paths.c: Include predict.h
	(split_paths): Only split paths in a loop that should be
	optimized for speed.
	* opts.c (default_options_table): Move -fsplit-paths from -O2 to
	-O3.

	* gcc.dg/tree-ssa/split-path-1.c: Explicitly ask for path
	splitting optimizations.

From-SVN: r231790
2015-12-17 16:33:44 -07:00
Ajit Agarwal 8fe17e23b0 [Patch,tree-optimization]: Add new path Splitting pass on tree ssa
representation

	* Makefile.in (OBJS): Add gimple-ssa-split-paths.o
	* common.opt (-fsplit-paths): New flag controlling path splitting.
	* doc/invoke.texi (fsplit-paths): Document.
	* opts.c (default_options_table): Add -fsplit-paths to -O2.
	* passes.def: Add split_paths pass.
	* timevar.def (TV_SPLIT_PATHS): New timevar.
	* tracer.c: Include "tracer.h"
	(ignore_bb_p): No longer static.
	(transform_duplicate): New function, broken out of tail_duplicate.
	(tail_duplicate): Use transform_duplicate.
	* tracer.h (ignore_bb_p): Declare
	(transform_duplicate): Likewise.
	* tree-pass.h (make_pass_split_paths): Declare.
	* gimple-ssa-split-paths.c: New file.

	* gcc.dg/tree-ssa/split-path-1.c: New test.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r230364
2015-11-13 16:31:51 -07:00