Seems like something that should be delegated to a peep hole optimizer. What you describe make it possible to reorder the basic blocks at a later stage.
Alexander On Mar 8, 2014 9:24 AM, "Johan Tibell" <[email protected]> wrote: > On a related note, doesn't Cmm support fall-through branches? Heap checks > use two branches instead of one branch and one fall-through case: > > c1Cq: > Hp = Hp + 152; > if (Hp > I64[BaseReg + 856]) goto c1Cs; else goto c1Cr; > c1Cs: > I64[BaseReg + 904] = 152; > goto c1Cp; > c1Cp: > R1 = PicBaseReg + a_r1za_closure; > call (I64[BaseReg - 8])(R1) args: 8, res: 0, upd: 8; > c1Cr: > > > > On Sat, Mar 8, 2014 at 9:21 AM, Johan Tibell <[email protected]>wrote: > >> While looking at some generated Cmm I saw things like this >> >> c1Cm: >> goto c1Cq; >> c1Cq: >> >> i.e. useless basic blocks that haven't been optimized away. Is this to be >> expected? >> >> -- Johan >> >> > > _______________________________________________ > ghc-devs mailing list > [email protected] > http://www.haskell.org/mailman/listinfo/ghc-devs > >
_______________________________________________ ghc-devs mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-devs
