MicroC Code Generator : Code Optimizations : Reuse of Timeout Variables

Reuse of Timeout Variables

To reduce the number of data allocations for the timeout operation, the timeout algorithm merges data allocation for two timeouts that relate to mutually exclusive states.

The optimizer looks for those timeouts and delays that are pending in exclusive states. For those, the same variables might be used.

Example
“Train” states might use a single variable