Hi everyone,

This is a bit of a nebulous question, but when might something be considered unmaintainable and hence rejected? For example, with my x86_64 optimiser overhaul, I've tried to make the code as straightforward as possible, but there are a few questionable tricks because one of my design restrictions was that -O1 and -O2 must not perform any worse than before, which was a bit difficult because pass 1 used to be executed twice no matter what (the one that stands out is how OptPass1MOV calls OptPass1XOR so it doesn't miss out on any optimisations with multiple concurrent MOV operations).  Might the restriction be waived if the resultant code became simpler?

There were other little ones like TransferUsedRegs - originally I had a version where you could choose to only transfer one set of registers (e.g. the integer registers) instead of all of them (which is a little costly), but there was concern that it might cause maintainability problems, possibly because of an optimisation playing with more than one type of register, for example.  Nevertheless, TransferUsedRegs also calls "Create" as a regular method, but I do my best to explain what's going on with comments.

Gareth aka. Kit

This email has been checked for viruses by Avast antivirus software.

fpc-devel maillist  -  fpc-devel@lists.freepascal.org

Reply via email to