summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergo ERDI <gergo@erdi.hu>2022-04-08 09:55:21 +0800
committerAndreas Klebinger <klebinger.andreas@gmx.at>2022-05-10 11:43:33 +0000
commit50347dedc6525fcd6b32e29c0c532248b6fdd1c6 (patch)
tree6785e4dd2f39fbc056d6cb131d47eb82728387aa
parenta4fbb589fd176e6c2f6648dea6c93e25668f1db8 (diff)
downloadhaskell-50347dedc6525fcd6b32e29c0c532248b6fdd1c6.tar.gz
Improve "Glomming" note
Add a paragraph that clarifies that `occurAnalysePgm` finding out-of-order references, and thus needing to glom, is not a cause for concern when its root cause is rewrite rules.
-rw-r--r--compiler/GHC/Core/Opt/OccurAnal.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/GHC/Core/Opt/OccurAnal.hs b/compiler/GHC/Core/Opt/OccurAnal.hs
index 5d31eb2cfd..e7e0e7447c 100644
--- a/compiler/GHC/Core/Opt/OccurAnal.hs
+++ b/compiler/GHC/Core/Opt/OccurAnal.hs
@@ -363,6 +363,12 @@ Solution:
then just glom all the bindings into a single Rec, so that
the *next* iteration of the occurrence analyser will sort
them all out. This part happens in occurAnalysePgm.
+
+This is a legitimate situation where the need for glomming doesn't
+point to any problems. However, when GHC is compiled with -DDEBUG, we
+produce a warning addressed to the GHC developers just in case we
+require glomming due to an out-of-order reference that is caused by
+some earlier transformation stage misbehaving.
-}
{-