diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-11-09 20:48:04 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-12-15 03:54:02 -0500 |
commit | da7b51d8598400ed8073afe1b311c73a04e2230d (patch) | |
tree | 4fa841238ccce1da6469a0fb790037013af56646 /compiler | |
parent | 75855643ee22508ca478f63e8cbc61338029ab66 (diff) | |
download | haskell-da7b51d8598400ed8073afe1b311c73a04e2230d.tar.gz |
cmm: Introduce blockConcat
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Cmm/ContFlowOpt.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Cmm/Dataflow/Block.hs | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/compiler/GHC/Cmm/ContFlowOpt.hs b/compiler/GHC/Cmm/ContFlowOpt.hs index 9fc364868a..14dda51bfc 100644 --- a/compiler/GHC/Cmm/ContFlowOpt.hs +++ b/compiler/GHC/Cmm/ContFlowOpt.hs @@ -10,7 +10,7 @@ where import GHC.Prelude hiding (succ, unzip, zip) -import GHC.Cmm.Dataflow.Block +import GHC.Cmm.Dataflow.Block hiding (blockConcat) import GHC.Cmm.Dataflow.Collections import GHC.Cmm.Dataflow.Graph import GHC.Cmm.Dataflow.Label diff --git a/compiler/GHC/Cmm/Dataflow/Block.hs b/compiler/GHC/Cmm/Dataflow/Block.hs index f3876e241c..47d76ad2d4 100644 --- a/compiler/GHC/Cmm/Dataflow/Block.hs +++ b/compiler/GHC/Cmm/Dataflow/Block.hs @@ -14,6 +14,7 @@ module GHC.Cmm.Dataflow.Block , IndexedCO , Block(..) , blockAppend + , blockConcat , blockCons , blockFromList , blockJoin @@ -136,6 +137,8 @@ blockJoin f b t = BlockCC f b t blockAppend :: Block n e O -> Block n O x -> Block n e x blockAppend = cat +blockConcat :: [Block n O O] -> Block n O O +blockConcat = foldr blockAppend emptyBlock -- Taking apart |