An LLVM bug that affect both LDC and SDC. Worth pushing for
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Wed Jun 18 16:08:05 PDT 2014
On Wednesday, 18 June 2014 at 22:33:03 UTC, David Nadlinger wrote:
> You stated that closure/frame generation should occur after
> inlining. I doubt that this is feasible to implement in the
> current LDC architecture, and probably also in GDC (although I
> don't know its internals well enough to be sure).
>
> What we do in LDC, by the way, is just to optimize the closure
> GC allocations into a stack allocation if we can prove the
> context is not escaped after inlining. This happens in a custom
> optimization pass on the IR level. deadalnix is presumably
> talking about something very similar he is working on for SDC.
>
> David
Yes, but the problem is not limited to SDC. LDC exhibit the same
behavior (because it is an LLVM bug, not a SDC or LDC one).
More information about the Digitalmars-d
mailing list