Commit 15526589 by Bin Cheng Committed by Bin Cheng

tree-ssa-loop-ivopts.c (get_computation_cost_at): Check depends_on before using it.

	* tree-ssa-loop-ivopts.c (get_computation_cost_at): Check depends_on
	before using it.

From-SVN: r235807
parent e0db1402
2016-05-03 Bin Cheng <bin.cheng@arm.com>
* tree-ssa-loop-ivopts.c (get_computation_cost_at): Check depends_on
before using it.
2016-05-03 Bin Cheng <bin.cheng@arm.com>
* tree-ssa-loop-ivopts.c (get_computation_cost_at): Don't clobber
cbase.
......
......@@ -4846,12 +4846,12 @@ get_computation_cost_at (struct ivopts_data *data,
/* Record setup cost in scrach field. */
cost.scratch = cost.cost;
if (inv_expr_id)
if (inv_expr_id && depends_on && *depends_on)
{
*inv_expr_id =
get_loop_invariant_expr_id (data, ubase, cbase, ratio, address_p);
/* Clear depends on. */
if (*inv_expr_id != -1 && depends_on && *depends_on)
if (*inv_expr_id != -1)
bitmap_clear (*depends_on);
}
......
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