[GHC] #7574: Register allocator chokes on certain branches with literals
GHC
cvs-ghc at haskell.org
Mon Jan 14 13:39:11 CET 2013
#7574: Register allocator chokes on certain branches with literals
---------------------------------+------------------------------------------
Reporter: thoughtpolice | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (NCG) | Version: 7.7
Keywords: ncg, codegen | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Compile-time crash
Difficulty: Unknown | Testcase:
Blockedby: 7573 | Blocking:
Related: #7571 |
---------------------------------+------------------------------------------
Changes (by simonmar):
* difficulty: => Unknown
Comment:
The problem here is that the else-block becomes unreachable after
`cmmStmtConFold` optimises away the conditional, and the register
allocator doesn't like unreachable code.
The right fix is to discard unreachable code before register allocation.
It already does a strongly-connected-component analysis so this shouldn't
be too hard, but IIRC when I tried to do this before it wasn't
straightforward because `Digraph` doesn't expose the right bits. We need
an SCC pass that starts from a particular node, not the entire set of
nodes.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7574#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list