
#14226: Common Block Elimination pass doesn't eliminate common blocks -------------------------------------+------------------------------------- Reporter: bgamari | Owner: (none) Type: bug | Status: closed Priority: high | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 (CodeGen) | Resolution: fixed | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #9157 | Differential Rev(s): Phab:D3973, Wiki Page: | Phab:D3999 -------------------------------------+------------------------------------- Comment (by AndreasK): Replying to [comment:14 bgamari]:
This should now be resolved.
Rather, I think we could improve the `switch` lowering: currently we lower this as a chain of branches. I suspect this is the sort of case where we might benefit from instead using a jump table.
Measuring this idea and, if it pays off, implementing it might be an interesting project for someone looking to get their hands dirty in the NCG.
According to the comments in `CmmSwitch.hs` jump tables only make sense when the gaps between entries are smaller than 7 and the table has at least 5 elements which isn't the case here. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14226#comment:21 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler