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

GHC ghc-devs at haskell.org
Thu Sep 14 16:51:18 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):

 To make my objection in comment:4 more concrete, consider that you have
 the following two blocks (from the example in #14226),
 {{{
   c2VZ: // global
       _c2Yd::I64 = _s2Se::I64 + 1;
       _s2Sx::I64 = _c2Yd::I64;
       _s2Se::I64 = _s2Sx::I64;
       goto c2TE;
   c2VY: // global
       _c2Yb::I64 = _s2Se::I64 + 1;
       _s2Sw::I64 = _c2Yb::I64;
       _s2Se::I64 = _s2Sw::I64;
       goto c2TE;
 }}}
 They differ in only two local register names, both of which are dead
 outside of their respective blocks. Ignoring the fact that the sinking
 pass should eliminate both intermediate locals, it seems to me like CBE
 should really consider these blocks to be duplicates.

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


More information about the ghc-tickets mailing list