Am Montag, den 29.01.2018, 20:32 +0100 schrieb Roland Scheidegger: > > Am I correct assuming that for something like > while (foo) { > if (bar) { > do something; > } else { > /* nothing */ > } > } > The else clause wouldn't get optimized away neither? > (This of course is a trivial example, but I suppose it would extend > to cases where the optimizer actually optimized away the alu > instructions in the else clause). > In this case, this indeed looks rather harsh. This is indeed the case (unless the if is eliminated completely in the if_conversion).
> I would have said in theory somehow the break should be some op which > (despite not having a dst) has side-effects so it would not be > subject to elimination somewhere (as there would be a if->next node > in this case then). It is the else that vanishes, but only if there is only a break in the else path, if there there is also an ALU clause, then the else branch is created propperly. > Albeit I'm completely oblivious how it really gets optimized away, is > that based on liveness analysis or something? The sb code is a > mystery to me... I'm trying to understand it, but is is very dificult to grasp how it works even with the debugging output. Well, maybe Dave has a better idea. Best, Gert _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev