summaryrefslogtreecommitdiff
path: root/compiler/GHC/Cmm.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-06-29 23:13:23 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-07-16 13:25:41 -0400
commitf2e5e7631ffafe3225989f8b67646c833c00e3ec (patch)
tree3247f8b9d07bf0985ea7faab1f7cf62bfba8d908 /compiler/GHC/Cmm.hs
parentf1c449910256c61cb35e361a367d5209bc51cc7a (diff)
downloadhaskell-f2e5e7631ffafe3225989f8b67646c833c00e3ec.tar.gz
cmm: Move toBlockList to GHC.Cmm
Diffstat (limited to 'compiler/GHC/Cmm.hs')
-rw-r--r--compiler/GHC/Cmm.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/GHC/Cmm.hs b/compiler/GHC/Cmm.hs
index 797940c5a2..a369654c4d 100644
--- a/compiler/GHC/Cmm.hs
+++ b/compiler/GHC/Cmm.hs
@@ -12,7 +12,8 @@ module GHC.Cmm (
-- * Cmm top-level datatypes
CmmProgram, CmmGroup, CmmGroupSRTs, RawCmmGroup, GenCmmGroup,
CmmDecl, CmmDeclSRTs, GenCmmDecl(..),
- CmmGraph, GenCmmGraph(..), toBlockMap, revPostorder,
+ CmmGraph, GenCmmGraph(..),
+ toBlockMap, revPostorder, toBlockList,
CmmBlock, RawCmmDecl,
Section(..), SectionType(..),
GenCmmStatics(..), type CmmStatics, type RawCmmStatics, CmmStatic(..),
@@ -150,6 +151,9 @@ revPostorder :: CmmGraph -> [CmmBlock]
revPostorder g = {-# SCC "revPostorder" #-}
revPostorderFrom (toBlockMap g) (g_entry g)
+toBlockList :: CmmGraph -> [CmmBlock]
+toBlockList g = mapElems $ toBlockMap g
+
-----------------------------------------------------------------------------
-- Info Tables
-----------------------------------------------------------------------------