Re: [PATCH] middle-end/114480 - IDF compute is slow

2024-03-28 Thread Richard Biener
On Wed, 27 Mar 2024, Michael Matz wrote: > Hey, > > On Wed, 27 Mar 2024, Jakub Jelinek wrote: > > > > @@ -1712,12 +1711,9 @@ compute_idf (bitmap def_blocks, bitmap_head *dfs) > > >gcc_checking_assert (bb_index > > > < (unsigned) last_basic_block_for_fn (cfun)); > >

Re: [PATCH] middle-end/114480 - IDF compute is slow

2024-03-27 Thread Jakub Jelinek
On Wed, Mar 27, 2024 at 07:44:28PM +0100, Michael Matz wrote: > Hey, > > On Wed, 27 Mar 2024, Jakub Jelinek wrote: > > > > @@ -1712,12 +1711,9 @@ compute_idf (bitmap def_blocks, bitmap_head *dfs) > > >gcc_checking_assert (bb_index > > > < (unsigned)

Re: [PATCH] middle-end/114480 - IDF compute is slow

2024-03-27 Thread Michael Matz
Hey, On Wed, 27 Mar 2024, Jakub Jelinek wrote: > > @@ -1712,12 +1711,9 @@ compute_idf (bitmap def_blocks, bitmap_head *dfs) > >gcc_checking_assert (bb_index > >< (unsigned) last_basic_block_for_fn (cfun)); > > > > - EXECUTE_IF_AND_COMPL_IN_BITMAP

Re: [PATCH] middle-end/114480 - IDF compute is slow

2024-03-27 Thread Jakub Jelinek
On Wed, Mar 27, 2024 at 04:42:21PM +0100, Richard Biener wrote: > PR middle-end/114480 > * cfganal.cc (compute_idf): Use simpler bitmap iteration, > touch work_set only when phi_insertion_points changed. > --- > gcc/cfganal.cc | 10 +++--- > 1 file changed, 3 insertions(+),

[PATCH] middle-end/114480 - IDF compute is slow

2024-03-27 Thread Richard Biener
The testcase in this PR shows very slow IDF compute: tree SSA rewrite : 76.99 ( 31%) 24.78%243663 cc1plus cc1plus [.] compute_idf which can be mitigated to some extent by refactoring the bitmap operations to simpler variants. With the patch below