diff options
author | Andreas Klebinger <klebinger.andreas@gmx.at> | 2020-11-27 22:53:25 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-12-08 22:43:21 -0500 |
commit | aef44d7fbef92159960daf73c53dbc3c8d21ecbf (patch) | |
tree | 5233aa9a324585e53c5fbe4cfa3ed1128d91fcf1 /compiler/GHC/Cmm/Opt.hs | |
parent | 6e3da80055dd7b3fc3bdc576088fdd16129bdac7 (diff) | |
download | haskell-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/Cmm/Opt.hs')
0 files changed, 0 insertions, 0 deletions