Commit ee281008 by Richard Biener Committed by Richard Biener

tree-cfgcleanup.c (tree_forwarder_block_p): Use bb_loop_header_p.

2016-08-05  Richard Biener  <rguenther@suse.de>

	* tree-cfgcleanup.c (tree_forwarder_block_p): Use bb_loop_header_p.
	* cfghooks.c (force_nonfallthru): If we ended up splitting a latch
	adjust loop info accordingly.

From-SVN: r239163
parent 343092cf
2016-08-05 Richard Biener <rguenther@suse.de>
* tree-cfgcleanup.c (tree_forwarder_block_p): Use bb_loop_header_p.
* cfghooks.c (force_nonfallthru): If we ended up splitting a latch
adjust loop info accordingly.
2016-08-05 Kugan Vivekanandarajah <kuganv@linaro.org>
* tree-vrp.c (extract_range_basic): Check cfun->after_inlining
......
......@@ -1030,11 +1030,17 @@ force_nonfallthru (edge e)
if (current_loops != NULL)
{
basic_block pred = single_pred (ret);
basic_block succ = single_succ (ret);
struct loop *loop
= find_common_loop (single_pred (ret)->loop_father,
single_succ (ret)->loop_father);
= find_common_loop (pred->loop_father, succ->loop_father);
rescan_loop_exit (e, false, true);
add_bb_to_loop (ret, loop);
/* If we split the latch edge of loop adjust the latch block. */
if (loop->latch == pred
&& loop->header == succ)
loop->latch = ret;
}
}
......
......@@ -344,7 +344,7 @@ tree_forwarder_block_p (basic_block bb, bool phi_wanted)
{
basic_block dest;
/* Protect loop headers. */
if (bb->loop_father->header == bb)
if (bb_loop_header_p (bb))
return false;
dest = EDGE_SUCC (bb, 0)->dest;
......
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