<HTML>
I admit I do wonder how hard maintenance will be. True, there is some more looking ahead, but it's not really any more complex than what it is already (e.g. take a look at OptPass1MOV in the trunk).<br>
<br>
<div>When it comes to debugging the peephole optimiser, one thing I did was write a function that wrote the assembly of the current block to the console, so I could visually see the commands ahead. It's not part of the submitted patches because it only works for i386 and x86_64 under Windows, but it's proven useful.</div><div><br>
</div><div>If there's interest, I can submit it as a separate patch, but it's not really suitable as a permanent fixture unless someone wants to try to make it a feature only enabled with debug defines.<br>
</div><div><br>
</div><div>Gareth aka. Kit<br>
</div> <br>
<br>
<span style="font-weight: bold;">On Sat 01/12/18 18:57 , "J. Gareth Moreton" gareth@moreton-family.com sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT:0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
Aw, okay. Well, post peephole is still a separate stage, since that prevents a lot of other optimisations (e.g. changing mov 0,%reg into xor %reg,%reg).<br>
<br>
I'll start breaking it up into smaller chunks.<br>
<div><br>
</div><div>Gareth aka. Kit<br>
</div> <br>
<br>
<span style="font-weight: bold;">On Sat 01/12/18 19:54 , Florian Klämpfl florian@freepascal.org sent:<br>
</span><blockquote style="BORDER-LEFT: #F5F5F5 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">Am 01.12.2018 um 17:28 schrieb J. Gareth Moreton:
<br>
<span style="color: rgb(102, 102, 102);">> Thanks Bart,
</span><br>
<span style="color: rgb(102, 102, 102);">>
</span><br>
<span style="color: rgb(102, 102, 102);">> I managed to get it to build after reinstalling the FPC compiler 3.0.4 - it seems it was getting confused between two
</span><br>
<span style="color: rgb(102, 102, 102);">> different versions on my virtual machine - but after all that it does look like a bug in my new code. I've managed to
</span><br>
<span style="color: rgb(102, 102, 102);">> get it to compile from a clean build and with a couple of modified files that don't do anything drastic, so now I'll try
</span><br>
<span style="color: rgb(102, 102, 102);">> to isolate the issue and update my patch file. An overhauled peephole optimizer is no use if it breaks Linux!
</span><br>
<br>
I had a quick look at the patch and I strongly recommend to split it in multiple patches which can be reviewed more
<br>
easily. This allows also to detect easier which change breaks things and also to measure which change increases speed
<br>
and which change is not needed.
<br>
<br>
In general, I am not happy with the merge of the four passes as it makes maintenance much harder.
<br>
_______________________________________________
<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<br>
<a target="_blank" href="<a href=" http:="" lists.freepascal.org="" cgi-bin="" mailman="" listinfo="" fpc-devel"="">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span>
<br>
<br>
<br>
</blockquote>
_______________________________________________<br>
fpc-devel maillist - <a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a><br>
<a target="_blank" href="<a href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>"><span style="color: red;">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</span></a><br>
<br>
</blockquote></HTML>