* New patch for PR tree-optimization/32087, ICE on -fprefetch-loop-arrays
@ 2007-07-25 17:43 Steve Ellcey
2007-07-26 10:11 ` Richard Guenther
0 siblings, 1 reply; 2+ messages in thread
From: Steve Ellcey @ 2007-07-25 17:43 UTC (permalink / raw)
To: gcc-patches; +Cc: richard.guenther
I submitted an earlier patch
(http://gcc.gnu.org/ml/gcc-patches/2007-06/msg00357.html) for this PR
that checked for a zero inside scale_bbs_frequencies_int. This patch
checks for zero before calling scale_bbs_frequencies_int (in
tree_transform_and_unroll_loop).
Functions like remove_empty_loop and scale_dominated_blocks_in_loop
already have checks in them to make sure scale_bbs_frequencies_int is
not called in cases where a division by zero might happen so it seems
reasonable to check it here too.
Tested on IA64 HP-UX and Linux.
OK for checkin?
2007-06-06 Steve Ellcey <sje@cup.hp.com>
PR tree-optimization/32087
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop):
Do not call scale_bbs_frequencies_int with prob of zero.
Index: tree-ssa-loop-manip.c
===================================================================
--- tree-ssa-loop-manip.c (revision 126897)
+++ tree-ssa-loop-manip.c (working copy)
@@ -1036,8 +1036,9 @@ tree_transform_and_unroll_loop (struct l
new_nonexit->count = exit_bb->count - new_exit->count;
if (new_nonexit->count < 0)
new_nonexit->count = 0;
- scale_bbs_frequencies_int (&loop->latch, 1, new_nonexit->probability,
- prob);
+ if (prob > 0)
+ scale_bbs_frequencies_int (&loop->latch, 1, new_nonexit->probability,
+ prob);
/* Finally create the new counter for number of iterations and add the new
exit instruction. */
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: New patch for PR tree-optimization/32087, ICE on -fprefetch-loop-arrays
2007-07-25 17:43 New patch for PR tree-optimization/32087, ICE on -fprefetch-loop-arrays Steve Ellcey
@ 2007-07-26 10:11 ` Richard Guenther
0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2007-07-26 10:11 UTC (permalink / raw)
To: sje; +Cc: gcc-patches
On 7/25/07, Steve Ellcey <sje@cup.hp.com> wrote:
>
> I submitted an earlier patch
> (http://gcc.gnu.org/ml/gcc-patches/2007-06/msg00357.html) for this PR
> that checked for a zero inside scale_bbs_frequencies_int. This patch
> checks for zero before calling scale_bbs_frequencies_int (in
> tree_transform_and_unroll_loop).
>
> Functions like remove_empty_loop and scale_dominated_blocks_in_loop
> already have checks in them to make sure scale_bbs_frequencies_int is
> not called in cases where a division by zero might happen so it seems
> reasonable to check it here too.
>
> Tested on IA64 HP-UX and Linux.
>
> OK for checkin?
This is ok.
Thanks,
Richard.
>
> 2007-06-06 Steve Ellcey <sje@cup.hp.com>
>
> PR tree-optimization/32087
> * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop):
> Do not call scale_bbs_frequencies_int with prob of zero.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-26 9:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-25 17:43 New patch for PR tree-optimization/32087, ICE on -fprefetch-loop-arrays Steve Ellcey
2007-07-26 10:11 ` Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).