X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fcmm%2FMkZipCfg.hs;fp=compiler%2Fcmm%2FMkZipCfg.hs;h=2ce28ac42e58ee88042022d76d6d45bbeb25d743;hp=9b9989c465f95d4396f6f463aad8524eed98e4b9;hb=4ddba4629c5396bec766b598fe32d874a378d7bb;hpb=acdff50c263a13d1048ab87bea5508c5c9e51146 diff --git a/compiler/cmm/MkZipCfg.hs b/compiler/cmm/MkZipCfg.hs index 9b9989c..2ce28ac 100644 --- a/compiler/cmm/MkZipCfg.hs +++ b/compiler/cmm/MkZipCfg.hs @@ -197,6 +197,13 @@ mkBranch :: (Outputable m, Outputable l, LastNode l) => BlockId -> AGraph m l -- | For the structured control-flow constructs, a condition is -- represented as a function that takes as arguments the labels to -- goto on truth or falsehood. +-- +-- mkIfThenElse mk_cond then else +-- = (mk_cond L1 L2) <*> L1: then <*> goto J +-- <*> L2: else <*> goto J +-- <*> J: +-- +-- where L1, L2, J are fresh mkIfThenElse :: (Outputable m, Outputable l, LastNode l) => (BlockId -> BlockId -> AGraph m l) -- branch condition