summaryrefslogtreecommitdiff
path: root/compiler/GHC/Data/Bitmap.hs
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-09-15 13:09:17 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-09-17 09:44:53 -0400
commit53dc8e41a424909c8c3eccc43695fee0cdcc1555 (patch)
tree6d96a223f8a7f76053d15de09fc1e0eff0e3689b /compiler/GHC/Data/Bitmap.hs
parentb041ea7784f036dd7cfc5fae6380db4f3c392ab4 (diff)
downloadhaskell-53dc8e41a424909c8c3eccc43695fee0cdcc1555.tar.gz
Code Gen: Use more efficient block merging algorithm
The previous algorithm scaled poorly when there was a large number of blocks and edges. The algorithm links together block chains which have edges between them in the CFG. The new algorithm uses a union find data structure in order to efficiently merge together blocks and calculate which block chain each block id belonds to. I copied the UnionFind data structure which already existed in Cabal into the GHC library rathert than reimplement it myself. This change results in a very significant reduction in allocations when compiling the mmark package. Ticket: #19471
Diffstat (limited to 'compiler/GHC/Data/Bitmap.hs')
0 files changed, 0 insertions, 0 deletions