summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc/Graph/Main.hs
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2016-07-07 03:07:20 -0700
committerBartosz Nitka <niteria@gmail.com>2016-07-07 03:57:44 -0700
commit6ed7c4793fe1acd491646a8312afbbda6be1fd0b (patch)
tree206c1a844201486bfdbfdf9cdca7efe9f2ab7d52 /compiler/nativeGen/RegAlloc/Graph/Main.hs
parentbedd62037f588321312feaf16923fa04d443e3d8 (diff)
downloadhaskell-6ed7c4793fe1acd491646a8312afbbda6be1fd0b.tar.gz
Document some codegen nondeterminism
Bit-for-bit reproducible binaries are not a goal for now, so this is just marking places that could be a problem. Doing this will allow eltsUFM to be removed and will leave only nonDetEltsUFM. GHC Trac: #4012
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Graph/Main.hs')
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Main.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs
index f7b3d0179d..0b10f3c1e3 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Main.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs
@@ -401,7 +401,8 @@ patchRegsFromGraph platform graph code
-- We need to deepSeq the whole graph before trying to colour it to avoid
-- space leaks.
seqGraph :: Color.Graph VirtualReg RegClass RealReg -> ()
-seqGraph graph = seqNodes (eltsUFM (Color.graphMap graph))
+seqGraph graph = seqNodes (nonDetEltsUFM (Color.graphMap graph))
+ -- See Note [Unique Determinism and code generation]
seqNodes :: [Color.Node VirtualReg RegClass RealReg] -> ()
seqNodes ns