summaryrefslogtreecommitdiff
path: root/compiler/ghc.cabal.in
diff options
context:
space:
mode:
authorAndreas Klebinger <klebinger.andreas@gmx.at>2020-11-27 22:53:25 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-12-08 22:43:21 -0500
commitaef44d7fbef92159960daf73c53dbc3c8d21ecbf (patch)
tree5233aa9a324585e53c5fbe4cfa3ed1128d91fcf1 /compiler/ghc.cabal.in
parent6e3da80055dd7b3fc3bdc576088fdd16129bdac7 (diff)
downloadhaskell-aef44d7fbef92159960daf73c53dbc3c8d21ecbf.tar.gz
Cmm.Sink: Optimize retaining of assignments, live sets.
Sinking requires us to track live local regs after each cmm statement. We used to do this via "Set LocalReg". However we can replace this with a solution based on IntSet which is overall more efficient without losing much. The thing we lose is width of the variables, which isn't used by the sinking pass anyway. I also reworked how we keep assignments to regs mentioned in skipped assignments. I put the details into Note [Keeping assignemnts mentioned in skipped RHSs]. The gist of it is instead of keeping track of it via the use count which is a `IntMap Int` we now use the live regs set (IntSet) which is quite a bit faster. I think it also matches the semantics a lot better. The skipped (not discarded) assignment does in fact keep the regs on it's rhs alive so keeping track of this in the live set seems like the clearer solution as well. Improves allocations for T3294 by yet another 1%.
Diffstat (limited to 'compiler/ghc.cabal.in')
-rw-r--r--compiler/ghc.cabal.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in
index 86b86774a4..273678e3f4 100644
--- a/compiler/ghc.cabal.in
+++ b/compiler/ghc.cabal.in
@@ -205,6 +205,7 @@ Library
GHC.Cmm.Switch
GHC.Cmm.Switch.Implement
GHC.CmmToAsm
+ GHC.Cmm.LRegSet
GHC.CmmToAsm.BlockLayout
GHC.CmmToAsm.CFG
GHC.CmmToAsm.CFG.Dominators