Open meiao opened 1 year ago
Note, this instrumentation may make programs that would panic in runtime to run. For instance, a program that increments the data until it overflows, then decrements it, would fail without this optimization, but will run fine after it.
To decrease the number of instructions when multiple similar commands are grouped, these can be grouped as in the example:
For example:
can become:
This optimization can be done to IncDataPointer and IncData. But all the commands must be of the same type and must be sequentially in the code.
The Noops are added so the blocks' start_block_instr and end_block_instr are not changed by this optimization. They shall be removed by a later optimization.
Note:
should become: