Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 11:58 AM, Steven Bosscher wrote: > On Tue, Aug 7, 2012 at 11:52 AM, Richard Guenther > wrote: >> So I wonder why simply looping over all SSA defs in a loop body and checking >> whether a use is outside of it is not enough to compute this information ... >> (yes, we might en

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Steven Bosscher
On Tue, Aug 7, 2012 at 11:52 AM, Richard Guenther wrote: > So I wonder why simply looping over all SSA defs in a loop body and checking > whether a use is outside of it is not enough to compute this information ... > (yes, we might end up creating too many loop closed PHIs, namely on all > exits r

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 11:45 AM, Steven Bosscher wrote: > On Tue, Aug 7, 2012 at 11:22 AM, Richard Guenther > wrote: >> Another optimization would be to do >> >> @@ -440,13 +442,13 @@ compute_global_livein (bitmap livein ATT >> && ! bitmap_bit_p (def_blocks, pred_index) >>

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Steven Bosscher
On Tue, Aug 7, 2012 at 11:22 AM, Richard Guenther wrote: > Another optimization would be to do > > @@ -440,13 +442,13 @@ compute_global_livein (bitmap livein ATT > && ! bitmap_bit_p (def_blocks, pred_index) > && bitmap_set_bit (livein, pred_index)) > { > -

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 11:03 AM, Steven Bosscher wrote: > On Tue, Aug 7, 2012 at 10:31 AM, Richard Guenther > wrote: >> On Tue, Aug 7, 2012 at 8:24 AM, Steven Bosscher >> wrote: >>> Hello, >>> >>> In the test case for PR54146, compute_global_livein allocates/frees a >>> worklist for >400,000 ba

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Steven Bosscher
On Tue, Aug 7, 2012 at 10:31 AM, Richard Guenther wrote: > On Tue, Aug 7, 2012 at 8:24 AM, Steven Bosscher wrote: >> Hello, >> >> In the test case for PR54146, compute_global_livein allocates/frees a >> worklist for >400,000 basic blocks on each invocation. And it's called >> a lot, for rewrite_i

Re: [patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 Thread Richard Guenther
On Tue, Aug 7, 2012 at 8:24 AM, Steven Bosscher wrote: > Hello, > > In the test case for PR54146, compute_global_livein allocates/frees a > worklist for >400,000 basic blocks on each invocation. And it's called > a lot, for rewrite_into_loop_closed_ssa. But the maximum number of > basic blocks eve

[patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-06 Thread Steven Bosscher
Hello, In the test case for PR54146, compute_global_livein allocates/frees a worklist for >400,000 basic blocks on each invocation. And it's called a lot, for rewrite_into_loop_closed_ssa. But the maximum number of basic blocks ever on the work list was only ~6500. So the work list can be much sma