Commit d0815217 by Richard Biener Committed by Richard Biener

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
parent 2af8fd5c
2017-02-24 Richard Biener <rguenther@suse.de>
PR tree-optimization/79389
* gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
debug insns.
2017-02-24 Aldy Hernandez <aldyh@redhat.com> 2017-02-24 Aldy Hernandez <aldyh@redhat.com>
* tree-ssa-loop-niter.c (number_of_iterations_exit): Update * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
......
...@@ -249,6 +249,8 @@ is_feasible_trace (basic_block bb) ...@@ -249,6 +249,8 @@ is_feasible_trace (basic_block bb)
imm_use_iterator iter2; imm_use_iterator iter2;
FOR_EACH_IMM_USE_FAST (use2_p, iter2, gimple_phi_result (stmt)) FOR_EACH_IMM_USE_FAST (use2_p, iter2, gimple_phi_result (stmt))
{ {
if (is_gimple_debug (USE_STMT (use2_p)))
continue;
basic_block use_bb = gimple_bb (USE_STMT (use2_p)); basic_block use_bb = gimple_bb (USE_STMT (use2_p));
if (use_bb != bb if (use_bb != bb
&& dominated_by_p (CDI_DOMINATORS, bb, use_bb)) && dominated_by_p (CDI_DOMINATORS, bb, use_bb))
...@@ -280,11 +282,15 @@ is_feasible_trace (basic_block bb) ...@@ -280,11 +282,15 @@ is_feasible_trace (basic_block bb)
use_operand_p use_p; use_operand_p use_p;
imm_use_iterator iter; imm_use_iterator iter;
FOR_EACH_IMM_USE_FAST (use_p, iter, op) FOR_EACH_IMM_USE_FAST (use_p, iter, op)
if (gimple_bb (USE_STMT (use_p)) == bb) {
{ if (is_gimple_debug (USE_STMT (use_p)))
found_cprop_opportunity = true; continue;
break; if (gimple_bb (USE_STMT (use_p)) == bb)
} {
found_cprop_opportunity = true;
break;
}
}
} }
if (found_cprop_opportunity) if (found_cprop_opportunity)
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment