An LLVM bug that affect both LDC and SDC. Worth pushing for

Iain Buclaw via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 18 14:14:40 PDT 2014


On 18 June 2014 14:18, David Nadlinger via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> On Wednesday, 18 June 2014 at 09:29:14 UTC, Iain Buclaw via Digitalmars-d
> wrote:
>>
>> Yeah, I did get that bit. I'm not sure of the optimisation though.
>>
>> IMO, the closure/frame generation should occur *after* inlining.
>
>
> How would that work if your inliner operates on some language-independent
> IR?
>

I don't know LLVM to comment.  But the way GCC operates at a higher
level so that all information is available to use (the inlined
function is just duplicated with all its parameters remapped into
variables, and the return expression is turned into an assignment to a
dedicated return-value variable).

Though the fact still is that the same is true with GDC, it's IR is
generated before optimisation passes.


More information about the Digitalmars-d mailing list