[Issue 20925] pragma(inline) should emit code to the calling CU + appropriate linker flags

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 13 12:35:16 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20925

--- Comment #10 from kinke <kinke at gmx.net> ---
(In reply to Manu from comment #9)
> You're proposing that `pragma(inline, false)` is essentially a request for
> force-not-inline though?

I'm not proposing, never-inline (in LLVM lingo: `noinline`) is what it stands
for today. There are 38 occurrences in (LDC) druntime.

> So if,
> pragma(inline, true) == absolutely-force-inline
> pragma(inline, false) == force-not-inline
> ... what is the default un-opinionated state? How do we specify the 'hint'
> request for a strong preference but not a hard error?

There's no such thing as absolutely-force-inline in LLVM. I also don't think we
need that.
`pragma(inline, true)` for LDC is `alwaysinline` + emission into each
referencing CU (currently as available_externally in non-owning CUs though,
which is weaker than linkonce_odr). I don't know when LLVM does NOT inline, I
haven't seen that case yet.

--


More information about the Digitalmars-d-bugs mailing list