summaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-niter.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-02 19:41:03 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2013-12-02 19:41:03 +0000
commit10c3fe8d945dd7508c224e1b787cc59955449655 (patch)
tree3bef8af367ca34f00491f8a4dae23ed4e2e5fe82 /gcc/tree-ssa-loop-niter.c
parent8a9d7e27a192e006ff56491ae04b9af12623f8f3 (diff)
downloadgcc-10c3fe8d945dd7508c224e1b787cc59955449655.tar.gz
Address Richard's review comments.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@205595 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r--gcc/tree-ssa-loop-niter.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c
index a50b9e37dcf..7720698ee82 100644
--- a/gcc/tree-ssa-loop-niter.c
+++ b/gcc/tree-ssa-loop-niter.c
@@ -527,7 +527,7 @@ end:
difference of two values in TYPE. */
static void
-bounds_add (bounds *bnds, widest_int delta, tree type)
+bounds_add (bounds *bnds, const widest_int &delta, tree type)
{
mpz_t mdelta, max;
@@ -2624,10 +2624,10 @@ do_warn_aggressive_loop_optimizations (struct loop *loop,
is taken at last when the STMT is executed BOUND + 1 times.
REALISTIC is true if BOUND is expected to be close to the real number
of iterations. UPPER is true if we are sure the loop iterates at most
- BOUND times. I_BOUND is an unsigned wide_int upper estimate on BOUND. */
+ BOUND times. I_BOUND is a widest_int upper estimate on BOUND. */
static void
-record_estimate (struct loop *loop, tree bound, widest_int i_bound,
+record_estimate (struct loop *loop, tree bound, const widest_int &i_bound,
gimple at_stmt, bool is_exit, bool realistic, bool upper)
{
widest_int delta;
@@ -2683,15 +2683,15 @@ record_estimate (struct loop *loop, tree bound, widest_int i_bound,
delta = 0;
else
delta = 1;
- i_bound += delta;
+ widest_int new_i_bound = i_bound + delta;
/* If an overflow occurred, ignore the result. */
- if (wi::ltu_p (i_bound, delta))
+ if (wi::ltu_p (new_i_bound, delta))
return;
if (upper && !is_exit)
- do_warn_aggressive_loop_optimizations (loop, i_bound, at_stmt);
- record_niter_bound (loop, i_bound, realistic, upper);
+ do_warn_aggressive_loop_optimizations (loop, new_i_bound, at_stmt);
+ record_niter_bound (loop, new_i_bound, realistic, upper);
}
/* Record the estimate on number of iterations of LOOP based on the fact that