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

NaN divide at by.zero
Thu Feb 20 11:17:25 UTC 2020


On Thursday, 20 February 2020 at 00:52:02 UTC, Walter Bright 
wrote:
> On 2/18/2020 10:10 PM, Max Samukha wrote:
>> On Wednesday, 19 February 2020 at 05:42:19 UTC, Walter Bright 
>> wrote:
>> 
>>> so it is inlining both forms. If you do have trivial 
>>> functions that aren't being inlined, please let me know. 
>>> Thanks!
>> 
>> 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.
>
> 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).

Would moving the inliner to the back end still slow down the 
compile times even when inlining is turned off?





More information about the Digitalmars-d mailing list