aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2024-09-24 11:47:26 +0200
committerRichard Biener <rguenth@gcc.gnu.org>2024-09-25 08:57:55 +0200
commitcaf3fe7880e62692da45489dc5bcae069c1555c8 (patch)
tree9cac24628bc8e2600282211d7094cc16a37f426f /gcc
parent5b652b0132334e509c730311ac625c1dbe287282 (diff)
downloadgcc-caf3fe7880e62692da45489dc5bcae069c1555c8.zip
gcc-caf3fe7880e62692da45489dc5bcae069c1555c8.tar.gz
gcc-caf3fe7880e62692da45489dc5bcae069c1555c8.tar.bz2
tree-optimization/114855 - slow VRP due to equiv oracle queries
For the testcase in PR114855 VRP takes 320.41s (23%) (after mitigating backwards threader slowness). This is mostly due to the bitmap check in equiv_oracle::find_equiv_dom. The following turns this bitmap to tree view, trading the linear search for a O(log N) one which improves VRP time to 54.54s (5%). PR tree-optimization/114855 * value-relation.cc (equiv_oracle::equiv_oracle): Switch m_equiv_set to tree view.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/value-relation.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/value-relation.cc b/gcc/value-relation.cc
index 45722fc..d6ad2dd 100644
--- a/gcc/value-relation.cc
+++ b/gcc/value-relation.cc
@@ -321,6 +321,7 @@ equiv_oracle::equiv_oracle ()
m_equiv.create (0);
m_equiv.safe_grow_cleared (last_basic_block_for_fn (cfun) + 1);
m_equiv_set = BITMAP_ALLOC (&m_bitmaps);
+ bitmap_tree_view (m_equiv_set);
obstack_init (&m_chain_obstack);
m_self_equiv.create (0);
m_self_equiv.safe_grow_cleared (num_ssa_names + 1);