<HTML>
<style> BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; }</style>Currently, compiled programs shouldn't show any measurable difference in running speed because the overhaul just attempts to make compilation faster overall.<br>
<br>
Nice spot with the "incq" command there. It wasn't intentional for that to be split into 3 commands, but is likely just a side-effect of pass 1 not being run twice now... granted, since one of my criteria was that the code should not be less optimal, I'll see if I can watch out for that one.<br>
<br>
One interesting thing to note though is that the read and add work on the 32-bit register, but then the full 64-bit register is written.<br>
<br>
Gareth aka. Kit<br>
<br>
<br>
<span style="font-weight: bold;">On Wed 12/12/18 13:08 , "Marģers ." margers.roked@inbox.lv sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<br>
<br>
----- Reply to message -----
<br>
Subject: Re: [fpc-devel] x86_64 Optimizer Overhaul
<br>
Date: 2018. gada 6. decembris 18:57:29
<br>
From: J. Gareth Moreton <<a href="javascript:top.opencompose('gareth@moreton-family.com','','','')">gareth@moreton-family.com</a>>
<br>
To: FPC developers' list
<br>
<<a href="javascript:top.opencompose('fpc-devel@lists.freepascal.org','','','')">fpc-devel@lists.freepascal.org</a>>
<br>
<span style="color: rgb(102, 102, 102);">> I believed I've fixed the bug. Thanks for your
</span><br>
help.
<br>
<br>
Now it's way better. -O3 and -O4 works fine.
<br>
Speed test for my programs shows no measurable
<br>
difference.
<br>
<br>
<br>
# [468] inc(sk);
<br>
--trunk ---------
<br>
incq 272(%rsp)
<br>
<br>
-- overhaul -------
<br>
movl 272(%rsp),%eax
<br>
addl $1,%eax
<br>
movq %rax,272(%rsp)
<br>
<br>
did you mean to be so?
<br>
<br>
margers
<br>
<br>
<br>
<br>
</blockquote></HTML>