From: Mikko Rasa Date: Sat, 25 May 2019 21:00:54 +0000 (+0300) Subject: Fix various issues with constant condition elimination X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;ds=inline;h=aa9873652630db493b5bd9faee4117e9c30ef226;hp=aa9873652630db493b5bd9faee4117e9c30ef226;p=libs%2Fgl.git Fix various issues with constant condition elimination It used to optimize based on the initial values of variables, ignoring the fact that they may change between loop iterations. A stop-gap fix was implemented in 8e14c29, but it prevented optimizations of some conditionals that could safely have been removed. It also caused the optimizer to ignore any assignments made to any variables after declaration when evaluating the loop condition, potentially causing entire loops to be erroneously removed. Finally, unary expressions were not being handled so ++ and -- operators did not mark the variable as modified. ---