glsl: Small optimization for constant conditionals
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 15 Apr 2014 10:30:40 +0000 (12:30 +0200)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 17 Apr 2014 06:39:57 +0000 (23:39 -0700)
commitcda5e0c25ea5f8ab38b69f1f04099acfa3f0ced2
treeb414a531b7f6c4529d42e72c3cb7b022ab4ac9a7
parent4472ab9e6d7940dcdd627de6bd4fca0cc43651f9
glsl: Small optimization for constant conditionals

Once the relevant branch has been identified do not iterate over the
instructions in the branch, do a linked list insertion instead to avoid the
loop.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/glsl/opt_if_simplification.cpp