[Mesa-dev] [PATCH v2 1/7] nv50/ir: enable PostRaConstantFolding for [c0, f0)
Karol Herbst
nouveau at karolherbst.de
Wed Jan 27 09:25:02 PST 2016
From: Karol Herbst <git at karolherbst.de>
helps shaders in multiple games
total instructions in shared programs : 1925865 -> 1922112 (-0.19%)
total gprs used in shared programs : 251863 -> 251863 (0.00%)
total local used in shared programs : 5673 -> 5673 (0.00%)
total bytes used in shared programs : 17657840 -> 17624080 (-0.19%)
local gpr inst bytes
helped 0 0 2082 2082
hurt 0 0 0 0
v2: only Tesla needs the lower path
Signed-off-by: Karol Herbst <nouveau at karolherbst.de>
---
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
index 95e9fdf..ced9904 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp
@@ -2883,7 +2883,7 @@ NV50PostRaConstantFolding::visit(BasicBlock *bb)
def = def->getSrc(0)->getInsn();
if (def && def->op == OP_MOV && def->src(0).getFile() == FILE_IMMEDIATE) {
vtmp = i->getSrc(1);
- if (isFloatType(i->sType)) {
+ if (typeSizeof(i->sType) >= 2) {
i->setSrc(1, def->getSrc(0));
} else {
ImmediateValue val;
@@ -3325,7 +3325,7 @@ bool
Program::optimizePostRA(int level)
{
RUN_PASS(2, FlatteningPass, run);
- if (getTarget()->getChipset() < 0xc0)
+ if (getTarget()->getChipset() < NVISA_GK20A_CHIPSET)
RUN_PASS(2, NV50PostRaConstantFolding, run);
return true;
--
2.7.0
More information about the mesa-dev
mailing list