Are there any default dmd optimizations

Ali Çehreli acehreli at yahoo.com
Sat Feb 23 23:36:07 PST 2013


On 02/23/2013 10:53 PM, Dmitry Olshansky wrote:
 > 24-Feb-2013 04:14, Ali Çehreli пишет:
 >> Does the compiler inline any function even without -inline?
 >>
 >> What level of optimization is applied even without -O? One that comes to
 >> mind is the elision of certain struct object copies. Is such an
 >> optimization applied without -O? If so, are there similar other
 >> optimizations?
 >>
 >
 > AFAIK NRVO/RVO are working w/o -O switch and are performed in the
 > front-end (for better or worse).

Makes sense that they are performed in the front-end because NRVO and 
RVO and defined at language level in C++ as well.

I will strongly :) assume that no function is inlined unless the -inline 
switch is used.

Ali



More information about the Digitalmars-d mailing list