Just how 'smart' IS the STVD (Cosmic) "Minimize code size (+compact)" optimizer?
In the attached, notice (in the Disassembly window) how the "Minimize code size (+compact)" compiler option entirely did away with the if-else portion of the code, whereas "No Optimizations" does not do this. Is that telling me that the optimizer is so 'smart' that it could tell I was writing a given byte to data EEPROM, reading it back out from the same location in EEPROM and comparing that to the original value written (to check successful operation) and that it 'assumed' that the two values would necessarily be equal? But if so, isn't it INSANE for the optimizer to make that assumption? And if so, am I limited to fat non-shrunk code that won't fit on my MCU? :\
