[GHC] #14226: Common Block Elimination pass doesn't eliminate common blocks
GHC
ghc-devs at haskell.org
Thu Sep 14 15:09:59 UTC 2017
#14226: Common Block Elimination pass doesn't eliminate common blocks
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: high | Milestone: 8.4.1
Component: Compiler | Version: 8.2.1
(CodeGen) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
Well, because we have an extremely narrow definition of "common". Namely,
to be the same two blocks must be syntactically identical, including local
register names. I don't know how often this happens in practice, but I'd
imagine not terribly often.
I think the criterion that you would ideally want is equivalence up to
alpha renaming of local registers; unfortunately this would likely be
considerably more costly to check for. This makes me wonder whether we
shouldn't just try to avoid duplicating the blocks to begin with (e.g.
addressing #14222 earlier in the compilation pipeline).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14226#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list