[Patch / Refactor] Conditional Jump Inversion stoploop variable
Original Reporter info from Mantis: CuriousKit @CuriousKit
-
Reporter name: J. Gareth Moreton
Original Reporter info from Mantis: CuriousKit @CuriousKit
- Reporter name: J. Gareth Moreton
Description:
This patch causes 'stoploop' to be set to false if a 'conditional jump inversion' optimisation is made; i.e.
j(cc) @1
jmp @2
@1:
To...
@j(~cc) @2
This can sometimes open up new optimisations with the instruction that appears immediately before the sequence, so setting 'stoploop' to False in order to indicate another run of Pass 1 will ensure consistency.
Steps to reproduce:
Apply patch and confirm correct compilation.
Additional information:
This optimisation shouldn't yet improve code compilation and may slow the compiler down slightly when run under -O3, but it has an effect on future optimisation work (e.g. minimising the overall number of iterations of Pass 1).
It is noted that the "var14" amd "var15" optimisations may be performed more often, but this is because the MOVZX optimisations tend to 'fight' with the MOV/AND optimisations and don't actually change the code. This will be addressed in a later issue.
Mantis conversion info:
- Mantis ID: 36680
- OS: Microsoft Windows
- OS Build: 10 Professional
- Build: r44124
- Platform: Cross-platform
- Version: 3.3.1
- Fixed in revision: 44144 (#991ce83a)
- Monitored by: » Vincent (Vincent Snijders)