
On Sun, Mar 9, 2014 at 10:22 PM, Jan Stolarek
useless basic blocks that haven't been optimized away. Is this to be expected? I believe this should not happen but it's hard to say without looking at a complete dump. Could you post full Cmm dump + a minimial working example that generates that?
On a related note, doesn't Cmm support fall-through branches? Cmm program is represented as a graph with each node (a block of code) having explicit list of successors. Having fall-throughs in Cmm would require storing blocks linearily with a guarantee that their order will not change. Note that fall-throughs are present in the generated assembly.
This was me being stupid. GHC happily prints optimized Cmm even if no optimization was done due to a missing flag (cause GHC defaults to -O0).