middle-end/114480 - IDF compute is slow
commit0bad303944a1d2311c07d59912b4dfa7bff988c8
authorRichard Biener <rguenther@suse.de>
Wed, 27 Mar 2024 15:19:01 +0000 (27 16:19 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 28 Mar 2024 08:16:34 +0000 (28 09:16 +0100)
tree7d845eded4fb3f363971f3586467b6fdf449d48d
parentf6d7ff4796709c0639317bfd8fa58a2957a1e299
middle-end/114480 - IDF compute is slow

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 this becomes

  tree SSA rewrite                   :  15.23 (  8%)

when not optimizing and in addition to that

  tree SSA incremental               : 181.52 ( 30%)

to

  tree SSA incremental               :  24.09 (  6%)

when optimizing.

PR middle-end/114480
* cfganal.cc (compute_idf): Use simpler bitmap iteration,
touch work_set only when phi_insertion_points changed.
gcc/cfganal.cc