DMD backend quality (Was: Re: DIP 1031--Deprecate Brace-Style Struct Initializers--Community Review Round 1 Discussion)

Max Samukha maxsamukha at gmail.com
Thu Feb 20 10:08:50 UTC 2020


On Thursday, 20 February 2020 at 00:52:02 UTC, Walter Bright 
wrote:

>> 
>> Anything with a 'switch':
>> 
>> void foo() {
>>      switch(true) {
>>          default:
>>      }
>> }
>
> That's true, it's also true for loops. Though trivial functions 
> with switches seem to me to be rare.

We encountered a case recently where we wanted to inline one. It 
was trivial to work around, though.

>
> Keep in mind that the inliner is part of the dmd front end, not 
> the back end. The inliner would be more effective if it was 
> part of the back end, but that comes with a major memory/time 
> penalty (intermediate code would have to be generated for all 
> functions, even ones not being compiled, and kept around in 
> memory).

Yes, I know about that. People are often willing to pay the cost 
for highly optimized builds.


More information about the Digitalmars-d mailing list