[GHC] #14226: Common Block Elimination pass doesn't eliminate common blocks

GHC ghc-devs at haskell.org
Sun Feb 4 12:11:37 UTC 2018


#14226: Common Block Elimination pass doesn't eliminate common blocks
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:  bgamari
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.2.1
  (CodeGen)                          |             Keywords:  newcomer,
      Resolution:                    |  CodeGen
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:  #9157, #14754     |  Differential Rev(s):  Phab:D3973,
       Wiki Page:                    |  Phab:D3999
-------------------------------------+-------------------------------------

Comment (by michalt):

 :(

 I can currently think of two options:

 1) Fix the approach using alpha renaming by actually checking liveness on
 entry and exit for each variable. (to only consider variables that are not
 live across blocks) The disadvantage is that this would be quite a bit
 more costly.

 2) Don't improve CBE itself, but run it a second time after the sinking
 pass - this might get rid of some of the cases from this ticket (e.g., the
 one from comment:6) The advantage is that this would also fix #12915; the
 disadvantage: this might not be always as effective as option 1).

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14226#comment:28>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list