[Refactor] Clean-up of i386 peephole optimizer
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:
The supplied patch cleans up some vestigial code from the i386 peephole optimizer that has since been superseded by the jump optimisations over at #0036291. Additinally, the PrePeepholeOptsCPU method has had a minor restructuring to better handle the rare case where InsContainsSegRef() returns True and p becomes something that is no longer an instruction (it ultimately removes a conditonal check and some overhead from repeated function calls).
Genereated code should be completely identical.
Steps to reproduce:
Apply patch and confirm correct compilation of i386 on all appropriate platforms.
Additional information:
i386-win32 binary size does not change, since the removed procedures were never referenced, hence contained dead code that was stripped out by the compiler. Binaries are not identical though because of the change to PrePeepholeOptCPU.
Mantis conversion info:
- Mantis ID: 36352
- OS: Microsoft Windows
- OS Build: 10 Professional
- Build: r43569
- Platform: i386 (all OS's)
- Version: 3.3.1
- Fixed in revision: 43573 (#dea18551)