X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Futils%2FGraphOps.hs;h=17c14d0925559c91298a8cb96fc14e66ccd9b832;hb=b5a73581d0c03b9d44a77706b5973d74074aa6c1;hp=8183e0b29951e6bab34257bf1787762a11496d62;hpb=85255a966b21172ce5a26c8a9cb0cdaf7315be95;p=ghc-hetmet.git diff --git a/compiler/utils/GraphOps.hs b/compiler/utils/GraphOps.hs index 8183e0b..17c14d0 100644 --- a/compiler/utils/GraphOps.hs +++ b/compiler/utils/GraphOps.hs @@ -335,6 +335,9 @@ coalesceNodes aggressive triv graph (k1, k2) , not $ elementOfUniqSet kMin (nodeConflicts nMax) , not $ elementOfUniqSet kMax (nodeConflicts nMin) + -- can't coalesce the same node + , nodeId nMin /= nodeId nMax + = coalesceNodes_merge aggressive triv graph kMin kMax nMin nMax -- don't do the coalescing after all @@ -350,9 +353,6 @@ coalesceNodes_merge aggressive triv graph kMin kMax nMin nMax | not (isNothing (nodeColor nMin) && isNothing (nodeColor nMax)) = error "GraphOps.coalesceNodes: can't coalesce colored nodes." - | nodeId nMin == nodeId nMax - = error "GraphOps.coalesceNodes: can't coalesce the same node." - --- | otherwise = let