[Issue 9785] dmd -inline should inline lambda delegates
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Aug 21 22:26:18 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=9785
Walter Bright <bugzilla at digitalmars.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bugzilla at digitalmars.com
--- Comment #3 from Walter Bright <bugzilla at 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.
--
More information about the Digitalmars-d-bugs
mailing list