[fpc-devel] Linux compilation question

J. Gareth Moreton gareth at moreton-family.com
Sat Dec 1 20:38:21 CET 2018


 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).

 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.
 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.

 Gareth aka. Kit

 On Sat 01/12/18 18:57 , "J. Gareth Moreton" gareth at moreton-family.com
sent:
  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).

 I'll start breaking it up into smaller chunks.

 Gareth aka. Kit

 On Sat 01/12/18 19:54 , Florian Klämpfl florian at freepascal.org sent:
 Am 01.12.2018 um 17:28 schrieb J. Gareth Moreton: 
 > Thanks Bart, 
 > 
 > I managed to get it to build after reinstalling the FPC compiler 3.0.4 -
it seems it was getting confused between two 
 > different versions on my virtual machine - but after all that it does
look like a bug in my new code.  I've managed to 
 > 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 
 > to isolate the issue and update my patch file.  An overhauled peephole
optimizer is no use if it breaks Linux! 

 I had a quick look at the patch and I strongly recommend to split it in
multiple patches which can be reviewed more 
 easily. This allows also to detect easier which change breaks things and
also to measure which change increases speed 
 and which change is not needed. 

 In general, I am not happy with the merge of the four passes as it makes
maintenance much harder. 
 _______________________________________________ 
 fpc-devel maillist - fpc-devel at lists.freepascal.org [1] 
 http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
[2]">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel 

  _______________________________________________
 fpc-devel maillist - fpc-devel at lists.freepascal.org [3]
 http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
[4]">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

 

Links:
------
[1] mailto:fpc-devel at lists.freepascal.org
[2] http://secureweb.fast.net.uk/ http:=
[3] mailto:fpc-devel at lists.freepascal.org
[4] http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20181201/c259adde/attachment.html>


More information about the fpc-devel mailing list