[Issue 10820] curly brakets prevent inlining with DMD

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Aug 14 10:21:18 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10820


Dmitry Olshansky <dmitry.olsh at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh at gmail.com


--- Comment #1 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2013-08-14 10:21:17 PDT ---
> I was doing some benchmarks on a very tight loop, and I discovered that when a
branch is "curly" enclosed, then it prevents inlining:

It's far simpler then that - take a look at inline.c and observe that it only
ever inlines if/else that immediately containt return statement. Braces turn
return statement into a block hence destroying this hack.

What needs to be done is to IMPLEMENT inlining of if/else/switch/while
statements.
One general way to do that is to treat all statements as expressions (e.g.
yielding void) inside of the compiler.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list