This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Use likely upper bound in ivopts
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 28 May 2016 18:48:36 +0200
- Subject: Use likely upper bound in ivopts
- Authentication-results: sourceware.org; auth=none
Hi,
this patch updates ivopts to use likely upper bounds. Bootstrapped/regtested
x86_64-linux and comitted. (I will update all the loop passes, but want to do
it one by one so we have performance tracked.)
Honza
* tree-ssa-loop-ivopts.c (estimated_stmt_executions_int): Use
likely_max_stmt_executions_int.
Index: tree-ssa-loop-ivopts.c
===================================================================
--- tree-ssa-loop-ivopts.c (revision 236850)
+++ tree-ssa-loop-ivopts.c (working copy)
@@ -127,7 +127,7 @@ avg_loop_niter (struct loop *loop)
HOST_WIDE_INT niter = estimated_stmt_executions_int (loop);
if (niter == -1)
{
- niter = max_stmt_executions_int (loop);
+ niter = likely_max_stmt_executions_int (loop);
if (niter == -1 || niter > AVG_LOOP_NITER (loop))
return AVG_LOOP_NITER (loop);
}