diff options
| author | Bartosz Nitka <niteria@gmail.com> | 2016-06-06 08:15:43 -0700 |
|---|---|---|
| committer | Bartosz Nitka <niteria@gmail.com> | 2016-06-06 08:21:49 -0700 |
| commit | 3e7a876a9cdf10e5153421b4905928b9de981778 (patch) | |
| tree | dd6b7e5ced6f9fd3b1720cbba86b8f47f054d678 /compiler/nativeGen/RegAlloc/Graph | |
| parent | 46d2da00ddb8756d966a5ba491b618367911de0f (diff) | |
| download | haskell-3e7a876a9cdf10e5153421b4905928b9de981778.tar.gz | |
Kill foldUniqSet
I planned to just say that we don't care about this part.
Turns out I was able to document away the uses in the codegenerator.
Test Plan: ./validate
Reviewers: simonmar, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2307
GHC Trac Issues: #4012
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Graph')
| -rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/SpillClean.hs | 3 | ||||
| -rw-r--r-- | compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs index f472d29270..2383d7bb3a 100644 --- a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs +++ b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs @@ -549,7 +549,8 @@ delAssoc :: (Uniquable a) delAssoc a m | Just aSet <- lookupUFM m a , m1 <- delFromUFM m a - = foldUniqSet (\x m -> delAssoc1 x a m) m1 aSet + = nonDetFoldUFM (\x m -> delAssoc1 x a m) m1 aSet + -- It's OK to use nonDetFoldUFM here because deletion is commutative | otherwise = m diff --git a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs index b632ac7889..4bbf5d4c88 100644 --- a/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs +++ b/compiler/nativeGen/RegAlloc/Graph/TrivColorable.hs @@ -225,8 +225,8 @@ trivColorable classN conflicts exclusions RcFloat -> (cd, cf+1) _ -> panic "Regs.trivColorable: reg class not handled" - tmp = foldUniqSet acc (0, 0) conflicts - (countInt, countFloat) = foldUniqSet acc tmp exclusions + tmp = nonDetFoldUFM acc (0, 0) conflicts + (countInt, countFloat) = nonDetFoldUFM acc tmp exclusions squeese = worst countInt classN RcInteger + worst countFloat classN RcFloat |
