On 08/18/2011 12:02 PM, Matt Turner wrote: > On Thu, Aug 18, 2011 at 2:38 PM, Eric Anholt <e...@anholt.net> wrote: >> + bool progress = true; >> + while (progress) { >> + progress = false; >> + progress = dead_code_eliminate() || progress; > > || progress is always false, though maybe it's just written like that > to match the style of the code. > > I'd have just written this as > > bool progress; > do { > progress = dead_code_eliminate(); > } while (progress) > > Matt
The idea is that we'll add more passes later, so eventually, progress won't just be false. Using the do-while loop is probably clearer though. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev