glsl: Fix handling of function calls inside nested loops.
glsl: Fix handling of function calls inside nested loops.

Previously, when visiting an ir_call, loop analysis would only mark
the innermost enclosing loop as containing a call.  As a result, when
encountering a loop like this:

    for (i = 0; i < 3; i++) {
      for (int j = 0; j < 3; j++) {
        foo();
      }
    }

it would incorrectly conclude that the outer loop ran three times.
(This is not certain; if foo() modifies i, then the outer loop might
run more or fewer times).

Fixes piglit test "vs-call-in-nested-loop.shader_test".

Reviewed-by: Jordan Justen <a79006884ba9cf5f4f7fcbb92a15b208780d8c97@intel.com>
Reviewed-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>

mapbox/glsl-optimizer,bkaradzic/glsl-optimizer,metora/MesaGLSLCompiler,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,tokyovigilante/glsl-optimizer,tokyovigilante/glsl-optimizer,zz85/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,metora/MesaGLSLCompiler,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,zeux/glsl-optimizer,dellis1972/glsl-optimizer,mapbox/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,djreep81/glsl-optimizer,mapbox/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,wolf96/glsl-optimizer,zz85/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,mcanthony/glsl-optimizer,djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,wolf96/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,mapbox/glsl-optimizer,zz85/glsl-optimizer,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,mcanthony/glsl-optimizer,mapbox/glsl-optimizer,mcanthony/glsl-optimizer