OSDN Git Service

panfrost/midgard: Hit missed scheduling opportunity
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 9 Jul 2019 17:59:34 +0000 (10:59 -0700)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 10 Jul 2019 13:45:20 +0000 (06:45 -0700)
Don't try to schedule to vmul when that can't possible work (forcing a
bundle break). glmark:

total bundles in shared programs: 2700 -> 2683 (-0.63%)
bundles in affected programs: 695 -> 678 (-2.45%)
helped: 14
HURT: 0
helped stats (abs) min: 1 max: 4 x̄: 1.21 x̃: 1
helped stats (rel) min: 1.27% max: 7.69% x̄: 4.30% x̃: 4.77%
95% mean confidence interval for bundles value: -1.68 -0.75
95% mean confidence interval for bundles %-change: -5.63% -2.97%
Bundles are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/midgard/midgard_schedule.c

index 1910176..f4156d6 100644 (file)
@@ -234,7 +234,7 @@ schedule_bundle(compiler_context *ctx, midgard_block *block, midgard_instruction
                                                 else
                                                         break;
                                         } else {
-                                                if ((units & UNIT_VMUL) && !(control & UNIT_VMUL))
+                                                if ((units & UNIT_VMUL) && last_unit < UNIT_VMUL)
                                                         unit = UNIT_VMUL;
                                                 else if ((units & UNIT_VADD) && !(control & UNIT_VADD))
                                                         unit = UNIT_VADD;