[commit: ghc] master: Provide Uniquable version of SCC (35d1564)
git at git.haskell.org
git at git.haskell.org
Thu Jun 23 14:56:17 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/35d1564cea2e611a4fecf24f09eff83f8a55af1c/ghc
>---------------------------------------------------------------
commit 35d1564cea2e611a4fecf24f09eff83f8a55af1c
Author: Bartosz Nitka <niteria at gmail.com>
Date: Tue Jun 14 03:28:30 2016 -0700
Provide Uniquable version of SCC
We want to remove the `Ord Unique` instance because there's
no way to implement it in deterministic way and it's too
easy to use by accident.
We sometimes compute SCC for datatypes whose Ord instance
is implemented in terms of Unique. The Ord constraint on
SCC is just an artifact of some internal data structures.
We can have an alternative implementation with a data
structure that uses Uniquable instead.
This does exactly that and I'm pleased that I didn't have
to introduce any duplication to do that.
Test Plan:
./validate
I looked at performance tests and it's a tiny bit better.
Reviewers: bgamari, simonmar, ezyang, austin, goldfire
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2359
GHC Trac Issues: #4012
>---------------------------------------------------------------
35d1564cea2e611a4fecf24f09eff83f8a55af1c
compiler/basicTypes/NameEnv.hs | 2 +-
compiler/cmm/CmmBuildInfoTables.hs | 2 +-
compiler/codeGen/StgCmmUtils.hs | 2 +-
compiler/iface/MkIface.hs | 2 +-
compiler/main/GhcMake.hs | 5 +-
compiler/nativeGen/AsmCodeGen.hs | 2 +-
.../nativeGen/RegAlloc/Linear/JoinToTargets.hs | 4 +-
compiler/nativeGen/RegAlloc/Liveness.hs | 6 +-
compiler/rename/RnSource.hs | 5 +-
compiler/simplCore/OccurAnal.hs | 10 +-
compiler/typecheck/TcBinds.hs | 2 +-
compiler/typecheck/TcEvidence.hs | 2 +-
compiler/typecheck/TcSMonad.hs | 2 +-
compiler/typecheck/TcTyDecls.hs | 5 +-
compiler/types/Type.hs | 2 +-
compiler/utils/Digraph.hs | 127 +++++++++++++++++----
compiler/vectorise/Vectorise/Type/Classify.hs | 2 +-
testsuite/tests/determinism/determinism001.hs | 2 +-
18 files changed, 136 insertions(+), 48 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 35d1564cea2e611a4fecf24f09eff83f8a55af1c
More information about the ghc-commits
mailing list