Mesa (master): nvc0/ir: allow min/ max instructions to be dual-issued in pairs
Ilia Mirkin
imirkin at kemper.freedesktop.org
Sat Sep 3 17:58:40 UTC 2016
Module: Mesa
Branch: master
Commit: ae7eb93e6caaf2a75fdaab071c0e5e9883376a82
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae7eb93e6caaf2a75fdaab071c0e5e9883376a82
Author: Karol Herbst <karolherbst at gmail.com>
Date: Sat Aug 13 11:54:52 2016 +0200
nvc0/ir: allow min/max instructions to be dual-issued in pairs
changes for GpuTest /test=pixmark_piano /benchmark /no_scorebox /msaa=0
/benchmark_duration_ms=60000 /width=1024 /height=640:
inst_executed: 1.03G
inst_issued1: 614M -> 580M
inst_issued2: 213M -> 230M
score: 1021 -> 1030
Signed-off-by: Karol Herbst <karolherbst at gmail.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
.../drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp
index 0cb21e8..f5981de 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_target_nvc0.cpp
@@ -625,9 +625,19 @@ bool TargetNVC0::canDualIssue(const Instruction *a, const Instruction *b) const
if (a->op == OP_MOV || b->op == OP_MOV)
return true;
if (clA == clB) {
- // only F32 arith or integer additions
- if (clA != OPCLASS_ARITH)
+ switch (clA) {
+ // there might be more
+ case OPCLASS_COMPARE:
+ if ((a->op == OP_MIN || a->op == OP_MAX) &&
+ (b->op == OP_MIN || b->op == OP_MAX))
+ break;
+ return false;
+ case OPCLASS_ARITH:
+ break;
+ default:
return false;
+ }
+ // only F32 arith or integer additions
return (a->dType == TYPE_F32 || a->op == OP_ADD ||
b->dType == TYPE_F32 || b->op == OP_ADD);
}
More information about the mesa-commit
mailing list