diff options
author | Eric Anholt <[email protected]> | 2019-05-14 16:24:33 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-05-16 10:25:22 -0700 |
commit | ef88e23d0335c05ebc60a621ee91cd6b22208597 (patch) | |
tree | 9b70d97c7c3d5d83ee9e8af6e09f207a70428ade /src/freedreno | |
parent | c2e68bebb49c0d0bf59372b5480575b4d7bbcac4 (diff) |
freedreno: Log the number of loops in the shader for shader-db.
shader-db's report.py will use this to see when we've changed loop
unrolling behavior on a shader and skip including other stats like
instruction count from being considered for that shader, since they won't
be useful as a proxy for real world performance in that case.
Reviewed-by: Rob Clark <[email protected]>
Tested-by: Eduardo Lima Mitev <[email protected]>
Diffstat (limited to 'src/freedreno')
-rw-r--r-- | src/freedreno/ir3/ir3_compiler_nir.c | 1 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_shader.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index c230fbd3b70..4cae442032c 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -2168,6 +2168,7 @@ static void emit_loop(struct ir3_context *ctx, nir_loop *nloop) { emit_cf_list(ctx, &nloop->body); + ctx->so->loops++; } static void diff --git a/src/freedreno/ir3/ir3_shader.h b/src/freedreno/ir3/ir3_shader.h index c2c1a5312bc..06336eda0da 100644 --- a/src/freedreno/ir3/ir3_shader.h +++ b/src/freedreno/ir3/ir3_shader.h @@ -401,6 +401,7 @@ struct ir3_shader_variant { unsigned branchstack; unsigned max_sun; + unsigned loops; /* the instructions length is in units of instruction groups * (4 instructions for a3xx, 16 instructions for a4xx.. each |