Thanks Matt, that makes sense.

I applied the same idea to another Id and now it's also never inlined now, so I
can confirm that this works.

Ömer

Matthew Pickering <matthewtpicker...@gmail.com>, 17 Tem 2019 Çar,
11:05 tarihinde şunu yazdı:
>
> I think it doesn't get inlined because we don't add an unfolding in
> the definition of `lazyId` in `MkId`.
>
> The definition in `GHC.Magic` is just for documentation I think.
>
> Cheers,
>
> Matt
>
> On Wed, Jul 17, 2019 at 8:46 AM Ömer Sinan Ağacan <omeraga...@gmail.com> 
> wrote:
> >
> > Hi Simon,
> >
> > I'm trying to understand what's preventing inlining GHC.Magic.lazy. I can 
> > see
> > with -ddump-simpl -ddump-simpl-iterations -ddump-prep that we only 
> > eliminate it
> > in CorePrep, so it's preserved during simplifications and tidying, but I 
> > don't
> > see how. It doesn't have a NOINLINE pragma, and we don't check whether the 
> > id
> > we're inlining is lazyId (using MkId.lazyId or MkId.lazyIdKey) anywhere in 
> > the
> > compiler as far as I can see.
> >
> > I also checked Note [lazyId magic] in MkId, but it doesn't explain how we 
> > avoid
> > inlining it.
> >
> > Could you say a few words on this?
> >
> > Thanks
> > Ömer
> > _______________________________________________
> > ghc-devs mailing list
> > ghc-devs@haskell.org
> > http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
ghc-devs@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs

Reply via email to