[GHC] #12603: INLINE and manually inlining produce different code
GHC
ghc-devs at haskell.org
Mon Dec 5 12:35:27 UTC 2016
#12603: INLINE and manually inlining produce different code
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: bgamari
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #12747 #12781 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
It's all to do with ''interactions'' between multiple INLINEs. If we did
as you say, and inlined earlier, then we would ''also'' inline functions
like `(+)` which also have INLINE pragmas on them. So we might get
{{{
attrFromIntINLINE w = case w of I# w' ->
case 2# ^# 8# of lvl' ->
Attr (w' +# lvl')
}}}
which, as I say, is currently unfloatable. You may say that the INLINE on
`(+)` should be delayed and that would be one solution. But perhaps a
better one would be to make floating more robust.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12603#comment:28>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list