You can control a p-code size optimization that changes the order in which local variables are allocated on the stack.
The compiler reduces the size of p-code programs by using one-byte opcodes to reference certain local variables. These opcodes can reference a limited number of the local variables in each function.
You can control which variables receive the available opcodes by using the /Ov option as follows:
Option | Description |
/Ov | Sorts the local variables by frequency of use (default) |
/Ov– | Sorts the local variables in the order they occur (lexical order) |
In most cases, the default value for this option is satisfactory. However, if you have a large function that exceeds the capacity of the p-code optimizer, you can rewrite the function so that the most frequently used local variables are at the beginning of the stack frame. Then use the second option above (/Ov–) to ensure the maximum size reduction.