projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make IfaceSyn warning-free
[ghc-hetmet.git]
/
compiler
/
utils
/
GraphOps.hs
diff --git
a/compiler/utils/GraphOps.hs
b/compiler/utils/GraphOps.hs
index
ad5e18f
..
880f3c6
100644
(file)
--- a/
compiler/utils/GraphOps.hs
+++ b/
compiler/utils/GraphOps.hs
@@
-1,8
+1,6
@@
+{-# OPTIONS -fno-warn-missing-signatures #-}
-- | Basic operations on graphs.
--
-- | Basic operations on graphs.
--
--- TODO: refine coalescing crieteria
-
-{-# OPTIONS -fno-warn-missing-signatures #-}
module GraphOps (
addNode, delNode, getNode, lookupNode, modNode,
module GraphOps (
addNode, delNode, getNode, lookupNode, modNode,
@@
-273,7
+271,9
@@
coalesceGraph
-- less colorable (aggressive coalescing)
-> Triv k cls color
-> Graph k cls color
-- less colorable (aggressive coalescing)
-> Triv k cls color
-> Graph k cls color
- -> (Graph k cls color, [(k, k)])
+ -> ( Graph k cls color
+ , [(k, k)]) -- pairs of nodes that were coalesced, in the order that the
+ -- coalescing was applied.
coalesceGraph aggressive triv graph
= coalesceGraph' aggressive triv graph []
coalesceGraph aggressive triv graph
= coalesceGraph' aggressive triv graph []
@@
-301,8
+301,8
@@
coalesceGraph' aggressive triv graph kkPairsAcc
-- keep running until there are no more coalesces can be found
in case catMaybes mPairs of
-- keep running until there are no more coalesces can be found
in case catMaybes mPairs of
- [] -> (graph', kkPairsAcc)
- pairs -> coalesceGraph' aggressive triv graph' (pairs ++ kkPairsAcc)
+ [] -> (graph', reverse kkPairsAcc)
+ pairs -> coalesceGraph' aggressive triv graph' (reverse pairs ++ kkPairsAcc)
-- | Coalesce this pair of nodes unconditionally / agressively.
-- | Coalesce this pair of nodes unconditionally / agressively.