[GHC] #7109: Inlining depends on datatype size, even with INLINE pragmas

GHC ghc-devs at haskell.org
Tue Nov 25 04:16:16 UTC 2014


#7109: Inlining depends on datatype size, even with INLINE pragmas
-------------------------------------+-------------------------------------
              Reporter:  dreixel     |            Owner:  simonpj
                  Type:  bug         |           Status:  infoneeded
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  7.5
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * status:  new => infoneeded


Comment:

 The function `$fGEqLogic_$cgeq` from the output of `ghc -fforce-recomp
 -ddump-simpl -dsuppress-all -O1 Bug3.hs` with ghc-7.9.20141121 (HEAD):

 {{{
 Rec {
 $fGEqLogic_$cgeq
 $fGEqLogic_$cgeq =
   \ x_aYx y_aYy ->
     let {
       $j_s1Y5
       $j_s1Y5 =
         \ a9_a1kB ->
           case y_aYy of _ {
             __DEFAULT -> False;
             Not g1_aBh_a1kM ->
               case a9_a1kB of _ {
                 L1 a10_a1kz -> $fGEqLogic_$cgeq (a10_a1kz `cast` ...)
 g1_aBh_a1kM;
                 R1 a10_X1o5 -> False
               };
             And g1_aBi_a1kN g2_aBj_a1kO ->
               case a9_a1kB of _ {
                 L1 a10_a1kz -> False;
                 R1 a10_X1o5 ->
                   case a10_X1o5 `cast` ... of _ { :*: a11_a171 b1_a172 ->
                   case $fGEqLogic_$cgeq (a11_a171 `cast` ...) g1_aBi_a1kN
 of _ {
                     False -> False;
                     True -> $fGEqLogic_$cgeq (b1_a172 `cast` ...)
 g2_aBj_a1kO
                   }
                   }
               }
           } } in
     case x_aYx of _ {
       T ->
         case y_aYy of _ {
           T -> True;
           F -> False;
           Not g1_aBh_a1kM -> False;
           And g1_aBi_a1kN g2_aBj_a1kO -> False
         };
       F ->
         case y_aYy of _ {
           __DEFAULT -> False;
           F -> True
         };
       Not g1_aBh_a1kM -> $j_s1Y5 (L1 (g1_aBh_a1kM `cast` ...));
       And g1_aBi_a1kN g2_aBj_a1kO ->
         $j_s1Y5
           (R1
              ((:*: (g1_aBi_a1kN `cast` ...) (g2_aBj_a1kO `cast` ...))
               `cast` ...))
     }
 end Rec }
 }}}

 Pedro: is that sufficiently small, or do you still think there is a bug
 somewhere?

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


More information about the ghc-tickets mailing list