mirror of git://gcc.gnu.org/git/gcc.git
re PR target/41279 (252.eon performance regression)
PR target/41279 * cfgloopanal.c (num_loop_insns): Don't increment ninsns for each bb before insn counting loop now that BB_END (bb) is counted. Ensure the return value isn't zero. From-SVN: r152324
This commit is contained in:
parent
3c8348d376
commit
53a51cef4c
|
|
@ -1,3 +1,10 @@
|
|||
2009-09-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/41279
|
||||
* cfgloopanal.c (num_loop_insns): Don't increment ninsns for each bb
|
||||
before insn counting loop now that BB_END (bb) is counted. Ensure
|
||||
the return value isn't zero.
|
||||
|
||||
2009-09-30 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* config.gcc (sh-symbianelf): Replace definition of extra_objs
|
||||
|
|
|
|||
|
|
@ -175,12 +175,14 @@ num_loop_insns (const struct loop *loop)
|
|||
for (i = 0; i < loop->num_nodes; i++)
|
||||
{
|
||||
bb = bbs[i];
|
||||
ninsns++;
|
||||
FOR_BB_INSNS (bb, insn)
|
||||
if (NONDEBUG_INSN_P (insn))
|
||||
ninsns++;
|
||||
}
|
||||
free(bbs);
|
||||
free (bbs);
|
||||
|
||||
if (!ninsns)
|
||||
ninsns = 1; /* To avoid division by zero. */
|
||||
|
||||
return ninsns;
|
||||
}
|
||||
|
|
@ -209,7 +211,7 @@ average_num_loop_insns (const struct loop *loop)
|
|||
: (bb->frequency * BB_FREQ_MAX) / loop->header->frequency;
|
||||
ninsns += binsns * ratio;
|
||||
}
|
||||
free(bbs);
|
||||
free (bbs);
|
||||
|
||||
ninsns /= BB_FREQ_MAX;
|
||||
if (!ninsns)
|
||||
|
|
|
|||
Loading…
Reference in New Issue