[Piglit] [PATCH] Add GLSL tests for loops with function calls that have side-effects.

Kenneth Graunke kenneth at whitecape.org
Fri Mar 23 03:49:04 PDT 2012

On 03/23/2012 12:03 AM, Jose Fonseca wrote:
>> Ian,
>> The loop analysis code currently doesn't take calls into account
>> whatsoever, which is clearly wrong.  Any ideas on the best way to fix
>> it?
> I think that, before a loop is unrolled, any inner calls should be
> inlined. I don't any correctness/performance reason to do any
> differently.
> Jose

Yeah, I think "don't unroll if there are function calls" is the right 
answer.  Inlining first would make unrolling happen in most cases.  We 
can always improve on that later.

I'm not too familiar with the loop analysis/control/unroll split, so it 
wasn't immediately clear to me where to add that.  I suppose I should go 
read Muchnick's book, since I'm pretty sure that's where this came from.

More information about the Piglit mailing list