Thread overview
[Issue 9785] dmd -inline should inline lambda delegates
Aug 09, 2014
Dicebot
Aug 22, 2015
Walter Bright
Aug 22, 2015
Walter Bright
Aug 23, 2015
Walter Bright
Sep 28, 2015
Walter Bright
Dec 17, 2022
Iain Buclaw
August 09, 2014
https://issues.dlang.org/show_bug.cgi?id=9785

Dicebot <public@dicebot.lv> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |public@dicebot.lv

--- Comment #2 from Dicebot <public@dicebot.lv> ---
It is related but somewhat different. Issue 10848 is about frontend-based inlining that will make it a hard language spec guarantee. This one about dmd backend deficiency.

--
August 22, 2015
https://issues.dlang.org/show_bug.cgi?id=9785

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #3 from Walter Bright <bugzilla@digitalmars.com> ---
The reason the call to loop() gets inlined and the call to dg(i) does not is because dg is a function pointer. It is not until the optimizer is run that dg's value is discovered to be constant, and thus can be inlined.

Unfortunately, fixing this would require moving data flow analysis into the front end, or inlining into the optimizer, neither of which is simple.

--
August 22, 2015
https://issues.dlang.org/show_bug.cgi?id=9785

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |performance

--
August 23, 2015
https://issues.dlang.org/show_bug.cgi?id=9785

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=4440

--
September 28, 2015
https://issues.dlang.org/show_bug.cgi?id=9785

--- Comment #4 from Walter Bright <bugzilla@digitalmars.com> ---
Progress:

https://github.com/D-Programming-Language/dmd/pull/5136

--
January 04, 2018
https://issues.dlang.org/show_bug.cgi?id=9785

--- Comment #5 from hsteoh@quickfur.ath.cx ---
Huh, just re-read Walter's comment, and it suddenly struck me: inlining is currently done in the front-end? Not in the optimizer? That strikes me as rather odd, since isn't inlining usually the domain of the optimizer?

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=9785

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P4

--