Re: When does GHC produce unlifted `let` bindings?

2017-10-29 Thread Ben Gamari
Sebastian Graf writes: > Hi folks, > > I was debugging a Core-to-Core transform for TEST=spec-inline > > and > was wondering (yet again) why GHC produces unlifted `

RE: When does GHC produce unlifted `let` bindings?

2017-10-30 Thread Simon Peyton Jones via ghc-devs
See Note [CoreSyn let/app invariant] in CoreSyn. Briefly, you can write let x::Int# = e in … if e is “ok-for-speculation”. See extensive comments in CoreUtils on what that means. You could also use case, but let-bindings “float” more easily than cases, because they are not worried

Re: When does GHC produce unlifted `let` bindings?

2017-11-02 Thread Sebastian Graf
Thanks both of you, that makes sense. Re: let-bindings floating more easily, would a check for `exprIsOkForSpeculation scrut` in theory suffice to float out cases? On Mon, Oct 30, 2017 at 10:56 AM, Simon Peyton Jones wrote: > See Note [CoreSyn let/app invariant] in CoreSyn. > > > > Briefly, you

RE: When does GHC produce unlifted `let` bindings?

2017-11-02 Thread Simon Peyton Jones via ghc-devs
: ghc-devs Subject: Re: When does GHC produce unlifted `let` bindings? Thanks both of you, that makes sense. Re: let-bindings floating more easily, would a check for `exprIsOkForSpeculation scrut` in theory suffice to float out cases? On Mon, Oct 30, 2017 at 10:56 AM, Simon Peyton Jones