label/jump optimization is influenced by the optimize.label[1..4] flags . --nolabelopt resets the label4 optimize flag. This disables the removal of non-reachable code. However, later on (in SDCCBBlock:iCodeFromeBBlock) this is flagged as an error or warning. In the case as reported in bug 3085434, the iffalse path is touched by jump-to-jump optimization, leaving the block with the original jump as dead-code, hence the waning. IMO --nolabelopt should not influence the removal of the unreached blocks but should not do the jump-to-jump optimization. This jum-to-jump optimization is switched on/off using the label3 optimzation flag. The same holds IMO for IFX label optimization ( influenced by the label2 optimize flag). Removal of non-reachable blocks should always be done, as it is a consequence of the other optimizations.
Log in to post a comment.