[GHC] #10844: CallStack should not be inlined

GHC ghc-devs at haskell.org
Sun Oct 4 21:33:47 UTC 2015


#10844: CallStack should not be inlined
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:  gridaphobe
            Type:  task              |               Status:  patch
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D1259
-------------------------------------+-------------------------------------

Comment (by nomeata):

 > The more general fix, to make the unfolding reflect the result of the
 FloatOut pass, would subtly change the semantics of INLINE

 AFAIK, we promise that when something is marked as `INLINE`, it the
 unfolding will match closely the definition and is _not_ already
 optimized. Floating stuff out here might for example prevent rules from
 firing at the inline site. Here the quote from the user’s guide:

 > So GHC guarantees to inline precisely the code that you wrote, no more
 and no less. It does this by capturing a copy of the definition of the
 function to use for inlining (we call this the "inline-RHS"), which it
 leaves untouched, while optimising the ordinarily RHS as usual. For
 externally-visible functions the inline-RHS (not the optimised RHS) is
 recorded in the interface file.

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


More information about the ghc-tickets mailing list