[GHC] #8456: Control flow optimisations duplicate blocks
GHC
ghc-devs at haskell.org
Thu Oct 24 12:51:24 UTC 2013
#8456: Control flow optimisations duplicate blocks
--------------------------------------------+------------------------------
Reporter: jstolarek | Owner: jstolarek
Type: bug | Status: new
Priority: highest | Milestone: 7.8.1
Component: Compiler | Version: 7.7
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime performance bug | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: 8275 | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by simonmar):
`lookup` looks up in the domain, not the range. You would need to do
something like `elem b' (mapElems shortcut_map)`. This is O(n).
But I still think you don't need this test. You're keeping `backEdges` up
to date, so there's no reason to believe that you have something "hidden"
in the `shortcut_map` that would represent more predecessors, right? The
`shortcut_map` is for replacing labels inside expressions after the pass
is complete. It used to update calls, but as you point out, the pass now
does this as it goes along.
There are no extra invariants. The `shortcut_map` doesn't represent any
extra edges in the graph.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8456#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list