[patch] Use a smaller, dynamic worklist in compute_global_livein

2012-08-07 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

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 stevenb@gmail.com 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

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 richard.guent...@gmail.com wrote: On Tue, Aug 7, 2012 at 8:24 AM, Steven Bosscher stevenb@gmail.com wrote: Hello, In the test case for PR54146, compute_global_livein allocates/frees a worklist for 400,000 basic blocks on each invocation.

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 stevenb@gmail.com wrote: On Tue, Aug 7, 2012 at 10:31 AM, Richard Guenther richard.guent...@gmail.com wrote: On Tue, Aug 7, 2012 at 8:24 AM, Steven Bosscher stevenb@gmail.com wrote: Hello, In the test case for PR54146,

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 richard.guent...@gmail.com 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:45 AM, Steven Bosscher stevenb@gmail.com wrote: On Tue, Aug 7, 2012 at 11:22 AM, Richard Guenther richard.guent...@gmail.com wrote: Another optimization would be to do @@ -440,13 +442,13 @@ compute_global_livein (bitmap livein ATT ! bitmap_bit_p

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 richard.guent...@gmail.com 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,

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 stevenb@gmail.com wrote: On Tue, Aug 7, 2012 at 11:52 AM, Richard Guenther richard.guent...@gmail.com 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