diff options
author | Michal Terepeta <michal.terepeta@gmail.com> | 2018-04-13 11:31:38 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-04-13 11:33:09 -0400 |
commit | 78ff6e541d33d2d2caf52d2cb4578cd7b745d282 (patch) | |
tree | 257791dd2a59e5f6321bc0277cae5b56ff87a937 /compiler/cmm/CmmCommonBlockElim.hs | |
parent | f02309fe66606ffbd2d52d9347438e11890f7cfa (diff) | |
download | haskell-78ff6e541d33d2d2caf52d2cb4578cd7b745d282.tar.gz |
Revert "CmmPipeline: add a second pass of CmmCommonBlockElim"
This reverts commit d5c4d46a62ce6a0cfa6440344f707136eff18119.
Please see #14989 for details.
Test Plan: ./validate
Reviewers: bgamari, simonmar
Subscribers: thomie, carter
GHC Trac Issues: #14989
Differential Revision: https://phabricator.haskell.org/D4577
Diffstat (limited to 'compiler/cmm/CmmCommonBlockElim.hs')
-rw-r--r-- | compiler/cmm/CmmCommonBlockElim.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/cmm/CmmCommonBlockElim.hs b/compiler/cmm/CmmCommonBlockElim.hs index ad10511c1d..c91d553c47 100644 --- a/compiler/cmm/CmmCommonBlockElim.hs +++ b/compiler/cmm/CmmCommonBlockElim.hs @@ -59,10 +59,9 @@ import Data.List (foldl') -- hashes, and at most once otherwise. Previously, we were slower, and people -- rightfully complained: #10397 -type Subst = LabelMap BlockId - -elimCommonBlocks :: CmmGraph -> (CmmGraph, Subst) -elimCommonBlocks g = (replaceLabels env $ copyTicks env g, env) +-- TODO: Use optimization fuel +elimCommonBlocks :: CmmGraph -> CmmGraph +elimCommonBlocks g = replaceLabels env $ copyTicks env g where env = iterate mapEmpty blocks_with_key -- The order of blocks doesn't matter here, but revPostorder also drops any @@ -74,6 +73,7 @@ elimCommonBlocks g = (replaceLabels env $ copyTicks env g, env) -- (so avoid comparing them again) type DistinctBlocks = [CmmBlock] type Key = [Label] +type Subst = LabelMap BlockId -- The outer list groups by hash. We retain this grouping throughout. iterate :: Subst -> [[(Key, DistinctBlocks)]] -> Subst |