gcc/ * tree-ssa-loop-niter.c (chain_of_csts_start): Return a gimple_phi rather than a gimple. (get_base_for): Likewise; convert local "phi" to be a gimple_phi. (loop_niter_by_eval): Convert local "phi" to be a gimple_phi. --- gcc/tree-ssa-loop-niter.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index 1f94895..ffc651b 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -2147,7 +2147,7 @@ finite_loop_p (struct loop *loop) result by a chain of operations such that all but exactly one of their operands are constants. */ -static gimple +static gimple_phi chain_of_csts_start (struct loop *loop, tree x) { gimple stmt = SSA_NAME_DEF_STMT (x); @@ -2162,7 +2162,7 @@ chain_of_csts_start (struct loop *loop, tree x) if (gimple_code (stmt) == GIMPLE_PHI) { if (bb == loop->header) - return stmt; + return stmt->as_a_gimple_phi (); return NULL; } @@ -2195,10 +2195,10 @@ chain_of_csts_start (struct loop *loop, tree x) If such phi node exists, it is returned, otherwise NULL is returned. */ -static gimple +static gimple_phi get_base_for (struct loop *loop, tree x) { - gimple phi; + gimple_phi phi; tree init, next; if (is_gimple_min_invariant (x)) @@ -2289,7 +2289,8 @@ loop_niter_by_eval (struct loop *loop, edge exit) { tree acnd; tree op[2], val[2], next[2], aval[2]; - gimple phi, cond; + gimple_phi phi; + gimple cond; unsigned i, j; enum tree_code cmp; -- 1.7.11.7