From: Martin Liska Date: Tue, 10 Dec 2019 08:36:56 +0000 (+0100) Subject: Fix typos in 2 functions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52dc9c32311e8ea4833b8865c0d3121cad03937d;p=gcc.git Fix typos in 2 functions. 2019-12-10 Martin Liska PR tree-optimization/92862 * predict.c (predict_paths_leading_to_edge): Fix typo from e to e2. * tree-ssa-loop-niter.c (loop_only_exit_p): Return false instead of true; From-SVN: r279156 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 42ae999103b..9e53a323e1e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-12-10 Martin Liska + + PR tree-optimization/92862 + * predict.c (predict_paths_leading_to_edge): Fix typo from e to e2. + * tree-ssa-loop-niter.c (loop_only_exit_p): Return false + instead of true; + 2019-12-09 David Malcolm * gcc-rich-location.c diff --git a/gcc/predict.c b/gcc/predict.c index 67f850de17a..8db24816d29 100644 --- a/gcc/predict.c +++ b/gcc/predict.c @@ -3217,16 +3217,15 @@ predict_paths_leading_to_edge (edge e, enum br_predictor pred, basic_block bb = e->src; FOR_EACH_EDGE (e2, ei, bb->succs) if (e2->dest != e->src && e2->dest != e->dest - && !unlikely_executed_edge_p (e) + && !unlikely_executed_edge_p (e2) && !dominated_by_p (CDI_POST_DOMINATORS, e->src, e2->dest)) { has_nonloop_edge = true; break; } + if (!has_nonloop_edge) - { - predict_paths_for_bb (bb, bb, pred, taken, auto_bitmap (), in_loop); - } + predict_paths_for_bb (bb, bb, pred, taken, auto_bitmap (), in_loop); else predict_edge_def (e, pred, taken); } diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index f0dd9a0b363..39e937705f1 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -2376,13 +2376,9 @@ loop_only_exit_p (const class loop *loop, basic_block *body, const_edge exit) return false; for (i = 0; i < loop->num_nodes; i++) - { - for (bsi = gsi_start_bb (body[i]); !gsi_end_p (bsi); gsi_next (&bsi)) - if (stmt_can_terminate_bb_p (gsi_stmt (bsi))) - { - return true; - } - } + for (bsi = gsi_start_bb (body[i]); !gsi_end_p (bsi); gsi_next (&bsi)) + if (stmt_can_terminate_bb_p (gsi_stmt (bsi))) + return false; return true; }