[GHC] #16039: 'GHC.Magic.noinline <var>' should not float out
GHC
ghc-devs at haskell.org
Mon Jan 7 09:29:45 UTC 2019
#16039: 'GHC.Magic.noinline <var>' should not float out
-------------------------------------+-------------------------------------
Reporter: heisenbug | Owner: heisenbug
Type: bug | Status: new
Priority: normal | Milestone: 8.10.1
Component: Compiler | Version: 8.2.1
Resolution: | Keywords: FloatOut
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #15155 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
> Who knows. This is a nice use-case for ASSERT().
Actally I think a little eyeballing would do the job.
> Simplifier. But the mechanism by which it picks up the level variables
is still a riddle for me.
It may well be "float let from let" (see the ICFP paper on let-floating).
Consider
{{{
let x = let y = blah
in y : ys
in blah2
}}}
The simplifier float the `let y`, to give
{{{
let y = blah in
let x = y : ys in
blah2
}}}
This is much better because it exposes the fact that `x` is a cons.
The test is done by `doFloatFromRhs` in `Simplify.hs`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/16039#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list