[fpc-devel] generated assembler code

Martin Frb lazarus at mfriebe.de
Tue May 19 18:18:51 CEST 2015


On 19/05/2015 14:23, Jonas Maebe wrote:
>
> Martin Frb wrote on Tue, 19 May 2015:
>
>> 005EACF0 833A00                   cmp dword ptr [edx],$00
>> 005EACF3 0F95C0                   setnz al
>> 005EACF6 84C0                     test al,al
>> 005EACF8 7509                     jnz +$09
>>
>> Is that something that should be optimized away?
>
> I'm sure you can find 100's of examples like that when using inline. 
> So yes, it's obviously a missed optimisation, but an x86 peephole 
> optimisation to remove those two instructions is "dweilen met de kraan 
> open" (mopping up water while leaving the tap running), and (as far as 
> I'm concerned) a waste of time since exactly the same happens on all 
> architectures as well (except for possibly those without flags).

I knew why I ask for optimization in general, and not at any specific 
place :)

I was more interested if (with any disregard to priority or importance)
1) it is a known issue
2) regarded as issue at all

Appears to be.





More information about the fpc-devel mailing list