diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-09-15 13:09:17 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-09-17 09:44:53 -0400 |
commit | 53dc8e41a424909c8c3eccc43695fee0cdcc1555 (patch) | |
tree | 6d96a223f8a7f76053d15de09fc1e0eff0e3689b /compiler/ghc.cabal.in | |
parent | b041ea7784f036dd7cfc5fae6380db4f3c392ab4 (diff) | |
download | haskell-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.cabal.in')
-rw-r--r-- | compiler/ghc.cabal.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 2023fbe3da..b1acf005da 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -407,6 +407,7 @@ Library GHC.Data.Strict GHC.Data.StringBuffer GHC.Data.TrieMap + GHC.Data.UnionFind GHC.Driver.Backend GHC.Driver.Backpack GHC.Driver.Backpack.Syntax |