Skip to content

[x86 / Refactor] Speed-up for DeepMOVOpt call that makes use of aoc_ForceNewIteration

Summary

Now that aoc_ForceNewIteration has been fixed, the DeepMOVOpt call in OptPass1MOV has been improved to increase compiler speed. Where Result was once set to True even though p itself hadn't changed, instead the aoc_ForceNewIteration flag is set, thus removing the need to run through OptPass1MOV more times than necessary.

Additionally, to help with the reduced number of calls to OptPass1MOV, the DeepMOVOpt call is now wrapped in a while loop. This greatly helps in a situation where the immediate next instruction gets removed and the instruction after it takes its place, since program flow can return to the top of the while loop and see if DeepMOVOpt can work on the new next instruction instead of having to wait on another call to OptPass1MOV.

System

  • Processor architecture: i386, x86_64

What is the current bug behavior?

N/A

What is the behavior after applying this patch?

The compiler should receive a small speed gain.

Relevant logs and/or screenshots

No disassembly changes have been observed for x86_64-win64 even under -O1, making this a pure refactor.

Merge request reports