Fix divide by zero error. Passes bootstrap and regression tests. Ok for google branches? Teresa ...
12 years, 7 months ago
(2012-09-10 14:16:56 UTC)
#1
Fix divide by zero error.
Passes bootstrap and regression tests. Ok for google branches?
Teresa
2012-09-10 Teresa Johnson <tejohnson@google.com>
* loop-unroll.c (code_size_limit_factor):
Index: loop-unroll.c
===================================================================
--- loop-unroll.c (revision 191138)
+++ loop-unroll.c (working copy)
@@ -223,7 +223,8 @@ code_size_limit_factor(struct loop *loop)
/* Next, set the value of the codesize-based unroll factor divisor which in
most loops will need to be set to a value that will reduce or eliminate
unrolling/peeling. */
- if (profile_info->num_hot_counters < size_threshold * 2)
+ if (profile_info->num_hot_counters < size_threshold * 2
+ && loop->header->count > 0)
{
/* For applications that are less than twice the codesize limit, allow
limited unrolling for very hot loops. */
--
This patch is available for review at http://codereview.appspot.com/6498112
On Mon, Sep 10, 2012 at 10:16 AM, Teresa Johnson <tejohnson@google.com> wrote: > 2012-09-10 Teresa ...
12 years, 7 months ago
(2012-09-10 14:19:08 UTC)
#2
On Mon, Sep 10, 2012 at 10:16 AM, Teresa Johnson <tejohnson@google.com> wrote:
> 2012-09-10 Teresa Johnson <tejohnson@google.com>
>
> * loop-unroll.c (code_size_limit_factor):
OK.
Diego.
Issue 6498112: [google] Fix exception in unroller code size heuristics
Created 12 years, 7 months ago by tejohnson
Modified 12 years, 7 months ago
Reviewers: davidxl, Diego Novillo
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/main/gcc/
Comments: 0